使用server.wsdd發佈webservice,然後使用soapui調試調用webservice後,發現返回值中的resultNotifyReturn帶有href="#id0",跟所需要的格式不對
wsdl文件如下:
調用後返回的結果一個對象,帶有result和errorDescription 2個參數。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:resultNotifyResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="iptv">
<resultNotifyReturn href="#id0"/>
</ns1:resultNotifyResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:CSPResult" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="iptv">
<errorDescription xsi:type="soapenc:string">成功接收回調信息</errorDescription>
<result xsi:type="xsd:int">0</result>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
發現resultNotifyReturn 標籤不是直接帶有結果的,而是使用href="#id0"鏈接到multiRef標籤,跟需求不一致。
後發現更改server-config.wsdd文件中
globalConfiguration標籤---sendMultiRefs屬性值改爲false便可
<parameter name="sendMultiRefs" value="false"/>
修改後:
調用後返回的格式便是我們需要的了。