- 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, faultStringElementFields inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
DSIG_NS, elementQName, WSU_NS, XENC_NSFields 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
ConstructorsConstructorDescriptionFault1_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 thisSOAPElementobject.addAttribute(QName name, String value) Adds an attribute with the specified name and value to thisSOAPElementobject.addChildElement(SOAPElement element) Add aSOAPElementas a child of thisSOAPElementinstance.voidaddFaultReasonText(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 newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.voidappendFaultSubcode(QName subcode) Adds a Subcode to the end of the sequence of Subcodes contained by thisSOAPFault.protected voidcheckIfStandardFaultCode(String faultCode, String uri) protected DetailImplprotected FaultElementImplcreateSOAPFaultElement(Name qname) protected FaultElementImplcreateSOAPFaultElement(String localName) protected FaultElementImplcreateSOAPFaultElement(QName qname) protected voidfinallySetFaultCode(String faultcode) protected QNameprotected NameImplprotected NameImplGets the fault code for thisSOAPFaultobject.Gets the mandatory SOAP 1.1 fault code for thisSOAPFaultobject as a SAAJNameobject.Gets the fault code for thisSOAPFaultobject as aQNameobject.protected NameImplReturns the optional Node element value for thisSOAPFaultobject.Returns anIteratorover a distinct sequence ofLocales for which there are associated Reason Text items.getFaultReasonText(Locale locale) Returns the Reason Text associated with the givenLocale.Returns anIteratorover a sequence ofStringobjects containing all the Reason Text items for thisSOAPFault.Returns the optional Role element value for thisSOAPFaultobject.Gets the fault string for thisSOAPFaultobject.Gets the locale of the fault string for thisSOAPFaultobject.protected NameImplGets the Subcodes for thisSOAPFaultas an iterator overQNames.protected booleanisStandardFaultElement(String localName) voidRemoves any Subcodes that may be contained by thisSOAPFault.voidsetEncodingStyle(String encodingStyle) Sets the encoding style for thisSOAPElementobject to one specified.voidsetFaultActor(String faultActor) Sets thisSOAPFaultobject with the given fault actor.voidsetFaultNode(String uri) Creates or replaces any existing Node element value for thisSOAPFaultobject.voidsetFaultRole(String uri) Creates or replaces any existing Role element value for thisSOAPFaultobject.voidsetFaultString(String faultString) Sets the fault string for thisSOAPFaultobject to the given string.voidsetFaultString(String faultString, Locale locale) Sets the fault string for thisSOAPFaultobject 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, xmlLangToLocaleMethods 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, tryToFindEncodingStyleAttributeNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, setIdAttributeNSMethods inherited from interface jakarta.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValueMethods 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, setUserDataMethods 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:
getDetailNamein classFaultImpl
-
getFaultCodeName
- Specified by:
getFaultCodeNamein classFaultImpl
-
getFaultStringName
- Specified by:
getFaultStringNamein classFaultImpl
-
getFaultActorName
- Specified by:
getFaultActorNamein classFaultImpl
-
createDetail
- Specified by:
createDetailin classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElementin classFaultImpl
-
checkIfStandardFaultCode
- Specified by:
checkIfStandardFaultCodein classFaultImpl- Throws:
SOAPException
-
finallySetFaultCode
- Specified by:
finallySetFaultCodein classFaultImpl- Throws:
SOAPException
-
getFaultReasonTexts
Description copied from interface:SOAPFaultReturns anIteratorover a sequence ofStringobjects containing all the Reason Text items for thisSOAPFault.- Returns:
- an
Iteratorover 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:SOAPFaultAppends 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. Thelocaleparameter should not benullCode 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 thelocalepassed wasnull.
-
getFaultReasonText
Description copied from interface:SOAPFaultReturns the Reason Text associated with the givenLocale. If more than one such Reason Text exists the first matching Text is returned- Parameters:
locale- -- theLocalefor 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:SOAPFaultReturns anIteratorover a distinct sequence ofLocales for which there are associated Reason Text items. Any of theseLocales can be used in a call togetFaultReasonTextin order to obtain a localized version of the Reason Text string.- Returns:
- an
Iteratorover a sequence ofLocaleobjects 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:SOAPFaultGets the locale of the fault string for thisSOAPFaultobject.If this
SOAPFaultis 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
Localeobject indicating the native language of the fault string ornullif no locale was specified - See Also:
-
getFaultNode
Description copied from interface:SOAPFaultReturns the optional Node element value for thisSOAPFaultobject. The Node element is optional in SOAP 1.2.- Returns:
- Content of the env:Fault/env:Node element as a String
or
nullif none
-
setFaultNode
Description copied from interface:SOAPFaultCreates or replaces any existing Node element value for thisSOAPFaultobject. 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 thisSOAPFaultobject.
-
getFaultRole
Description copied from interface:SOAPFaultReturns the optional Role element value for thisSOAPFaultobject. The Role element is optional in SOAP 1.2.- Returns:
- Content of the env:Fault/env:Role element as a String
or
nullif none
-
setFaultRole
Description copied from interface:SOAPFaultCreates or replaces any existing Role element value for thisSOAPFaultobject. 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 thisSOAPFaultobject.
-
getFaultCode
Description copied from interface:SOAPFaultGets the fault code for thisSOAPFaultobject.- Returns:
- a
Stringwith the fault code - See Also:
-
getFaultCodeAsQName
Description copied from interface:SOAPFaultGets the fault code for thisSOAPFaultobject as aQNameobject.- Returns:
- a
QNamerepresenting the faultcode - See Also:
-
getFaultCodeAsName
Description copied from interface:SOAPFaultGets the mandatory SOAP 1.1 fault code for thisSOAPFaultobject as a SAAJNameobject. 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 thegetFaultCodemethod since it allows applications to easily access the namespace name without additional parsing.- Returns:
- a
Namerepresenting the faultcode - See Also:
-
getFaultString
Description copied from interface:SOAPFaultGets the fault string for thisSOAPFaultobject.If this
SOAPFaultis 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
Stringgiving an explanation of the fault - See Also:
-
setFaultString
Description copied from interface:SOAPFaultSets the fault string for thisSOAPFaultobject to the given string.If this
SOAPFaultis part of a message that supports SOAP 1.2 then this call is equivalent to:addFaultReasonText(faultString, Locale.getDefault());- Parameters:
faultString- aStringgiving an explanation of the fault- Throws:
SOAPException- if there was an error in adding thefaultStringto the underlying XML tree.- See Also:
-
setFaultString
Description copied from interface:SOAPFaultSets the fault string for thisSOAPFaultobject to the given string and localized to the given locale.If this
SOAPFaultis part of a message that supports SOAP 1.2 then this call is equivalent to:addFaultReasonText(faultString, locale);- Parameters:
faultString- aStringgiving an explanation of the faultlocale- aLocaleobject indicating the native language of thefaultString- Throws:
SOAPException- if there was an error in adding thefaultStringto the underlying XML tree.- See Also:
-
appendFaultSubcode
Description copied from interface:SOAPFaultAdds 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:SOAPFaultRemoves any Subcodes that may be contained by thisSOAPFault. Subsequent calls togetFaultSubcodeswill return an empty iterator until a call toappendFaultSubcodeis made. -
getFaultSubcodes
Description copied from interface:SOAPFaultGets the Subcodes for thisSOAPFaultas an iterator overQNames.- Returns:
- an
Iteratorthat accesses a sequence ofQNames. ThisIteratorshould not support the optionalremovemethod. 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:SOAPElementSets the encoding style for thisSOAPElementobject to one specified.- Specified by:
setEncodingStylein interfaceSOAPElement- Overrides:
setEncodingStylein classElementImpl- Parameters:
encodingStyle- aStringgiving the encoding style- Throws:
SOAPException- if setting the encodingStyle is invalid for this SOAPElement.- See Also:
-
addAttribute
Description copied from interface:SOAPElementAdds an attribute with the specified name and value to thisSOAPElementobject.- Specified by:
addAttributein interfaceSOAPElement- Overrides:
addAttributein classElementImpl- Parameters:
name- aNameobject with the name of the attributevalue- aStringgiving the value of the attribute- Returns:
- the
SOAPElementobject 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 withNamenameon this SOAPElement.- See Also:
-
addAttribute
Description copied from interface:SOAPElementAdds an attribute with the specified name and value to thisSOAPElementobject.- Specified by:
addAttributein interfaceSOAPElement- Overrides:
addAttributein classElementImpl- Parameters:
name- aQNameobject with the name of the attributevalue- aStringgiving the value of the attribute- Returns:
- the
SOAPElementobject 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 withQNameqnameon this SOAPElement.- See Also:
-
addTextNode
Description copied from interface:SOAPElementCreates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfaceSOAPElement- Overrides:
addTextNodein classElementImpl- Parameters:
text- aStringobject with the textual content to be added- Returns:
- the
SOAPElementobject into which the newTextobject was inserted - Throws:
SOAPException- if there is an error in creating the newTextobject or if it is not legal to attach it as a child to thisSOAPElement
-
addChildElement
Description copied from interface:SOAPElementAdd aSOAPElementas a child of thisSOAPElementinstance. TheSOAPElementis 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 theSOAPElementpassed into an instance of a differentSOAPElementimplementation. For instance ifaddChildElement()is called on aSOAPHeader,elementwill be copied into an instance of aSOAPHeaderElement.The fragment rooted in
elementis either added as a whole or not at all, if there was an error.The fragment rooted in
elementcannot 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:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classElementImpl- Parameters:
element- theSOAPElementto 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:
isStandardFaultElementin classFaultImpl
-
getDefaultFaultCode
- Specified by:
getDefaultFaultCodein classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElementin classFaultImpl
-
createSOAPFaultElement
- Specified by:
createSOAPFaultElementin classFaultImpl
-
setFaultActor
Description copied from interface:SOAPFaultSets thisSOAPFaultobject with the given fault actor.The fault actor is the recipient in the message path who caused the fault to happen.
If this
SOAPFaultsupports SOAP 1.2 then this call is equivalent toSOAPFault.setFaultRole(String)- Specified by:
setFaultActorin interfaceSOAPFault- Specified by:
setFaultActorin classFaultImpl- Parameters:
faultActor- aStringidentifying the actor that caused thisSOAPFaultobject- Throws:
SOAPException- if there was an error in adding thefaultActorto the underlying XML tree.- See Also:
-