Element is the most important WSDL element.
6.4.1. WSDL port ¶
Element is the most important WSDL element.
It describes a web service, actions that can be performed, and related messages.
You can put Element is compared to a function library (or a module, or a class) in a traditional programming language.
6.4.2. Operation type ¶
Request-response is the most common type of operation, but WSDL defines fourtypes:
| Types | Define |
|---|---|
| One-way | This action accepts a message, but does not return a response. |
| Request-response | This operation accepts a request and returns a response |
| Solicit-response | This action sends a request and waits for a response. |
| Notification | This action sends a message, but does not wait for a response. |
6.4.3. One-Way operation ¶
An example of an one-way operation:
Example ¶
<messagename="newTermValues"><partname="term"type="xs:string"/><partname="value"type="xs:string"/>message><portTypename="glossaryTerms"><operationname="setTerm"><inputname="newTerm"message="newTermValues"/>operation>portType>
In this example, the port “glossaryTerms” defines an one-way operation named “setTerm”.
This “setTerm” operation accepts input from the new glossary item message,which uses a message named “newTermValues” with the input parameters “term” and “value”. However, no output is defined for this operation.
6.4.4. Request-Response operation ¶
One request-response examples of operations:
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>
In this example, the port “glossaryTerms” defines a request-response operation named “getTerm”.
The “getTerm” operation requests an input message named “getTermRequest”with a parameter named “term” and returns an output message named “getTermResponse” with a parameter named “value”.