我对第三方提供的服务 wsdl 有疑问。让我试着解释一下。拿这个 wsdl 部分:
<wsdl:portType name="IBestelService">
<wsdl:operation name="PlaatsOrder">
<wsdl:input message="tns:PlaatsOrderRequest"/>
<wsdl:output message="tns:PlaatsOrderResponse"/>
<wsdl:fault message="tns:BestelServiceFault" name="BestelServiceFault"/>
</wsdl:operation>
<wsdl:operation name="PlaatsOrderThreeShips">
<wsdl:input message="tns:PlaatsOrderRequestThreeShips"/>
<wsdl:output message="tns:PlaatsOrderResponseThreeShips"/>
<wsdl:fault message="tns:BestelServiceFault" name="BestelServiceFault"/>
</wsdl:operation>
</wsdl:portType>
对于soapui(和.net to)请求,生成以下请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sambo-ict:basetypes:1.0" xmlns:urn1="urn:sambo-ict:bestelservice:types:1.0">
<soapenv:Header>
<urn:AuthenticationHeader xmlns="urn:sambo-ict:basetypes:1.0"/>
</soapenv:Header>
<soapenv:Body>
<urn1:PlaatsOrderRequest>
<EAN>9789490998394</EAN>
<DistributorOrderId>13188</DistributorOrderId>
<DeliveryMethod>Tegoed</DeliveryMethod>
<Amount>1</Amount>
</urn1:PlaatsOrderRequest>
</soapenv:Body>
</soapenv:Envelope>
然而,第三方网站的服务期望这一点
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sambo-ict:basetypes:1.0" xmlns:urn1="urn:sambo-ict:bestelservice:types:1.0">
<soapenv:Header>
<urn:AuthenticationHeader xmlns="urn:sambo-ict:basetypes:1.0"/>
</soapenv:Header>
<soapenv:Body>
<urn1:PlaatsOrder>
<EAN>9789490998394</EAN>
<DistributorOrderId>13188</DistributorOrderId>
<DeliveryMethod>Tegoed</DeliveryMethod>
<Amount>1</Amount>
</urn1:PlaatsOrder>
</soapenv:Body>
</soapenv:Envelope>
当我在肥皂上搜索互联网时。“plaatsorder”而不是“plaatsorderrequest”似乎是正确的方法。但是我不相信soapui/java 和.net 都错了。那么任何人都可以向我解释其中的区别吗?