The WSDL binding defines the message format and protocol details for web service. An example of a request-response operation: Name attribute definition For each operation, the corresponding SOAP behavior needs to be defined. At the same time, how you must encode the input and output. In this example, weuse “literal”. 6.5.1. Bind to SOAP ¶
Example ¶
<messagename="getTermRequest"><partname="term"type="xs:string"/></message><messagename="getTermResponse"><partname="value"type="xs:string"/></message><portTypename="glossaryTerms"><operationname="getTerm"><inputmessage="getTermRequest"/><outputmessage="getTermResponse"/></operation></portType><bindingtype="glossaryTerms"name="b1"><soap:bindingstyle="document"transport="http://schemas.xmlsoap.org/soap/http"/><operation><soap:operationsoapAction="http://example.com/getTerm"/><input><soap:bodyuse="literal"/></input><output><soap:bodyuse="literal"/></output></operation></binding>
binding
an element has two attributes-
name
properties and
type
property.
binding
the name, and
type
property points to the
binding
, in this case, the “glossaryTerms” port.
soap:binding
an element has two attributes-
style
properties and
transport
property.
style
property can have a value of “rpc” or “document”. In this example, we use document.
transport
property defines the SOAP protocol to be used. In this example, we use HTTP.
operation
Element defines the operators provided by each port.