Java Reference
In-Depth Information
Servers (such as firewalls) can use the
SOAPAction
attribute's URI value
(whenpresent)tofilterSOAPrequestmessagessentviaHTTP.The
input
and
output
elementscontain
soap:body
elementswhose
use
attributesindic-
ate how message parts appear inside of SOAP's
Body
element —I present an
overviewofSOAPlaterinthischapter.The
literal
valuemeansthatthese
parts appear literally instead of being encoded. Multiple
binding
elements
can be specified.
•
service
definesacollectionofendpointsintermsofnested
port
elements
that expose bindings —a
port
element's
binding
attribute identifies a
binding
element. Furthermore, the
port
element identifies the service's
address; because we are dealing with a SOAP service,
port
contains a
soap:address
element whose
location
attribute specifies this address.
The
types
,
message
,and
portType
elementsareabstractdefinitionsoftheweb
service'sinterface.Theyformtheinterfacebetweenthewebserviceandanapplication.
The
binding
and
service
elementsprovideconcretedetailsonhowthisinterfaceis
mappedtomessagestransmittedoverthewire.JAX-WShandlesthesedetailsonbehalf
of the application.
STYLE AND USE
The
soap:binding
element's
style
attribute affects how a SOAP message's
Body
element is built by indicating whether the operation is document-oriented
(messages contain documents) —the value is
document
—orRPC-oriented (mes-
sagescontainparametersandreturnvalues)—thevalueis
rpc
.IdiscussSOAPmes-
sage architecture later in this chapter.
The
soap:body
element's
use
attribute indicates whether the WSDL document's
message
element's
part
childelementsdefinetheconcreteschemaofthemessage
—thevalueis
literal
—orareencodedviacertainencodingrules—thevalueis
encoded
.
When
use
is set to
literal
, each
part
element references a concrete schema
definitionusingeitherthe
element
or
type
attribute.For
element
,thereferen-
cedelementwillappeardirectlyundertheSOAPmessage's
Body
element(for
doc-
ument
style bindings) or under an accessor element named after the message part
(for
rpc
stylebindings).For
type
,thereferencedtypebecomestheschematypeof
theenclosingelement(
Body
for
document
styleorpartaccessorelementfor
rpc
style).