微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

webService xfire FAQ

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的密码认证

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐