- All Implemented Interfaces:
Node
,SOAPBodyElement
,SOAPElement
,SOAPFault
,Element
,Node
-
Field Summary
Fields inherited from class com.sun.xml.messaging.saaj.soap.impl.FaultImpl
detail, faultActorElement, faultCodeElement, faultStringElement
Fields inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
DSIG_NS, elementQName, WSU_NS, XENC_NS
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
ConstructorDescriptionFault1_1Impl
(SOAPDocumentImpl ownerDoc) Fault1_1Impl
(SOAPDocumentImpl ownerDocument, String prefix) Fault1_1Impl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionaddChildElement
(SOAPElement element) Add aSOAPElement
as a child of thisSOAPElement
instance.void
addFaultReasonText
(String text, Locale locale) Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived fromlocale
.void
appendFaultSubcode
(QName subcode) Adds a Subcode to the end of the sequence of Subcodes contained by thisSOAPFault
.protected void
checkIfStandardFaultCode
(String faultCode, String uri) protected DetailImpl
protected FaultElementImpl
createSOAPFaultElement
(Name qname) protected FaultElementImpl
createSOAPFaultElement
(String localName) protected FaultElementImpl
createSOAPFaultElement
(QName qname) protected void
finallySetFaultCode
(String faultcode) protected QName
protected NameImpl
protected NameImpl
Gets the fault code for thisSOAPFault
object.Gets the mandatory SOAP 1.1 fault code for thisSOAPFault
object as a SAAJName
object.Gets the fault code for thisSOAPFault
object as aQName
object.protected NameImpl
Returns the optional Node element value for thisSOAPFault
object.Returns anIterator
over a distinct sequence ofLocale
s for which there are associated Reason Text items.getFaultReasonText
(Locale locale) Returns the Reason Text associated with the givenLocale
.Returns anIterator
over a sequence ofString
objects containing all the Reason Text items for thisSOAPFault
.Returns the optional Role element value for thisSOAPFault
object.Gets the fault string for thisSOAPFault
object.Gets the locale of the fault string for thisSOAPFault
object.protected NameImpl
Gets the Subcodes for thisSOAPFault
as an iterator overQNames
.protected boolean
isStandardFaultElement
(String localName) void
Removes any Subcodes that may be contained by thisSOAPFault
.void
setFaultActor
(String faultActor) Sets thisSOAPFault
object with the given fault actor.void
setFaultCode
(String faultCode, String prefix, String uri) void
setFaultNode
(String uri) Creates or replaces any existing Node element value for thisSOAPFault
object.void
setFaultRole
(String uri) Creates or replaces any existing Role element value for thisSOAPFault
object.void
setFaultString
(String faultString) Sets the fault string for thisSOAPFault
object to the given string.void
setFaultString
(String faultString, Locale locale) Sets the fault string for thisSOAPFault
object to the given string and localized to the given locale.Methods inherited from class com.sun.xml.messaging.saaj.soap.impl.FaultImpl
addDetail, addElement, addElement, addFaultCodeElement, addSOAPFaultElement, convertCodeToQName, convertToSoapElement, findFaultActorElement, findFaultCodeElement, findFaultStringElement, getDetail, getFaultActor, hasDetail, initializeDetail, localeToXmlLang, setElementQName, setFaultCode, setFaultCode, setFaultCode, xmlLangToLocale
Methods inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
addAttribute, addAttribute, addCDATA, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addNode, addText, addTextNode, appendChild, cloneNode, compareDocumentPosition, convertToSoapText, createElement, createElement, createQName, detachNode, doGetNamespacePrefixes, ensureNamespaceIsDeclared, findAndConvertChildElement, findChild, findEncodingStyleAttributeName, getAllAttributes, getAllAttributesAsQNames, getAllAttributesFrom, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getAttributeValueFrom, getBaseURI, getChildElementNodes, getChildElements, getChildElements, getChildElements, getChildElementsFrom, getChildNodes, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, getFirstChild, getLastChild, getLocalName, getLocalPart, getNamespaceAttr, getNamespaceAttrFrom, getNamespaceContextNodes, getNamespaceContextNodes, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPrefix, getPreviousSibling, getQualifiedName, getSchemaTypeInfo, getSoapDocument, getSOAPNamespace, getTagName, getTextContent, getUserData, getValue, getValueNode, getValueNodeStrict, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importElement, insertBefore, isDefaultNamespace, isEqualNode, isNamespaceQualified, isNamespaceQualified, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, replaceChild, replaceElementWithSOAPElement, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setEncodingStyleNamespace, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setParentElement, setPrefix, setTextContent, setUserData, setValue, tryToFindEncodingStyleAttributeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
Methods inherited from interface jakarta.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
Methods inherited from interface jakarta.xml.soap.SOAPElement
addAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
-
Constructor Details
-
Fault1_1Impl
-
Fault1_1Impl
-
Fault1_1Impl
-
-
Method Details
-
getDetailName
- Specified by:
getDetailName
in classFaultImpl
-
getFaultCodeName
- Specified by:
getFaultCodeName
in classFaultImpl
-
getFaultStringName
- Specified by:
getFaultStringName
in classFaultImpl
-
getFaultActorName
- Specified by:
getFaultActorName
in classFaultImpl
-
createDetail
- Specified by:
createDetail
in classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElement
in classFaultImpl
-
checkIfStandardFaultCode
- Specified by:
checkIfStandardFaultCode
in classFaultImpl
- Throws:
SOAPException
-
finallySetFaultCode
- Specified by:
finallySetFaultCode
in classFaultImpl
- Throws:
SOAPException
-
getFaultCode
Description copied from interface:SOAPFault
Gets the fault code for thisSOAPFault
object.- Returns:
- a
String
with the fault code - See Also:
-
getFaultCodeAsName
Description copied from interface:SOAPFault
Gets the mandatory SOAP 1.1 fault code for thisSOAPFault
object as a SAAJName
object. The SOAP 1.1 specification requires the value of the "faultcode" element to be of type QName. This method returns the content of the element as a QName in the form of a SAAJ Name object. This method should be used instead of thegetFaultCode
method since it allows applications to easily access the namespace name without additional parsing.- Returns:
- a
Name
representing the faultcode - See Also:
-
getFaultCodeAsQName
Description copied from interface:SOAPFault
Gets the fault code for thisSOAPFault
object as aQName
object.- Returns:
- a
QName
representing the faultcode - See Also:
-
setFaultString
Description copied from interface:SOAPFault
Sets the fault string for thisSOAPFault
object to the given string.If this
SOAPFault
is part of a message that supports SOAP 1.2 then this call is equivalent to:addFaultReasonText(faultString, Locale.getDefault());
- Parameters:
faultString
- aString
giving an explanation of the fault- Throws:
SOAPException
- if there was an error in adding thefaultString
to the underlying XML tree.- See Also:
-
getFaultString
Description copied from interface:SOAPFault
Gets the fault string for thisSOAPFault
object.If this
SOAPFault
is part of a message that supports SOAP 1.2 then this call is equivalent to:String reason = null; try { reason = (String) getFaultReasonTexts().next(); } catch (SOAPException e) {} return reason;
- Returns:
- a
String
giving an explanation of the fault - See Also:
-
getFaultStringLocale
Description copied from interface:SOAPFault
Gets the locale of the fault string for thisSOAPFault
object.If this
SOAPFault
is part of a message that supports SOAP 1.2 then this call is equivalent to:Locale locale = null; try { locale = (Locale) getFaultReasonLocales().next(); } catch (SOAPException e) {} return locale;
- Returns:
- a
Locale
object indicating the native language of the fault string ornull
if no locale was specified - See Also:
-
setFaultString
Description copied from interface:SOAPFault
Sets the fault string for thisSOAPFault
object to the given string and localized to the given locale.If this
SOAPFault
is part of a message that supports SOAP 1.2 then this call is equivalent to:addFaultReasonText(faultString, locale);
- Parameters:
faultString
- aString
giving an explanation of the faultlocale
- aLocale
object indicating the native language of thefaultString
- Throws:
SOAPException
- if there was an error in adding thefaultString
to the underlying XML tree.- See Also:
-
isStandardFaultElement
- Specified by:
isStandardFaultElement
in classFaultImpl
-
appendFaultSubcode
Description copied from interface:SOAPFault
Adds a Subcode to the end of the sequence of Subcodes contained by thisSOAPFault
. Subcodes, which were introduced in SOAP 1.2, are represented by a recursive sequence of subelements rooted in the mandatory Code subelement of a SOAP Fault.- Parameters:
subcode
- a QName containing the Value of the Subcode.
-
removeAllFaultSubcodes
public void removeAllFaultSubcodes()Description copied from interface:SOAPFault
Removes any Subcodes that may be contained by thisSOAPFault
. Subsequent calls togetFaultSubcodes
will return an empty iterator until a call toappendFaultSubcode
is made. -
getFaultSubcodes
Description copied from interface:SOAPFault
Gets the Subcodes for thisSOAPFault
as an iterator overQNames
.- Returns:
- an
Iterator
that accesses a sequence ofQNames
. ThisIterator
should not support the optionalremove
method. The order in which the Subcodes are returned reflects the hierarchy of Subcodes present in the fault from top to bottom.
-
getFaultReasonText
Description copied from interface:SOAPFault
Returns the Reason Text associated with the givenLocale
. If more than one such Reason Text exists the first matching Text is returned- Parameters:
locale
- -- theLocale
for which a localized Reason Text is desired- Returns:
- the Reason Text associated with
locale
- See Also:
-
getFaultReasonTexts
Description copied from interface:SOAPFault
Returns anIterator
over a sequence ofString
objects containing all the Reason Text items for thisSOAPFault
.- Returns:
- an
Iterator
over env:Fault/env:Reason/env:Text items.
-
getFaultReasonLocales
Description copied from interface:SOAPFault
Returns anIterator
over a distinct sequence ofLocale
s for which there are associated Reason Text items. Any of theseLocale
s can be used in a call togetFaultReasonText
in order to obtain a localized version of the Reason Text string.- Returns:
- an
Iterator
over a sequence ofLocale
objects for which there are associated Reason Text items.
-
addFaultReasonText
Description copied from interface:SOAPFault
Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived fromlocale
. If a Reason Text item with this xml:lang already exists its text value will be replaced withtext
. Thelocale
parameter should not benull
Code sample:
SOAPFault fault = ...; fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
- Parameters:
text
- -- reason message stringlocale
- -- Locale object representing the locale of the message- Throws:
SOAPException
- if there was an error in adding the Reason text or thelocale
passed wasnull
.
-
getFaultRole
Description copied from interface:SOAPFault
Returns the optional Role element value for thisSOAPFault
object. The Role element is optional in SOAP 1.2.- Returns:
- Content of the env:Fault/env:Role element as a String
or
null
if none
-
setFaultRole
Description copied from interface:SOAPFault
Creates or replaces any existing Role element value for thisSOAPFault
object. The Role element is optional in SOAP 1.2.- Parameters:
uri
- the URI of the Role
-
getFaultNode
Description copied from interface:SOAPFault
Returns the optional Node element value for thisSOAPFault
object. The Node element is optional in SOAP 1.2.- Returns:
- Content of the env:Fault/env:Node element as a String
or
null
if none
-
setFaultNode
Description copied from interface:SOAPFault
Creates or replaces any existing Node element value for thisSOAPFault
object. The Node element is optional in SOAP 1.2.- Parameters:
uri
- the URI of the Node
-
getDefaultFaultCode
- Specified by:
getDefaultFaultCode
in classFaultImpl
-
addChildElement
Description copied from interface:SOAPElement
Add aSOAPElement
as a child of thisSOAPElement
instance. TheSOAPElement
is expected to be created by aSOAPFactory
. Callers should not rely on the element instance being added as is into the XML tree. Implementations could end up copying the content of theSOAPElement
passed into an instance of a differentSOAPElement
implementation. For instance ifaddChildElement()
is called on aSOAPHeader
,element
will be copied into an instance of aSOAPHeaderElement
.The fragment rooted in
element
is either added as a whole or not at all, if there was an error.The fragment rooted in
element
cannot contain elements named "Envelope", "Header" or "Body" and in the SOAP namespace. Any namespace prefixes present in the fragment should be fully resolved using appropriate namespace declarations within the fragment itself.- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classElementImpl
- Parameters:
element
- theSOAPElement
to be added as a new child- Returns:
- an instance representing the new SOAP element that was actually added to the tree.
- Throws:
SOAPException
- if there was an error in adding this element as a child
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElement
in classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElement
in classFaultImpl
-
setFaultCode
- Overrides:
setFaultCode
in classFaultImpl
- Throws:
SOAPException
-
setFaultActor
Description copied from interface:SOAPFault
Sets thisSOAPFault
object with the given fault actor.The fault actor is the recipient in the message path who caused the fault to happen.
If this
SOAPFault
supports SOAP 1.2 then this call is equivalent toSOAPFault.setFaultRole(String)
- Specified by:
setFaultActor
in interfaceSOAPFault
- Specified by:
setFaultActor
in classFaultImpl
- Parameters:
faultActor
- aString
identifying the actor that caused thisSOAPFault
object- Throws:
SOAPException
- if there was an error in adding thefaultActor
to the underlying XML tree.- See Also:
-