- All Implemented Interfaces:
Node
,SOAPBody
,SOAPBodyElement
,SOAPElement
,Element
,Node
- Direct Known Subclasses:
Body1_1Impl
,Body1_2Impl
-
Field Summary
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
BodyImpl
(SOAPDocumentImpl ownerDoc, NameImpl bodyName) protected
BodyImpl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionaddBodyElement
(Name name) Creates a newSOAPBodyElement
object with the specified name and adds it to thisSOAPBody
object.addBodyElement
(QName qname) Creates a newSOAPBodyElement
object with the specified QName and adds it to thisSOAPBody
object.addDocument
(Document document) Adds the root node of the DOMDocument
to thisSOAPBody
object.protected SOAPElement
addElement
(Name name) protected SOAPElement
addElement
(QName name) addFault()
Creates a newSOAPFault
object and adds it to thisSOAPBody
object.Creates a newSOAPFault
object and adds it to thisSOAPBody
object.Creates a newSOAPFault
object and adds it to thisSOAPBody
object.Creates a newSOAPFault
object and adds it to thisSOAPBody
object.Creates a newSOAPFault
object and adds it to thisSOAPBody
object.protected SOAPElement
convertToSoapElement
(Element element) protected abstract SOAPBodyElement
createBodyElement
(Name name) protected abstract SOAPBodyElement
createBodyElement
(QName name) protected abstract SOAPFault
Creates a new DOMDocument
and sets the first child of thisSOAPBody
as it's document element.protected SOAPElement
protected abstract QName
getFault()
Returns theSOAPFault
object in thisSOAPBody
object.protected abstract NameImpl
getFaultName
(String name) boolean
boolean
hasFault()
Indicates whether aSOAPFault
object exists in thisSOAPBody
object.protected abstract boolean
isFault
(SOAPElement child) boolean
isLazy()
setElementQName
(QName newName) Changes the name of thisElement
tonewName
if possible.void
setParentElement
(SOAPElement element) Sets the parent of thisNode
object to the givenSOAPElement
object.Methods 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, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, 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, 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, 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, setValue
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, 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
-
Constructor Details
-
BodyImpl
-
BodyImpl
-
-
Method Details
-
getFaultName
-
isFault
-
createBodyElement
-
createBodyElement
-
createFaultElement
-
getDefaultFaultCode
-
addFault
Description copied from interface:SOAPBody
Creates a newSOAPFault
object and adds it to thisSOAPBody
object. The newSOAPFault
will have default values set for the mandatory child elements. The type of theSOAPFault
will be a SOAP 1.1 or a SOAP 1.2SOAPFault
depending on theprotocol
specified while creating theMessageFactory
instance.A
SOAPBody
may contain at most oneSOAPFault
child element.- Specified by:
addFault
in interfaceSOAPBody
- Returns:
- the new
SOAPFault
object - Throws:
SOAPException
- if there is a SOAP error
-
addFault
Description copied from interface:SOAPBody
Creates a newSOAPFault
object and adds it to thisSOAPBody
object. The type of theSOAPFault
will be a SOAP 1.1 or a SOAP 1.2SOAPFault
depending on theprotocol
specified while creating theMessageFactory
instance.For SOAP 1.2 the
faultCode
parameter is the value of the Fault/Code/Value element and thefaultString
parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 thefaultCode
parameter is the value of thefaultcode
element and thefaultString
parameter is the value of thefaultstring
element.A
SOAPBody
may contain at most oneSOAPFault
child element.- Specified by:
addFault
in interfaceSOAPBody
- Parameters:
faultCode
- aName
object giving the fault code to be set; must be one of the fault codes defined in the Version of SOAP specification in usefaultString
- aString
giving an explanation of the faultlocale
- aLocale
object indicating the native language of thefaultString
- Returns:
- the new
SOAPFault
object - Throws:
SOAPException
- if there is a SOAP error- See Also:
-
addFault
Description copied from interface:SOAPBody
Creates a newSOAPFault
object and adds it to thisSOAPBody
object. The type of theSOAPFault
will be a SOAP 1.1 or a SOAP 1.2SOAPFault
depending on theprotocol
specified while creating theMessageFactory
instance.For SOAP 1.2 the
faultCode
parameter is the value of the Fault/Code/Value element and thefaultString
parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 thefaultCode
parameter is the value of thefaultcode
element and thefaultString
parameter is the value of thefaultstring
element.A
SOAPBody
may contain at most oneSOAPFault
child element.- Specified by:
addFault
in interfaceSOAPBody
- Parameters:
faultCode
- aQName
object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in use.faultString
- aString
giving an explanation of the faultlocale
- aLocale
object indicating the native language of thefaultString
- Returns:
- the new
SOAPFault
object - Throws:
SOAPException
- if there is a SOAP error- See Also:
-
addFault
Description copied from interface:SOAPBody
Creates a newSOAPFault
object and adds it to thisSOAPBody
object. The type of theSOAPFault
will be a SOAP 1.1 or a SOAP 1.2SOAPFault
depending on theprotocol
specified while creating theMessageFactory
instance.For SOAP 1.2 the
faultCode
parameter is the value of the Fault/Code/Value element and thefaultString
parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 thefaultCode
parameter is the value of the faultcode element and thefaultString
parameter is the value of the faultstring element.In case of a SOAP 1.2 fault, the default value for the mandatory
xml:lang
attribute on the Fault/Reason/Text element will be set tojava.util.Locale.getDefault()
A
SOAPBody
may contain at most oneSOAPFault
child element.- Specified by:
addFault
in interfaceSOAPBody
- Parameters:
faultCode
- aName
object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in usefaultString
- aString
giving an explanation of the fault- Returns:
- the new
SOAPFault
object - Throws:
SOAPException
- if there is a SOAP error- See Also:
-
addFault
Description copied from interface:SOAPBody
Creates a newSOAPFault
object and adds it to thisSOAPBody
object. The type of theSOAPFault
will be a SOAP 1.1 or a SOAP 1.2SOAPFault
depending on theprotocol
specified while creating theMessageFactory
instance.For SOAP 1.2 the
faultCode
parameter is the value of the Fault/Code/Value element and thefaultString
parameter is the value of the Fault/Reason/Text element. For SOAP 1.1 thefaultCode
parameter is the value of the faultcode element and thefaultString
parameter is the value of the faultstring element.In case of a SOAP 1.2 fault, the default value for the mandatory
xml:lang
attribute on the Fault/Reason/Text element will be set tojava.util.Locale.getDefault()
A
SOAPBody
may contain at most oneSOAPFault
child element- Specified by:
addFault
in interfaceSOAPBody
- Parameters:
faultCode
- aQName
object giving the fault code to be set; must be one of the fault codes defined in the version of SOAP specification in usefaultString
- aString
giving an explanation of the fault- Returns:
- the new
SOAPFault
object - Throws:
SOAPException
- if there is a SOAP error- See Also:
-
findFault
-
hasFault
public boolean hasFault()Description copied from interface:SOAPBody
Indicates whether aSOAPFault
object exists in thisSOAPBody
object. -
getFault
Description copied from interface:SOAPBody
Returns theSOAPFault
object in thisSOAPBody
object. -
addBodyElement
Description copied from interface:SOAPBody
Creates a newSOAPBodyElement
object with the specified name and adds it to thisSOAPBody
object.- Specified by:
addBodyElement
in interfaceSOAPBody
- Parameters:
name
- aName
object with the name for the newSOAPBodyElement
object- Returns:
- the new
SOAPBodyElement
object - Throws:
SOAPException
- if a SOAP error occurs- See Also:
-
addBodyElement
Description copied from interface:SOAPBody
Creates a newSOAPBodyElement
object with the specified QName and adds it to thisSOAPBody
object.- Specified by:
addBodyElement
in interfaceSOAPBody
- Parameters:
qname
- aQName
object with the qname for the newSOAPBodyElement
object- Returns:
- the new
SOAPBodyElement
object - Throws:
SOAPException
- if a SOAP error occurs- See Also:
-
setParentElement
Description copied from interface:Node
Sets the parent of thisNode
object to the givenSOAPElement
object.- Specified by:
setParentElement
in interfaceNode
- Overrides:
setParentElement
in classElementImpl
- Parameters:
element
- theSOAPElement
object to be set as the parent of thisNode
object- Throws:
SOAPException
- if there is a problem in setting the parent to the given element- See Also:
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addDocument
Description copied from interface:SOAPBody
Adds the root node of the DOMDocument
to thisSOAPBody
object.Calling this method invalidates the
document
parameter. The client application should discard all references to thisDocument
and its contents upon callingaddDocument
. The behavior of an application that continues to use such references is undefined.- Specified by:
addDocument
in interfaceSOAPBody
- Parameters:
document
- theDocument
object whose root node will be added to thisSOAPBody
.- Returns:
- the
SOAPBodyElement
that represents the root node that was added. - Throws:
SOAPException
- if theDocument
cannot be added
-
convertToSoapElement
- Overrides:
convertToSoapElement
in classElementImpl
-
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.
-
extractContentAsDocument
Description copied from interface:SOAPBody
Creates a new DOMDocument
and sets the first child of thisSOAPBody
as it's document element. The childSOAPElement
is removed as part of the process.- Specified by:
extractContentAsDocument
in interfaceSOAPBody
- Returns:
- the
Document
representation of theSOAPBody
content. - Throws:
SOAPException
- if there is not exactly one childSOAPElement
of theSOAPBody
.
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
- Overrides:
hasChildNodes
in classElementImpl
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
- Overrides:
getChildNodes
in classElementImpl
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
- Overrides:
getFirstChild
in classElementImpl
-
getFirstChildNoMaterialize
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
- Overrides:
getLastChild
in classElementImpl
-
isLazy
public boolean isLazy()
-