An WSDL document is just a simple XML document.
It contains a series of definitions that describe a web service. WSDL documents use these main elements to describe a web service: element Define <portType> Actions performed by web service < message > Messages used by web service < types > Data types used by web service < binding > Communication protocols used by web service The main structure of an WSDL document is something like this: WSDL documents can contain other elements, such as It describes a web service, actions that can be performed, and related messages. You can put Each message consists of one or more parts. These parts can be compared to the parameters of a function call in a traditional programming language. For maximum platform neutrality, WSDL uses XML Schema syntax to define data types. This is a simplified fragment of an WSDL document: In this case, the The operation “getTerm” has an input message named “getTermRequest” and an output message named “getTermResponse”. Compared to traditional programming, glossaryTerms is a function library, while “getTerm” takes input parameters “getTermRequest” and return parameters. A function of 6.3.1. WSDL document structure ¶
WSDL document instance ¶
<definitions><types>data type
definitions........</types><message>definition of the data being
communicated....</message><portType>set of
operations......</portType><binding>protocol and data format
specification....</binding></definitions>
extension
element, and a
service
element, which combines several web services definitions into a single WSDL document. 6.3.2. WSDL port ¶
<portType>
Element is the most important WSDL element.
<portType>
Element is compared to a function library (or a module, or a class) in a traditional programming language. 6.3.3. WSDL message ¶
<message>
Element defines the data element of an operation. 6.3.4. WSDL types ¶
<types>
Element defines the data type used by web service. 6.3.5. WSDL Bindings ¶
<binding>
Element defines the message format and protocol details for each port. 6.3.6. WSDL instance ¶
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>
<portType>
element defines “glossaryTerms” as the name of a port and “getTerm” as the name of an operation.
<message>
Element defines the part of each message and the associated data type.
getTermResponse
.