Java Reference
In-Depth Information
Reason : This mandatory element provides information about the fault in a
human-readableformat. Reason containsoneormore Text elements,eachof
which contains information about the fault in a different language.
Node : This element contains the URI of the SOAP node that generated the
fault.ASOAPnodethatisnottheultimateSOAPreceivermustinclude Node
when creating a fault; an ultimate SOAP receiver doesn't have to include this
element, but might choose to do so.
Role :ThiselementcontainsaURIthatidentifiestherolethenodewasoperat-
ing in when the fault occurred.
Detail :Thisoptionalelementcontainsapplication-specificerrorinformation
relatedtotheSOAPfaultcodesdescribingthefault.Itspresencehasnosigni-
ficance as to which parts of the faulty SOAP message were processed.
Listing 11-16 presents an example SOAP message.
Listing 11-16. A SOAP message for calling a SOAP-based library web service's getTitle()
function to retrieve a book's title when given its ISBN
<SOAP-ENV:Envelope
xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/xmls-
chema"
xmlns:xsi="http://www.w3.org/2001/
xmlschema-instance">
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<lns:getTitle
xmlns:lns="http://tutortutor.ca/lib-
rary">
<isbn xsi:type="xsd:string">9781430234135</isbn>
</lns:getTitle>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This SOAP message describes a request to a library web service to execute its
getTitle() function.Furthermore,itdescribesthetypeandvalueoftheISBNargu-
ment passed to this function's isbn parameter.
The message begins with the SOAP-ENV -prefixed <Envelope> tag, which de-
scribes the SOAP message's envelope. The commonly used SOAP-ENV prefix corres-
Search WWH ::




Custom Search