WSDL port


Release date:2023-12-30 Update date:2023-12-30 Editor:admin View counts:199

Label:

WSDL port

<portType> Element is the most important WSDL element.

WSDL port

<portType> Element is the most important WSDL element.

It describes a web service, actions that can be performed, and related messages.

You can put <portType> Element is compared to a function library (or a module, or a class) in a traditional programming language.

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.

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.

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”.

Powered by TorCMS (https://github.com/bukun/TorCMS).