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>