Class SOAPEnvelopeImpl
- All Implemented Interfaces:
Cloneable,Node,SOAPElement,SOAPEnvelope,org.apache.axiom.om.impl.OMNodeEx,org.apache.axiom.om.OMNode,org.apache.axiom.om.OMSerializable,Element,Node,NodeList
-
Field Summary
Fields inherited from class org.apache.axis2.saaj.SOAPElementImpl
elementFields inherited from class org.apache.axis2.saaj.NodeImplEx
parentElementFields inherited from class org.apache.axiom.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIEDFields 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_NODEFields inherited from interface org.apache.axiom.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(Name name, String value) Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on EnvelopaddBody()Creates aSOAPBodyobject and sets it as theSOAPBodyobject for thisSOAPEnvelopeobject.addChildElement(Name name) Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body elementCreates aSOAPHeaderobject and sets it as theSOAPHeaderobject for thisSOAPEnvelopeobject.addTextNode(String text) Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.createName(String localName) Creates a newNameobject initialized with the given local name.createName(String localName, String prefix, String uri) Creates a newNameobject initialized with the given local name, namespace prefix, and namespace URI.getBody()Returns theSOAPBodyobject associated with thisSOAPEnvelopeobject.Returns theSOAPHeaderobject for thisSOAPEnvelopeobject.org.apache.axiom.soap.SOAPEnvelopevoidsetOwnerDocument(Document document) Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, appendChild, appendElement, appendText, clone, copyContents, createQName, detach, detachNode, discard, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getChildNodes, getElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChild, getLastChild, getLocalName, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTagName, getTextContent, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasChildNodes, internalSerialize, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setEncodingStyle, setParent, setParentElement, setValue, toStringMethods inherited from class org.apache.axis2.saaj.NodeImplEx
getParent, getSchemaTypeInfo, getType, recycleNode, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setTypeMethods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
build, buildWithAttachments, cloneNode, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNextOMSibling, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getPreviousOMSibling, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserDataMethods 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 javax.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 javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle
-
Constructor Details
-
SOAPEnvelopeImpl
public SOAPEnvelopeImpl(org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl envelope)
-
-
Method Details
-
setOwnerDocument
-
getOMEnvelope
public org.apache.axiom.soap.SOAPEnvelope getOMEnvelope() -
createName
Creates a newNameobject initialized with the given local name, namespace prefix, and namespace URI.This factory method creates
Nameobjects for use in the SOAP/XML document.- Specified by:
createNamein interfaceSOAPEnvelope- Parameters:
localName- aStringgiving the local nameprefix- aStringgiving the prefix of the namespaceuri- aStringgiving the URI of the namespace- Returns:
- a
Nameobject initialized with the given local name, namespace prefix, and namespace URI - Throws:
SOAPException- if there is a SOAP error
-
createName
Creates a newNameobject initialized with the given local name.This factory method creates
Nameobjects for use in the SOAP/XML document.- Specified by:
createNamein interfaceSOAPEnvelope- Parameters:
localName- aStringgiving the local name- Returns:
- a
Nameobject initialized with the given local name - Throws:
SOAPException- if there is a SOAP error
-
getHeader
Returns theSOAPHeaderobject for thisSOAPEnvelopeobject.A new
SOAPMessageobject is by default created with aSOAPEnvelopeobject that contains an emptySOAPHeaderobject. As a result, the methodgetHeaderwill always return aSOAPHeaderobject unless the header has been removed and a new one has not been added.- Specified by:
getHeaderin interfaceSOAPEnvelope- Returns:
- the
SOAPHeaderobject ornullif there is none - Throws:
SOAPException- if there is a problem obtaining theSOAPHeaderobject
-
getBody
Returns theSOAPBodyobject associated with thisSOAPEnvelopeobject.A new
SOAPMessageobject is by default created with aSOAPEnvelopeobject that contains an emptySOAPBodyobject. As a result, the methodgetBodywill always return aSOAPBodyobject unless the body has been removed and a new one has not been added.- Specified by:
getBodyin interfaceSOAPEnvelope- Returns:
- the
SOAPBodyobject for thisSOAPEnvelopeobject ornullif there is none - Throws:
SOAPException- if there is a problem obtaining theSOAPBodyobject
-
addHeader
Creates aSOAPHeaderobject and sets it as theSOAPHeaderobject for thisSOAPEnvelopeobject.It is illegal to add a header when the envelope already contains a header. Therefore, this method should be called only after the existing header has been removed.
- Specified by:
addHeaderin interfaceSOAPEnvelope- Returns:
- the new
SOAPHeaderobject - Throws:
SOAPException- if thisSOAPEnvelopeobject already contains a validSOAPHeaderobject
-
addBody
Creates aSOAPBodyobject and sets it as theSOAPBodyobject for thisSOAPEnvelopeobject.It is illegal to add a body when the envelope already contains a body. Therefore, this method should be called only after the existing body has been removed.
- Specified by:
addBodyin interfaceSOAPEnvelope- Returns:
- the new
SOAPBodyobject - Throws:
SOAPException- if thisSOAPEnvelopeobject already contains a validSOAPBodyobject
-
addTextNode
Description copied from class:SOAPElementImplCreates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfaceSOAPElement- Overrides:
addTextNodein classSOAPElementImpl- 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
-
addAttribute
Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop- Specified by:
addAttributein interfaceSOAPElement- Overrides:
addAttributein classSOAPElementImpl- 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
-
addChildElement
Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body element- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classSOAPElementImpl- Throws:
SOAPException
-