码上敲享录 > 互联网笔记 > webservice报Unmarshalling Error: unexpected element (uri:"", local:"port"). Expected elements are (no

webservice报Unmarshalling Error: unexpected element (uri:"", local:"port"). Expected elements are (no

上一章章节目录下一章 2019-07-04已有1421人阅读 评论(0)

webservice报Unmarshalling Error: unexpected element (uri:"", local:"port"). Expected elements are (none)


解决方法:

通过soap协议请求webservice出现这个错误,一般报都是请求的xml格式或者字符错误,我报这个错是因为吧“/”写错位置了<mergerid><mergerid/>

,正确的应该是


<mergerid></mergerid>


<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">


<SOAP-ENV:Header/>

<SOAP-ENV:Body>

<method:sendMsg xmlns:method="http://juchen.webservice.com/">

<username>123</username>

<passwd>123</passwd>

<mergerid><mergerid/>

</method:sendMsg>


</SOAP-ENV:Body>


</SOAP-ENV:Envelope>


0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交