WSDL 中具有不同输入和输出名称的 SOAP XML WSDL

问题描述 投票:0回答:1

我正在实现 OTA_ReadRQ / OTA_ResRetrieveRS 消息对,但遇到了问题。 我已将所有其他消息实现为配对消息 EG:OTA_HotelAvailRQ / OTA_HotelAvailRS

我尝试创建 SOAP WSDL,但从客户端收到错误;

  [faultcode] => SOAP-ENV:Client [faultstring] => Operation 'OTA_ReadRQ' is not defined in the WSDL for this service

在我看来,我需要 OTA_ReadRQ 的另一个定义

所以我尝试复制定义,但它然后说我有一个重复的“名称”

我找不到任何有关实现多个定义的信息

<definitions 
name="OTA_ResRetrieveRS" 
targetNamespace="xx/resretrieve">`

定义元素等的 wsdl 主体一切都很好并且验证完美。

如果有帮助的话,我可以添加整个 wsdl。

我认为问题出在定义操作的本节中,没有与 OTA_ReadRQ 匹配的定义

<message name="ResRetrieveIn">
    <wsdl:documentation xmlns:wsdl="schemas.xmlsoap.org/wsdl/"/>
    <part name="messagePart" element="import0:OTA_ReadRQ"/>
 </message>
 <message name="ResRetrieveOut">
    <wsdl:documentation xmlns:wsdl="schemas.xmlsoap.org/wsdl/"/>
    <part name="messagePart" element="import0:OTA_ResRetrieveRS"/>
 </message>
 <portType name="OTA_ResRetrieveInterface">
    <wsdl:documentation xmlns:wsdl="schemas.xmlsoap.org/wsdl/"/>
    <operation name="ResRetrieve">
        <wsdl:documentation xmlns:wsdl="schemas.xmlsoap.org/wsdl/"/>
        <input message="tns:ResRetrieveIn"/>
        <output message="tns:ResRetrieveOut"/>
    </operation>
  </portType>
  <binding name="OTA_ResRetrieve" type="tns:OTA_ResRetrieveInterface">
    <soap:binding transport="schemas.xmlsoap.org/soap/http"/>
    <operation name="ResRetrieve">
        <soap:operation soapAction="/xml:ResRetrieveIn"
   style="document"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
  </binding>
  <binding name="OTA_ResRetrieveSoap12" type="tns:OTA_ResRetrieveInterface">
    <soap12:binding transport="schemas.xmlsoap.org/soap/http"/>
    <operation name="ResRetrieve">
    <soap12:operation soapAction="xxx/xml:ResRetrieveIn" style="document"/>
        <input>
            <soap12:body use="literal"/>
        </input>
        <output>
            <soap12:body use="literal"/>
        </output>
    </operation>
</binding>
<service name="OTA_ResRetrievePort">
    <port name="OTA_ResRetrievePort" binding="tns:OTA_ResRetrieve">
<soap:address location="xxx/hotel_res_retrieve.php"/>
    </port>
    <port name="OTA_ResRetrieveSOAP12Port" binding="tns:OTA_ResRetrieveSoap12">
 <soap12:address location="xxx/hotel_res_retrieve.php"/>
    </port>
</service>

注意:我必须删除所有网址引用才能发布此内容

xml soap wsdl
1个回答
0
投票

我决定让输入成为一个简单的 GET 调用,问题解决了

© www.soinside.com 2019 - 2024. All rights reserved.