Retrieving Fault Information
U
SING
SOAP F
AULTS
149
DetailEntry entry = detail.addDetailEntry(entryName);
entry.addTextNode("Quantity element does not have a value");
QName entryName2 =
new QName("http://gizmos.com/orders/", "order", "PO");
DetailEntry entry2 = detail.addDetailEntry(entryName2);
entry2.addTextNode("Incomplete address: no zip code");
Retrieving Fault Information
Just as the
SOAPFault
interface provides convenience methods for adding infor-
mation, it also provides convenience methods for retrieving that information.
Table 51 SOAP Fault Code Values
SOAP 1.1
SOAP 1.2
Description
VersionMismatch
VersionMismatch
The namespace or local name for a
SOAPEn-
velope
object was invalid.
MustUnderstand
MustUnderstand
An immediate child element of a
SOAP-
Header
object had its
mustUnderstand
attribute set to
true
, and the processing party
did not understand the element or did not obey
it.
Client
Sender
The
SOAPMessage
object was not formed
correctly or did not contain the information
needed to succeed.
Server
Receiver
The
SOAPMessage
object could not be pro-
cessed because of a processing error, not
because of a problem with the message itself.
N/A
DataEncodingUnknown
A SOAP header block or SOAP body child
element information item targeted at the fault-
ing SOAP node is scoped with a data encod-
ing that the faulting node does not support.