Latest web development tutorials

WSDL Binding

WSDL binding may define the message format and protocol details for the web service.

Bound to SOAP

A request - response operation example:

<message name="getTermRequest">
<part name="term" type="xs:string"/>

<message name="getTermResponse">
<part name="value" type="xs:string"/>

<portType name="glossaryTerms">
<operation name="getTerm">
<input message="getTermRequest"/>
<output message="getTermResponse"/>

<binding type="glossaryTerms" name="b1">
<soap:binding style="document"
transport="" />
<soap:operation soapAction=""/>
<input><soap:body use="literal"/></input>
<output><soap:body use="literal"/></output>

binding element has two attributes - name attribute and the type attribute.

Name name attribute defines binding, and type attribute points for the binding port, in this case is "glossaryTerms" port.

soap: binding element has two attributes - style properties and transport properties.

style property value "rpc" or "document". In this example, we use document. transport attribute defines the SOAP protocol to use. In this example, we use HTTP.

operation element defines the port operator provided for each.

For each operation, the corresponding SOAP acts need to be defined. You must also how the input and output encoding. In this example we use "literal".