【问题标题】:Difference between SOAP binding and HTTP Binding in WSDLWSDL 中 SOAP 绑定和 HTTP 绑定的区别
【发布时间】:2021-07-14 12:56:35
【问题描述】:

我正在使用具有两个端口的 WSDL - 一个具有肥皂绑定,另一个具有 HTTP 绑定。 据我所知,SOAP 是一种消息传递协议,但仍使用 HTTP 作为传输协议。那么使用这两个端口有什么区别呢?

包含绑定和服务的部分 WSDL:

<wsdl:binding name="OperationServiceNextGenHttpBinding" type="tns:OperationServiceNextGenPort">

    <http:binding verb="POST"/>
    <wsdl:operation name="operation">

        <http:operation location="/operation"/>
        <wsdl:input>
            <mime:content type="application/x-www-form-urlencoded"/>


        </wsdl:input>
        <wsdl:output>
            <mime:content type="text/xml"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="OperationServiceNextGenSOAPBinding" type="tns:OperationServiceNextGenPort">

    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="operation">

        <soap:operation soapAction="http://some.schema.com/marketplace/search/v1/services/operation"/>
        <wsdl:input>

            <soap:body use="literal"/>
        </wsdl:input>
        <wsdl:output>

            <soap:body use="literal"/>
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="OperationServiceNextGen">
    <wsdl:documentation>
        <version>1.1.10</version>
    </wsdl:documentation>
    <wsdl:port binding="tns:OperationServiceNextGenHttpBinding" name="OperationServiceNextGenHttpPort">
        <http:address location="https://svcs.ebay.com/services/search/v1/OperationServiceNextGen"/>
    </wsdl:port>
    <wsdl:port binding="tns:OperationServiceNextGenSOAPBinding" name="OperationServiceNextGenSOAPPort">
        <soap12:address location="https://svcs.ebay.com/services/search/v1/OperationServiceNextGen"/>
    </wsdl:port>

</wsdl:service>

【问题讨论】:

    标签: http soap wsdl


    【解决方案1】:

    让我试着简短地解释一下。

    一个有soap绑定,另一个有HTTP绑定

    SOAP 绑定 SOAP 绑定定义了 SOAP XML 格式,这意味着请求/响应 XML 必须是什么样子以及它应该包含哪些 XML 节点/命名空间等?

    HTTP 绑定

    这讨论了 SOAP XMLs/Messages 应该如何传输,即在这种情况下它是否会通过 HTTP/HTTPS。

    据我所知,SOAP 是一种消息传递协议,但仍使用 HTTP 作为传输协议。那么使用这两个端口有什么区别呢?

    大多数情况下传输协议是 HTTP/HTTPS 是正确的,但可能并非总是如此,SOAP 可以通过 SMTP 或 FTP 传输。

    查看更多信息 SOAP over SMTP。 https://teaching.shu.ac.uk/aces/ict/de/web_services/soap_over_http.htm# https://www.tutorialspoint.com/wsdl/wsdl_binding.htm

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多