- All Implemented Interfaces:
Node
,SOAPBodyElement
,SOAPElement
,SOAPFault
,Element
,Node
- Direct Known Subclasses:
Fault1_1Impl
,Fault1_2Impl
-
Field Summary
Modifier and TypeFieldDescriptionprotected Detail
protected SOAPFaultElement
protected SOAPFaultElement
protected SOAPFaultElement
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
ModifierConstructorDescriptionprotected
FaultImpl
(SOAPDocumentImpl ownerDoc, NameImpl name) protected
FaultImpl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionCreates an optionalDetail
object and sets it as theDetail
object for thisSOAPFault
object.protected SOAPElement
addElement
(Name name) protected SOAPElement
addElement
(QName name) protected SOAPFaultElement
protected FaultElementImpl
addSOAPFaultElement
(String localName) protected abstract void
checkIfStandardFaultCode
(String faultCode, String uri) protected static QName
convertCodeToQName
(String code, SOAPElement codeContainingElement) protected SOAPElement
convertToSoapElement
(Element element) protected abstract DetailImpl
protected abstract FaultElementImpl
createSOAPFaultElement
(Name qname) protected abstract FaultElementImpl
createSOAPFaultElement
(String localName) protected abstract FaultElementImpl
createSOAPFaultElement
(QName qname) protected abstract void
finallySetFaultCode
(String faultcode) protected void
protected void
protected void
protected abstract QName
Returns the optional detail element for thisSOAPFault
object.protected abstract NameImpl
Gets the fault actor for thisSOAPFault
object.protected abstract NameImpl
protected abstract NameImpl
protected abstract NameImpl
boolean
Returns true if thisSOAPFault
has aDetail
subelement and false otherwise.protected void
protected abstract boolean
isStandardFaultElement
(String localName) protected static String
localeToXmlLang
(Locale locale) setElementQName
(QName newName) Changes the name of thisElement
tonewName
if possible.abstract void
setFaultActor
(String faultActor) Sets thisSOAPFault
object with the given fault actor.void
setFaultCode
(Name faultCodeQName) Sets thisSOAPFault
object with the given fault code.void
setFaultCode
(String faultCode) Sets thisSOAPFault
object with the give fault code.void
setFaultCode
(String faultCode, String prefix, String uri) void
setFaultCode
(QName faultCodeQName) Sets thisSOAPFault
object with the given fault code.protected static Locale
xmlLangToLocale
(String xmlLang) Convert an xml:lang attribute value into a Locale objectMethods inherited from class com.sun.xml.messaging.saaj.soap.impl.ElementImpl
addAttribute, addAttribute, addCDATA, addChildElement, 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, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
Methods inherited from interface jakarta.xml.soap.SOAPFault
addFaultReasonText, appendFaultSubcode, getFaultCode, getFaultCodeAsName, getFaultCodeAsQName, getFaultNode, getFaultReasonLocales, getFaultReasonText, getFaultReasonTexts, getFaultRole, getFaultString, getFaultStringLocale, getFaultSubcodes, removeAllFaultSubcodes, setFaultNode, setFaultRole, setFaultString, setFaultString
-
Field Details
-
faultStringElement
-
faultActorElement
-
faultCodeElement
-
detail
-
-
Constructor Details
-
FaultImpl
-
FaultImpl
-
-
Method Details
-
getDetailName
-
getFaultCodeName
-
getFaultStringName
-
getFaultActorName
-
createDetail
-
createSOAPFaultElement
-
createSOAPFaultElement
-
createSOAPFaultElement
-
checkIfStandardFaultCode
- Throws:
SOAPException
-
finallySetFaultCode
- Throws:
SOAPException
-
isStandardFaultElement
-
getDefaultFaultCode
-
findFaultCodeElement
protected void findFaultCodeElement() -
findFaultActorElement
protected void findFaultActorElement() -
findFaultStringElement
protected void findFaultStringElement() -
setFaultCode
Description copied from interface:SOAPFault
Sets thisSOAPFault
object with the give fault code.Fault codes, which given information about the fault, are defined in the SOAP 1.1 specification. This element is mandatory in SOAP 1.1. Because the fault code is required to be a QName it is preferable to use the
SOAPFault.setFaultCode(Name)
form of this method.- Specified by:
setFaultCode
in interfaceSOAPFault
- Parameters:
faultCode
- aString
giving the fault code to be set. It must be of the form "prefix:localName" where the prefix has been defined in a namespace declaration.- Throws:
SOAPException
- if there was an error in adding thefaultCode
to the underlying XML tree.- See Also:
-
setFaultCode
- Throws:
SOAPException
-
setFaultCode
Description copied from interface:SOAPFault
Sets thisSOAPFault
object with the given fault code.Fault codes, which give information about the fault, are defined in the SOAP 1.1 specification. A fault code is mandatory and must be of type
Name
. This method provides a convenient way to set a fault code. For example,SOAPEnvelope se = ...; // Create a qualified name in the SOAP namespace with a localName // of "Client". Note that prefix parameter is optional and is null // here which causes the implementation to use an appropriate prefix. Name qname = se.createName("Client", null, SOAPConstants.URI_NS_SOAP_ENVELOPE); SOAPFault fault = ...; fault.setFaultCode(qname);
SOAPFault.setFaultCode(String)
.- Specified by:
setFaultCode
in interfaceSOAPFault
- Parameters:
faultCodeQName
- aName
object giving the fault code to be set. It must be namespace qualified.- Throws:
SOAPException
- if there was an error in adding the faultcode element to the underlying XML tree.- See Also:
-
setFaultCode
Description copied from interface:SOAPFault
Sets thisSOAPFault
object with the given fault code.It is preferable to use this method over
SOAPFault.setFaultCode(Name)
.- Specified by:
setFaultCode
in interfaceSOAPFault
- Parameters:
faultCodeQName
- aQName
object giving the fault code to be set. It must be namespace qualified.- Throws:
SOAPException
- if there was an error in adding thefaultcode
element to the underlying XML tree.- See Also:
-
convertCodeToQName
-
initializeDetail
protected void initializeDetail() -
getDetail
Description copied from interface:SOAPFault
Returns the optional detail element for thisSOAPFault
object.A
Detail
object carries application-specific error information, the scope of the error information is restricted to faults in theSOAPBodyElement
objects if this is a SOAP 1.1 Fault. -
addDetail
Description copied from interface:SOAPFault
Creates an optionalDetail
object and sets it as theDetail
object for thisSOAPFault
object.It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.
- Specified by:
addDetail
in interfaceSOAPFault
- Returns:
- the new
Detail
object - Throws:
SOAPException
- if thisSOAPFault
object already contains a validDetail
object
-
hasDetail
public boolean hasDetail()Description copied from interface:SOAPFault
Returns true if thisSOAPFault
has aDetail
subelement and false otherwise. Equivalent to(getDetail()!=null)
. -
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
- 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:
-
getFaultActor
Description copied from interface:SOAPFault
Gets the fault actor for thisSOAPFault
object.If this
SOAPFault
supports SOAP 1.2 then this call is equivalent toSOAPFault.getFaultRole()
- Specified by:
getFaultActor
in interfaceSOAPFault
- Returns:
- a
String
giving the actor in the message path that caused thisSOAPFault
object - See Also:
-
setElementQName
Description copied from interface:SOAPElement
Changes the name of thisElement
tonewName
if possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody etc. cannot have their names changed using this method. Any attempt to do so will result in a SOAPException being thrown.Callers should not rely on the element instance being renamed as is. Implementations could end up copying the content of the
SOAPElement
to a renamed instance.- Specified by:
setElementQName
in interfaceSOAPElement
- Overrides:
setElementQName
in classElementImpl
- Parameters:
newName
- the new name for theElement
.- Returns:
- The renamed Node
- Throws:
SOAPException
- if changing the name of thisElement
is not allowed.
-
convertToSoapElement
- Overrides:
convertToSoapElement
in classElementImpl
-
addFaultCodeElement
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addSOAPFaultElement
- Throws:
SOAPException
-
xmlLangToLocale
Convert an xml:lang attribute value into a Locale object- Parameters:
xmlLang
- xml:lang attribute value- Returns:
- Locale
-
localeToXmlLang
-