Java Reference
In-Depth Information
3.2 WSDL Interface
The service interface is defined using the portType element. This element contains a list of
operation elements that make up a Web Service. Each operation consists of one in and one
out message, and optionally one fault message. All operations exchange messages between
a client and a server. A message is an abstract data type that contains the data.
Refer to listings 3-1 and 3-2 above, which highlight the elements of a basic WSDL
document. The five major components of the WSDL and their relationships are visible.
3.2.1 <types> element
All data types are defined inside this element types. Usually, the element types points to an
external URL that contains an XML schema which may contain other schemas. WSDL
specification does not prohibit the use of other type definition systems; however, it prefers
the XML schema.
3.2.2 <message> element
A message element is an abstract data type describing the input and output of an operation.
It consists of parts that are linked to types. Each operation (@WebMethod) may contain
three message types: input, output, and fault. Each of these message types is unique
throughout the entire WSDL document. Each has a unique name. Inside each message, the
parts define the actual types that are properly defined inside the <types> element specific-
ally (RPC style) or via a schema (Document style).
3.2.3 <portType> element
The <portType> element consists of an abstract set of operations. These operations may be
supported by one or more endpoints. Operations are used to exchange messages between
a service consumer and the provider. Message exchange protocol can take one of the
following patterns:
• One-way - the service endpoint receives a message
• Request-response - the service endpoint receives a message and sends a
correlated message
Search WWH ::




Custom Search