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

Unmarshalling Error: unexpected element 错误的解决

发布时间:2020-12-17 01:08:10 所属栏目:安全 来源:网络整理
导读:使用ksoap2连接cxf 的webservice时, 如果不带参数可以正常返回,带参数则报如下异常:? org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://webservice.abc.com/",local:"arg0"). Expected elements are {}arg1,{}ar

使用ksoap2连接cxf 的webservice时,

如果不带参数可以正常返回,带参数则报如下异常:?

org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"http://webservice.abc.com/",local:"arg0"). Expected elements are <{}arg1>,<{}arg0>

解决方法

?SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
???????? envelope.bodyOut = rpc;?
???????? envelope.dotNet = true;//改成false?
???????? envelope.setOutputSoapObject(rpc);

问题解决

(编辑:李大同)

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

    推荐文章
      热点阅读