background image

Running SOAPFaultTest

<< Running the SOAP Fault Example | Further Information about SAAJ >>
<< Running the SOAP Fault Example | Further Information about SAAJ >>

Running SOAPFaultTest

</SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP fault contains:
Fault code = {http://schemas.xmlsoap.org/soap/envelope/}Client
Local name = Client
Namespace prefix = SOAP-ENV, bound to http://schemas.xmlsoap.org/soap/envelope/
Fault string = Message does not have necessary info
Fault actor = http://gizmos.com/order
Detail entry = Quantity element does not have a value
Detail entry = Incomplete address: no zip code
When you run SOAPFaultTest to generate a SOAP 1.2 message, the output looks like this:
Here is what the XML message looks like:
<env:Envelope xmlns:env=
"http://www.w3.org/2003/05/soap-envelope">
<env:Header/><env:Body>
<env:Fault>
<env:Code><env:Value>env:Sender</env:Value></env:Code>
<env:Reason><env:Text xml:lang=
"en-US">
Message does not have necessary info
</env:Text></env:Reason>
<env:Role>http://gizmos.com/order</env:Role>
<env:Detail>
<PO:order xmlns:PO=
"http://gizmos.com/orders/">
Quantity element does not have a value</PO:order>
<PO:confirmation xmlns:PO=
"http://gizmos.com/confirm">
Incomplete address: no zip code</PO:confirmation>
</env:Detail></env:Fault>
</env:Body></env:Envelope>
SOAP fault contains:
Fault code = {http://www.w3.org/2003/05/soap-envelope}Sender
Local name = Sender
Namespace prefix = env, bound to http://www.w3.org/2003/05/soap-envelope
Fault reason text = Message does not have necessary info
Fault role = http://gizmos.com/order
Detail entry = Quantity element does not have a value
Detail entry = Incomplete address: no zip code
Code Examples
The Java EE 5 Tutorial · September 2007
626