5

I am using a WSDL which has two ports - one having soap binding and the other one having HTTP binding. From what I know, SOAP is a protocol for messaging but still uses HTTP as transport protocol. Then what is the difference between using these two ports?

Part of the WSDL containing binding and services:

<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>
mangesh
  • 511
  • 8
  • 24

1 Answers1

3

Let me try to explain in short.

one having soap binding and the other one having HTTP binding

SOAP binding SOAP binding defines the SOAP XML format, meaning how request/response XML must look like and what XML nodes/namespaces etc, it should contain?

HTTP binding

This talks about, how the SOAP XMLs/Messages should be transported over i.e. whether, it will be over HTTP/HTTPS in this case.

From what I know, SOAP is a protocol for messaging but still uses HTTP as transport protocol. Then what is the difference between using these two ports?

This is true most of time that transport protocol is HTTP/HTTPS, but may not be case all the time, SOAP could be transport over SMTP or FTP.

See some more information 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

Red Boy
  • 5,429
  • 3
  • 28
  • 41