Class SOAPEnvelopeImpl
- java.lang.Object
-
- org.apache.axis2.saaj.ProxyNode<T,S>
-
- org.apache.axis2.saaj.NodeImpl<Element,T>
-
- org.apache.axis2.saaj.SOAPElementImpl<SOAPEnvelope>
-
- org.apache.axis2.saaj.SOAPEnvelopeImpl
-
- All Implemented Interfaces:
Node,SOAPElement,SOAPEnvelope,Element,Node
public class SOAPEnvelopeImpl extends SOAPElementImpl<SOAPEnvelope> implements SOAPEnvelope
-
-
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 Constructor Description SOAPEnvelopeImpl(SOAPEnvelope envelope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SOAPElementaddAttribute(Name name, String value)Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on EnvelopSOAPBodyaddBody()Creates aSOAPBodyobject and sets it as theSOAPBodyobject for thisSOAPEnvelopeobject.SOAPElementaddChildElement(Name name)Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body elementSOAPHeaderaddHeader()Creates aSOAPHeaderobject and sets it as theSOAPHeaderobject for thisSOAPEnvelopeobject.SOAPElementaddTextNode(String text)Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.NamecreateName(String localName)Creates a newNameobject initialized with the given local name.NamecreateName(String localName, String prefix, String uri)Creates a newNameobject initialized with the given local name, namespace prefix, and namespace URI.SOAPBodygetBody()Returns theSOAPBodyobject associated with thisSOAPEnvelopeobject.SOAPHeadergetHeader()Returns theSOAPHeaderobject for thisSOAPEnvelopeobject.-
Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, clone, copyContents, createQName, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setEncodingStyle, setValue, toString
-
Methods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElement
-
Methods inherited from class org.apache.axis2.saaj.ProxyNode
appendChild, appendElement, 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, toSAAJNodeList
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, 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 javax.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 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 Detail
-
SOAPEnvelopeImpl
public SOAPEnvelopeImpl(SOAPEnvelope envelope)
-
-
Method Detail
-
createName
public Name createName(String localName, String prefix, String uri) throws SOAPException
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
public Name createName(String localName) throws SOAPException
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
public SOAPHeader getHeader() throws SOAPException
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
public SOAPBody getBody() throws SOAPException
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
public SOAPHeader addHeader() throws SOAPException
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
public SOAPBody addBody() throws SOAPException
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
public SOAPElement addTextNode(String text) throws SOAPException
Description copied from class:SOAPElementImplCreates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfaceSOAPElement- Overrides:
addTextNodein classSOAPElementImpl<SOAPEnvelope>- 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
public SOAPElement addAttribute(Name name, String value) throws SOAPException
Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop- Specified by:
addAttributein interfaceSOAPElement- Overrides:
addAttributein classSOAPElementImpl<SOAPEnvelope>- 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
public SOAPElement addChildElement(Name name) throws SOAPException
Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body element- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classSOAPElementImpl<SOAPEnvelope>- Throws:
SOAPException
-
-