加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

webService xfire FAQ

发布时间:2020-12-16 22:46:18 所属栏目:安全 来源:网络整理
导读: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导入librari

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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读