- 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_2Impl
(SOAPDocumentImpl ownerDocument) Fault1_2Impl
(SOAPDocumentImpl ownerDocument, String prefix) Fault1_2Impl
(SOAPDocumentImpl ownerDoc, String name, String prefix) Fault1_2Impl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(Name name, String value) Adds an attribute with the specified name and value to thisSOAPElement
object.addAttribute
(QName name, String value) Adds an attribute with the specified name and value to thisSOAPElement
object.addChildElement
(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
.addTextNode
(String text) Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.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
setEncodingStyle
(String encodingStyle) Sets the encoding style for thisSOAPElement
object to one specified.void
setFaultActor
(String faultActor) Sets thisSOAPFault
object with the given fault actor.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, setFaultCode, xmlLangToLocale
Methods inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
addCDATA, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addNode, addText, 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, 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
addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration
-
Constructor Details
-
Fault1_2Impl
-
Fault1_2Impl
-
Fault1_2Impl
-
Fault1_2Impl
-
-
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
-
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. - Throws:
SOAPException
- if there was an error in retrieving the fault Reason texts.
-
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
.
-
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
- Throws:
SOAPException
- if there was an error in retrieving the fault Reason text for the specified locale .- See Also:
-
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. - Throws:
SOAPException
- if there was an error in retrieving the fault Reason locales.
-
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:
-
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- Throws:
SOAPException
- if there was an error in setting the Node for thisSOAPFault
object.
-
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- Throws:
SOAPException
- if there was an error in setting the Role for thisSOAPFault
object.
-
getFaultCode
Description copied from interface:SOAPFault
Gets the fault code for thisSOAPFault
object.- Returns:
- a
String
with the fault code - 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:
-
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:
-
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:
-
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:
-
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:
-
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.- Throws:
SOAPException
- if there was an error in setting 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.
-
setEncodingStyle
Description copied from interface:SOAPElement
Sets the encoding style for thisSOAPElement
object to one specified.- Specified by:
setEncodingStyle
in interfaceSOAPElement
- Overrides:
setEncodingStyle
in classElementImpl
- Parameters:
encodingStyle
- aString
giving the encoding style- Throws:
SOAPException
- if setting the encodingStyle is invalid for this SOAPElement.- See Also:
-
addAttribute
Description copied from interface:SOAPElement
Adds an attribute with the specified name and value to thisSOAPElement
object.- Specified by:
addAttribute
in interfaceSOAPElement
- Overrides:
addAttribute
in classElementImpl
- Parameters:
name
- aName
object with the name of the attributevalue
- aString
giving the value of the attribute- Returns:
- the
SOAPElement
object into which the attribute was inserted - Throws:
SOAPException
- if there is an error in creating the Attribute, or it is invalid to set an attribute withName
name
on this SOAPElement.- See Also:
-
addAttribute
Description copied from interface:SOAPElement
Adds an attribute with the specified name and value to thisSOAPElement
object.- Specified by:
addAttribute
in interfaceSOAPElement
- Overrides:
addAttribute
in classElementImpl
- Parameters:
name
- aQName
object with the name of the attributevalue
- aString
giving the value of the attribute- Returns:
- the
SOAPElement
object into which the attribute was inserted - Throws:
SOAPException
- if there is an error in creating the Attribute, or it is invalid to set an attribute withQName
qname
on this SOAPElement.- See Also:
-
addTextNode
Description copied from interface:SOAPElement
Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.- Specified by:
addTextNode
in interfaceSOAPElement
- Overrides:
addTextNode
in classElementImpl
- Parameters:
text
- aString
object with the textual content to be added- Returns:
- the
SOAPElement
object into which the newText
object was inserted - Throws:
SOAPException
- if there is an error in creating the newText
object or if it is not legal to attach it as a child to thisSOAPElement
-
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
-
isStandardFaultElement
- Specified by:
isStandardFaultElement
in classFaultImpl
-
getDefaultFaultCode
- Specified by:
getDefaultFaultCode
in classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElement
in classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElement
in classFaultImpl
-
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:
-