Java Reference
In-Depth Information
Nestedwithin definitions are types , message , portType , binding ,and
service elements:
types presentsuser-defineddatatypes(usedinthecontextof message ele-
ments)underadatatypesystem.Althoughanytypedefinitionlanguagecanbe
used,XMLSchemaismandatedbytheWS-IinBasicProfile1.0. types can
contain zero or more schema elements. This example has a single schema
element,whichimportsanexternalschema.The types elementisoptional.It
is not present when the service uses only XML Schema builtin simple types,
such as strings and integers.
message definesaone-wayrequestorresponsemessage(conceptuallyafunc-
tioninvocationoraninvocationresponse)thatmayconsistofoneormoreparts
(conceptually equivalent to function parameters or return values). Each part is
described by a part element whose name attribute identifies a parameter/re-
turnvalueelement.The element attributeidentifiesanotherelement(defined
elsewhere) whose value is passed to this parameter or which provides the re-
sponse value. Zero or more part elements, and zero or more message ele-
ments may be specified.
portType describes a web service interface via its operations. Each oper-
ation elementcontains input and/or output elementsbasedontheMEP.
Listing 11-5 includes both elements. (A fault element for communicating
error information can be specified when there is an output element.) The
wsam:Action attribute is used with message routing in the context of WS-
Addressing —see http://en.wikipedia.org/wiki/WS-Address-
ing . The message attribute identifies the message element that describes
the message via its name attribute (and also provides the part elements de-
scribing parameters and return value). operation elements are optional; at
least one portType element must be specified.
binding provides details on how a portType operation (such as c2f or
f2c ) is transmitted over the wire. This element's type attribute identifies
the portType element defined earlier in the document. The nested
soap:binding elementindicatesthataSOAP1.1bindingisbeingused.Its
transport attribute's URI value identifies HTTP as the transport protocol
(SOAP over HTTP), and its style attribute identifies document as the de-
faultservicestyle.Each operation elementconsistsof soap:operation ,
input , and output elements. The soap:operation element is a SOAP
extensionelementthatprovidesextrabindinginformationattheoperationlevel.
Search WWH ::




Custom Search