WSDL Port
- Previous Page WSDL Documentation
- Next Page WSDL Binding
A WSDL port can describe the interface (valid operations) provided by a web service.
WSDL Port
<portType> element is the most important WSDL element.
It can describe a web service, executableoperations, and relatedMessage.
A port defines a connection point to a web service. You can compare this element to a library (or a module, or a class) in traditional programming languages, and each operation to a function in traditional programming languages.
Operation Type
Request-response is the most common operation type, but WSDL defines four types:
Type | Definition |
---|---|
One-way | This operation can accept a message but will not return a response. |
Request-response | This operation can accept a request and will return a response |
Solicit-response | This operation can send a request and will wait for a response. |
Notification | This operation can send a message but will not wait for a response. |
One-Way Operation
An example of a one-way operation:
<message name="newTermValues"> <part name="term" type="xs:string"/> <part name="value" type="xs:string"/> </message> <portType name="glossaryTerms"> <operation name="setTerm"> <input name="newTerm" message="newTermValues"/> </operation> </portType >
In this example, the port "glossaryTerms" defines a one-way operation named "setTerm".
This "setTerm" operation can accept input messages of new glossary items, which use a message named "newTermValues", which contains input parameters "term" and "value". However, no output is defined for this operation.
Request-Response Operation
An example of a request-response operation:
<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>
In this example, the port "glossaryTerms" defines a request-response operation named "getTerm".
"getTerm" operation will request an input message named "getTermRequest", which contains a parameter named "term", and will return an output message named "getTermResponse", which contains a parameter named "value".
- Previous Page WSDL Documentation
- Next Page WSDL Binding