WSDL Bindings
WSDL bindings defines the message format and protocol details
for a web service.
Binding to SOAP
A request-response operation example:
<message name="getTermRequest">
<part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
<part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation> </portType>
<binding type="glossaryTerms" name="b1">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation>
<soap:operation
soapAction="http://example.com/getTerm"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
|
The binding element has two attributes - the name attribute and
the type attribute.
The name attribute (you can use any name you want) defines the name of the
binding, and the type attribute points to the port for the binding, in this case
the "glossaryTerms" port.
The soap:binding element has two attributes - the style attribute and
the transport attribute.
The style attribute can be "rpc" or "document". In this case we use document.
The
transport attribute defines the SOAP protocol to use. In this case we use
HTTP.
The operation element defines each operation that the port
exposes.
For each operation the corresponding SOAP action has to be defined. You must
also specify how the input and output are encoded. In this case we use "literal".
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a free 30-day trial today!
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
|
|