Package org.apache.axis2.saaj
Class SOAPBodyImpl
java.lang.Object
org.apache.axis2.saaj.ProxyNode<T,S>
org.apache.axis2.saaj.NodeImpl<Element,T>
org.apache.axis2.saaj.SOAPElementImpl<org.apache.axiom.soap.SOAPBody>
org.apache.axis2.saaj.SOAPBodyImpl
- All Implemented Interfaces:
jakarta.xml.soap.Node,jakarta.xml.soap.SOAPBody,jakarta.xml.soap.SOAPElement,Element,Node
public class SOAPBodyImpl
extends SOAPElementImpl<org.apache.axiom.soap.SOAPBody>
implements jakarta.xml.soap.SOAPBody
-
Field Summary
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.xml.soap.SOAPElementaddAttribute(QName qname, String value) jakarta.xml.soap.SOAPBodyElementaddBodyElement(jakarta.xml.soap.Name name) Creates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPBodyElementaddBodyElement(QName qname) Creates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPElementaddChildElement(jakarta.xml.soap.SOAPElement soapElement) jakarta.xml.soap.SOAPElementaddChildElement(String localName) jakarta.xml.soap.SOAPElementaddChildElement(String localName, String prefix) jakarta.xml.soap.SOAPElementaddChildElement(String localName, String prefix, String uri) jakarta.xml.soap.SOAPElementaddChildElement(QName qname) jakarta.xml.soap.SOAPBodyElementaddDocument(Document document) Adds the root node of the DOMDocumentto thisSOAPBodyobject.jakarta.xml.soap.SOAPFaultaddFault()Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPFaultCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPFaultCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPFaultjakarta.xml.soap.SOAPFaultCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject.jakarta.xml.soap.SOAPElementaddTextNode(String text) Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.protected ElementappendElement(Element child) createQName(String localName, String prefix) Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement.Creates a new DOM org.w3c.dom.Document and sets the first child of this SOAPBody as its document element.getAttributeValue(QName qname) Returns an iterator over all the immediate content of this element.getChildElements(jakarta.xml.soap.Name name) getChildElements(QName qname) jakarta.xml.soap.SOAPFaultgetFault()Returns theSOAPFaultobject in thisSOAPBodyobject.booleanhasFault()Indicates whether aSOAPFaultobject exists in thisSOAPBodyobject.booleanremoveAttribute(QName qname) jakarta.xml.soap.SOAPElementsetElementQName(QName qname) Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addNamespaceDeclaration, clone, copyContents, getAllAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getElementName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setValue, toStringMethods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElementMethods inherited from class org.apache.axis2.saaj.ProxyNode
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOMTarget, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTarget, getTextContent, getType, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setType, setUserData, toSAAJNodeListMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, 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
addAttribute, addChildElement, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
-
Constructor Details
-
SOAPBodyImpl
public SOAPBodyImpl(org.apache.axiom.soap.SOAPBody omSOAPBody) - Parameters:
omSOAPBody-
-
-
Method Details
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName, String prefix) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
appendElement
- Overrides:
appendElementin classProxyNode<Element,org.apache.axiom.soap.SOAPBody> - Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(jakarta.xml.soap.SOAPElement soapElement) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(String localName, String prefix, String uri) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
addFault
public jakarta.xml.soap.SOAPFault addFault() throws jakarta.xml.soap.SOAPExceptionCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject.- Specified by:
addFaultin interfacejakarta.xml.soap.SOAPBody- Returns:
- the new
SOAPFaultobject - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
hasFault
public boolean hasFault()Indicates whether aSOAPFaultobject exists in thisSOAPBodyobject.- Specified by:
hasFaultin interfacejakarta.xml.soap.SOAPBody- Returns:
trueif aSOAPFaultobject exists in thisSOAPBodyobject;falseotherwise
-
getFault
public jakarta.xml.soap.SOAPFault getFault()Returns theSOAPFaultobject in thisSOAPBodyobject.- Specified by:
getFaultin interfacejakarta.xml.soap.SOAPBody- Returns:
- the
SOAPFaultobject in thisSOAPBodyobject
-
addBodyElement
public jakarta.xml.soap.SOAPBodyElement addBodyElement(jakarta.xml.soap.Name name) throws jakarta.xml.soap.SOAPException Creates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.- Specified by:
addBodyElementin interfacejakarta.xml.soap.SOAPBody- Parameters:
name- aNameobject with the name for the newSOAPBodyElementobject- Returns:
- the new
SOAPBodyElementobject - Throws:
jakarta.xml.soap.SOAPException- if a SOAP error occurs
-
addFault
public jakarta.xml.soap.SOAPFault addFault(jakarta.xml.soap.Name faultCode, String faultString, Locale locale) throws jakarta.xml.soap.SOAPException Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject. The newSOAPFaultwill have afaultcodeelement that is set to thefaultCodeparameter and afaultstringset tofaultstringand localized tolocale.- Specified by:
addFaultin interfacejakarta.xml.soap.SOAPBody- Parameters:
faultCode- aNameobject giving the fault code to be set; must be one of the fault codes defined in the SOAP 1.1 specification and of type QNamefaultString- aStringgiving an explanation of the faultlocale- aLocaleobject indicating the native language of thefaultString - Returns:
- the new
SOAPFaultobject - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
addFault
public jakarta.xml.soap.SOAPFault addFault(jakarta.xml.soap.Name faultCode, String faultString) throws jakarta.xml.soap.SOAPException Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject. The newSOAPFaultwill have afaultcodeelement that is set to thefaultCodeparameter and afaultstringset tofaultstring.- Specified by:
addFaultin interfacejakarta.xml.soap.SOAPBody- Parameters:
faultCode- aNameobject giving the fault code to be set; must be one of the fault codes defined in the SOAP 1.1 specification and of type QNamefaultString- aStringgiving an explanation of the fault- Returns:
- the new
SOAPFaultobject - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
addDocument
public jakarta.xml.soap.SOAPBodyElement addDocument(Document document) throws jakarta.xml.soap.SOAPException Adds the root node of the DOMDocumentto thisSOAPBodyobject. Calling this method invalidates thedocumentparameter. The client application should discard all references to thisDocumentand its contents upon callingaddDocument. The behavior of an application that continues to use such references is undefined.- Specified by:
addDocumentin interfacejakarta.xml.soap.SOAPBody- Parameters:
document- theDocumentobject whose root node will be added to thisSOAPBody- Returns:
- the
SOAPBodyElementthat represents the root node that was added - Throws:
jakarta.xml.soap.SOAPException- if theDocumentcannot be added
-
addBodyElement
public jakarta.xml.soap.SOAPBodyElement addBodyElement(QName qname) throws jakarta.xml.soap.SOAPException Creates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.- Specified by:
addBodyElementin interfacejakarta.xml.soap.SOAPBody- Parameters:
qname- aQNameobject with the name for the newSOAPBodyElementobject- Returns:
- the new
SOAPBodyElementobject - Throws:
jakarta.xml.soap.SOAPException- if a SOAP error occurs
-
addFault
public jakarta.xml.soap.SOAPFault addFault(QName faultcode, String faultString) throws jakarta.xml.soap.SOAPException - Specified by:
addFaultin interfacejakarta.xml.soap.SOAPBody- Throws:
jakarta.xml.soap.SOAPException
-
addFault
public jakarta.xml.soap.SOAPFault addFault(QName faultCode, String faultString, Locale locale) throws jakarta.xml.soap.SOAPException Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject. The newSOAPFaultwill have afaultcodeelement that is set to thefaultCodeparameter and afaultstringset tofaultstringand localized tolocale.- Specified by:
addFaultin interfacejakarta.xml.soap.SOAPBody- Parameters:
faultCode- aQNameobject giving the fault code to befaultString- aStringgiving an explanation of the faultlocale- aLocaleobject indicating the native language of thefaultString - Returns:
- the new
SOAPFaultobject - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
extractContentAsDocument
Creates a new DOM org.w3c.dom.Document and sets the first child of this SOAPBody as its document element. The child SOAPElement is removed as part of the process.- Specified by:
extractContentAsDocumentin interfacejakarta.xml.soap.SOAPBody- Returns:
- The org.w3c.dom.Document representation of the SOAPBody content.
- Throws:
jakarta.xml.soap.SOAPException- - if there is not exactly one child SOAPElement of the SOAPBody.
-
getChildElements
- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement- Overrides:
getChildElementsin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
addAttribute
public jakarta.xml.soap.SOAPElement addAttribute(QName qname, String value) throws jakarta.xml.soap.SOAPException - Specified by:
addAttributein interfacejakarta.xml.soap.SOAPElement- Overrides:
addAttributein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(QName qname) throws jakarta.xml.soap.SOAPException - Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
createQName
Description copied from class:SOAPElementImplCreates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement. The remaining elements of the new QName are taken directly from the parameters, localName and prefix.- Specified by:
createQNamein interfacejakarta.xml.soap.SOAPElement- Overrides:
createQNamein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Parameters:
localName- - a String containing the local part of the name. prefix - a String containing the prefix for the name.- Returns:
- a QName with the specified localName and prefix, and with a namespace that is associated with the prefix in the context of this SOAPElement. This namespace will be the same as the one that would be returned by getNamespaceURI(String) if it were given prefix as its parameter.
- Throws:
jakarta.xml.soap.SOAPException- - if the QName cannot be created.
-
getAllAttributesAsQNames
- Specified by:
getAllAttributesAsQNamesin interfacejakarta.xml.soap.SOAPElement- Overrides:
getAllAttributesAsQNamesin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
getAttributeValue
- Specified by:
getAttributeValuein interfacejakarta.xml.soap.SOAPElement- Overrides:
getAttributeValuein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
getChildElements
- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement- Overrides:
getChildElementsin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
getElementQName
- Specified by:
getElementQNamein interfacejakarta.xml.soap.SOAPElement- Overrides:
getElementQNamein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
removeAttribute
- Specified by:
removeAttributein interfacejakarta.xml.soap.SOAPElement- Overrides:
removeAttributein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>
-
setElementQName
public jakarta.xml.soap.SOAPElement setElementQName(QName qname) throws jakarta.xml.soap.SOAPException - Specified by:
setElementQNamein interfacejakarta.xml.soap.SOAPElement- Overrides:
setElementQNamein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Throws:
jakarta.xml.soap.SOAPException
-
getChildElements
Description copied from class:SOAPElementImplReturns an iterator over all the immediate content of this element. This includesTextobjects as well asSOAPElementobjects.- Specified by:
getChildElementsin interfacejakarta.xml.soap.SOAPElement- Overrides:
getChildElementsin classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Returns:
- an iterator over
TextandSOAPElementcontained within thisSOAPElementobject
-
addTextNode
Description copied from class:SOAPElementImplCreates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfacejakarta.xml.soap.SOAPElement- Overrides:
addTextNodein classSOAPElementImpl<org.apache.axiom.soap.SOAPBody>- Parameters:
text- aStringobject with the textual content to be added- Returns:
- the
SOAPElementobject into which the newTextobject was inserted - Throws:
jakarta.xml.soap.SOAPException- if there is an error in creating the newTextobject
-