码迷,mamicode.com
首页 > Web开发 > 详细

webService xfire FAQ

时间:2017-06-06 13:08:11      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:nbsp   white   str   methods   XML   codehaus   ons   space   declared   

1、Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity

at java.lang.Class.getDeclaredConstructors0(Native Method)

原因:缺少webservice的client的jar包

解决方式:myeclipse导入libraries。选择Xfire1.2 HTTP Client Libraries就可以。


2、Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: There must be a method name element.
org.codehaus.xfire.fault.XFireFault: There must be a method name element.

原因:请求的结尾加了wsdl

解决方式:去掉wsdl就可以,如:http://localhost/webServiceServer/services/HelloService


3、身份认证的开启和关闭

在service.xml中配置和注销一下文件。即能开启和关闭webservice的password认证

<inHandlers>
<handler handlerClass="cn.org.bjca.client.ws.security.WebserviceServerHandler"/>  
</inHandlers>


webService xfire FAQ

标签:nbsp   white   str   methods   XML   codehaus   ons   space   declared   

原文地址:http://www.cnblogs.com/ljbguanli/p/6950756.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!