The WSDL binding document defines the protocol details for operations and messages defined by a particular portType. The WSDL binding document is equivalent to a tModel or service interface as published to a UDDI registry. You can generate a monolithic WSDL document that contains all WSDL elements, or a separate WSDL binding document.
The WSDL binding document is a concrete protocol and data format specification for a particular port type. The binding information contains the protocol name, the invocation style, a service ID and the encoding for each operation.
The following WSDL binding document is based on the StockQuoteService Sample.
<?xml version="1.0" encoding="UTF-8"?> <definitions name="StockQuoteServiceBinding" targetNamespace="http:///" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http:///"> <import location="StockQuoteService.wsdl" namespace="http:///"/>
<!-- The mapping to the actual transport protocol names is --> <!-- performed in the binding, the next part of the service --> <!-- interface file. StockQuoteServiceSOAPBinding is the SOAP --> <!-- binding for the port type. The binding describes --> <!-- which run-time protocol is supported by the service --> <!-- provider and contains protocol configuration information. -->
<wsdl:binding name="StockQuoteServiceSoapBinding" type="intf:StockQuoteService"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getQuote"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getQuoteRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getQuoteResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding>