public class SOAPEnvelopeImpl extends SOAPElementImpl implements SOAPEnvelope
domNode, soapParent
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 and Description |
---|
SOAPEnvelopeImpl(SOAPPartImpl soapPart,
SOAPElementImpl element,
boolean addHeaderAndBody)
Construct a SOAP envelope for the given SOAP version URI prefix, etc.
|
Modifier and Type | Method and Description |
---|---|
SOAPElement |
addAttribute(Name name,
String value)
Adds an attribute with the specified name and value to this SOAPElement object.
|
SOAPBody |
addBody()
Creates a
SOAPBody object and sets it as the
SOAPBody object for this SOAPEnvelope
object. |
SOAPElement |
addChildElement(SOAPElement child)
Make sure the child is either a SOAPHeader or SOAPBody
|
SOAPHeader |
addHeader()
Creates a
SOAPHeader object and sets it as the
SOAPHeader object for this SOAPEnvelope
object. |
SOAPElement |
addTextNode(String value)
Text nodes are not supported.
|
Name |
createName(String localName)
Creates a new
Name object initialized with the
given local name. |
Name |
createName(String localName,
String prefix,
String uri)
Creates a new
Name object initialized with the
given local name, namespace prefix, and namespace URI. |
SOAPBody |
getBody()
Returns the
SOAPBody object associated with this
SOAPEnvelope object. |
SOAPHeader |
getHeader()
Returns the
SOAPHeader object for
this SOAPEnvelope object. |
Document |
getOwnerDocument() |
SOAPMessage |
getSOAPMessage() |
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, createQName, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChildElementByLocalName, getNamespacePrefixes, getNamespaceURI, getSchemaTypeInfo, getSOAPEnvelope, getTagName, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setElementQNameInternal, setEncodingStyle, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setPrefix, writeElement, writeElementContent
appendChild, cloneNode, compareDocumentPosition, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, getValue, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setNodeValue, setParentElement, setTextContent, setUserData, setValue, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
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
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public SOAPEnvelopeImpl(SOAPPartImpl soapPart, SOAPElementImpl element, boolean addHeaderAndBody) throws SOAPException
SOAPException
public SOAPMessage getSOAPMessage()
public SOAPBody addBody() throws SOAPException
SOAPEnvelope
SOAPBody
object and sets it as the
SOAPBody
object for this SOAPEnvelope
object.
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.
addBody
in interface SOAPEnvelope
SOAPBody
objectSOAPException
- if this
SOAPEnvelope
object already contains a
valid SOAPBody
objectpublic SOAPHeader addHeader() throws SOAPException
SOAPEnvelope
SOAPHeader
object and sets it as the
SOAPHeader
object for this SOAPEnvelope
object.
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.
addHeader
in interface SOAPEnvelope
SOAPHeader
objectSOAPException
- if this
SOAPEnvelope
object already contains a
valid SOAPHeader
objectpublic SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElementImpl
addAttribute
in interface SOAPElement
addAttribute
in class SOAPElementImpl
name
- a Name object with the name of the attributevalue
- a String giving the value of the attributeSOAPException
- if there is an error in creating the
Attribute, or it is invalid to set
an attribute with Name
name
on this SOAPElement.SOAPElement.addAttribute(javax.xml.namespace.QName, String)
public SOAPElement addChildElement(SOAPElement child) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
child
- the SOAPElement to be added as a new childSOAPException
- if there was an error in adding this
element as a childpublic Name createName(String localName) throws SOAPException
SOAPEnvelope
Name
object initialized with the
given local name.
This factory method creates Name
objects for use in
the SOAP/XML document.
createName
in interface SOAPEnvelope
localName
- a String
giving the local nameName
object initialized with the given
local nameSOAPException
- if there is a SOAP errorpublic Name createName(String localName, String prefix, String uri) throws SOAPException
SOAPEnvelope
Name
object initialized with the
given local name, namespace prefix, and namespace URI.
This factory method creates Name
objects for use in
the SOAP/XML document.
createName
in interface SOAPEnvelope
localName
- a String
giving the local nameprefix
- a String
giving the prefix of the namespaceuri
- a String
giving the URI of the namespaceName
object initialized with the given
local name, namespace prefix, and namespace URISOAPException
- if there is a SOAP errorpublic SOAPBody getBody() throws SOAPException
SOAPEnvelope
SOAPBody
object associated with this
SOAPEnvelope
object.
A new SOAPMessage
object is by default created with a
SOAPEnvelope
object that contains an empty
SOAPBody
object. As a result, the method
getBody
will always return a SOAPBody
object unless the body has been removed and a new one has not
been added.
getBody
in interface SOAPEnvelope
SOAPBody
object for this
SOAPEnvelope
object or null
if there is noneSOAPException
- if there is a problem obtaining the
SOAPBody
objectpublic SOAPHeader getHeader() throws SOAPException
SOAPEnvelope
SOAPHeader
object for
this SOAPEnvelope
object.
A new SOAPMessage
object is by default created with a
SOAPEnvelope
object that contains an empty
SOAPHeader
object. As a result, the method
getHeader
will always return a SOAPHeader
object unless the header has been removed and a new one has not
been added.
getHeader
in interface SOAPEnvelope
SOAPHeader
object or null
if
there is noneSOAPException
- if there is a problem obtaining the
SOAPHeader
objectpublic SOAPElement addTextNode(String value) throws SOAPException
addTextNode
in interface SOAPElement
addTextNode
in class SOAPElementImpl
value
- a String object with the textual content to be addedSOAPException
- if there is an error in creating the
new Text
object or if it is not legal to
attach it as a child to this
SOAPElement
public Document getOwnerDocument()
getOwnerDocument
in interface Node
getOwnerDocument
in class NodeImpl
Copyright © 2018 JBoss by Red Hat. All rights reserved.