- All Implemented Interfaces:
Envelope
,LazyEnvelope
,Node
,SOAPBodyElement
,SOAPElement
,SOAPEnvelope
,Element
,Node
- Direct Known Subclasses:
Envelope1_1Impl
,Envelope1_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
EnvelopeImpl
(SOAPDocumentImpl ownerDoc, NameImpl name, boolean createHeader, boolean createBody) protected
EnvelopeImpl
(SOAPDocumentImpl ownerDoc, Name name) protected
EnvelopeImpl
(SOAPDocumentImpl ownerDoc, QName name) protected
EnvelopeImpl
(SOAPDocumentImpl ownerDoc, Element domElement) -
Method Summary
Modifier and TypeMethodDescriptionaddBody()
Creates aSOAPBody
object and sets it as theSOAPBody
object for thisSOAPEnvelope
object.protected SOAPElement
addElement
(Name name) protected SOAPElement
addElement
(QName name) Creates aSOAPHeader
object and sets it as theSOAPHeader
object for thisSOAPEnvelope
object.createName
(String localName) Creates a newName
object initialized with the given local name.createName
(String localName, String uri) Creates a newName
object initialized with the given local name and namespace prefix.createName
(String localName, String prefix, String uri) Creates a newName
object initialized with the given local name, namespace prefix, and namespace URI.getBody()
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.protected abstract NameImpl
getBodyName
(String prefix) Get the content as a JAXP Source.Returns theSOAPHeader
object for thisSOAPEnvelope
object.protected abstract NameImpl
getHeaderName
(String prefix) getPayloadAttributeValue
(String localName) Retrieve payload attribute value without materializing its contentsgetPayloadAttributeValue
(QName qName) Retrieve payload attribute value without materializing its contentsRetrieve payload qname without materializing its contentsboolean
isLazy()
protected void
protected void
void
output
(OutputStream out) Output the content.void
output
(OutputStream out, boolean isFastInfoset) Serialize to FI if boolean parameter set.void
setCharsetEncoding
(String value) setElementQName
(QName newName) Changes the name of thisElement
tonewName
if possible.void
setOmitXmlDecl
(String value) void
setStaxBridge
(StaxBridge bridge) void
setXmlDecl
(String value) void
writeTo
(XMLStreamWriter writer) 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, convertToSoapElement, 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, getChildNodes, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, getFirstChild, getLastChild, 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, hasChildNodes, 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, setParentElement, 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, 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 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
-
Field Details
-
header
-
body
-
-
Constructor Details
-
EnvelopeImpl
-
EnvelopeImpl
-
EnvelopeImpl
protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, NameImpl name, boolean createHeader, boolean createBody) throws SOAPException - Throws:
SOAPException
-
EnvelopeImpl
-
-
Method Details
-
getHeaderName
-
getBodyName
-
addHeader
Description copied from interface:SOAPEnvelope
Creates aSOAPHeader
object and sets it as theSOAPHeader
object for thisSOAPEnvelope
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.
- Specified by:
addHeader
in interfaceSOAPEnvelope
- Returns:
- the new
SOAPHeader
object - Throws:
SOAPException
- if thisSOAPEnvelope
object already contains a validSOAPHeader
object
-
addHeader
- Throws:
SOAPException
-
lookForHeader
- Throws:
SOAPException
-
getHeader
Description copied from interface:SOAPEnvelope
Returns theSOAPHeader
object for thisSOAPEnvelope
object.A new
SOAPMessage
object is by default created with aSOAPEnvelope
object that contains an emptySOAPHeader
object. As a result, the methodgetHeader
will always return aSOAPHeader
object unless the header has been removed and a new one has not been added.- Specified by:
getHeader
in interfaceSOAPEnvelope
- Returns:
- the
SOAPHeader
object ornull
if there is none - Throws:
SOAPException
- if there is a problem obtaining theSOAPHeader
object
-
lookForBody
- Throws:
SOAPException
-
addBody
Description copied from interface:SOAPEnvelope
Creates aSOAPBody
object and sets it as theSOAPBody
object for thisSOAPEnvelope
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.
- Specified by:
addBody
in interfaceSOAPEnvelope
- Returns:
- the new
SOAPBody
object - Throws:
SOAPException
- if thisSOAPEnvelope
object already contains a validSOAPBody
object
-
addBody
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
addElement
- Overrides:
addElement
in classElementImpl
- Throws:
SOAPException
-
getBody
Description copied from interface:SOAPEnvelope
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.A new
SOAPMessage
object is by default created with aSOAPEnvelope
object that contains an emptySOAPBody
object. As a result, the methodgetBody
will always return aSOAPBody
object unless the body has been removed and a new one has not been added.- Specified by:
getBody
in interfaceSOAPEnvelope
- Returns:
- the
SOAPBody
object for thisSOAPEnvelope
object ornull
if there is none - Throws:
SOAPException
- if there is a problem obtaining theSOAPBody
object
-
getContent
Description copied from interface:Envelope
Get the content as a JAXP Source.- Specified by:
getContent
in interfaceEnvelope
- Returns:
- source
-
createName
Description copied from interface:SOAPEnvelope
Creates a newName
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.- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
- aString
giving the local nameprefix
- aString
giving the prefix of the namespaceuri
- aString
giving the URI of the namespace- Returns:
- a
Name
object initialized with the given local name, namespace prefix, and namespace URI - Throws:
SOAPException
- if there is a SOAP error
-
createName
Description copied from interface:SOAPEnvelope
Creates a newName
object initialized with the given local name and namespace prefix.This factory method creates
Name
objects for use in the SOAP/XML document.- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
- aString
giving the local nameuri
- aString
giving the URI of the namespace- Returns:
- a
Name
object initialized with the given local name, namespace prefix, and namespace URI - Throws:
SOAPException
- if there is a SOAP error
-
createName
Description copied from interface:SOAPEnvelope
Creates a newName
object initialized with the given local name.This factory method creates
Name
objects for use in the SOAP/XML document.- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
- aString
giving the local name- Returns:
- a
Name
object initialized with the given local name - Throws:
SOAPException
- if there is a SOAP error
-
setOmitXmlDecl
-
setXmlDecl
-
setCharsetEncoding
-
output
Description copied from interface:Envelope
Output the content.- Specified by:
output
in interfaceEnvelope
- Parameters:
out
- output stream.- Throws:
IOException
- in case of an I/O error.
-
output
Serialize to FI if boolean parameter set.- Specified by:
output
in interfaceEnvelope
- Parameters:
out
- output streamisFastInfoset
- true if it is fast infoset.- Throws:
IOException
- in case of an I/O error.
-
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.
-
setStaxBridge
- Specified by:
setStaxBridge
in interfaceEnvelope
- Throws:
SOAPException
-
getStaxBridge
- Specified by:
getStaxBridge
in interfaceEnvelope
- Throws:
SOAPException
-
getPayloadReader
- Specified by:
getPayloadReader
in interfaceLazyEnvelope
- Throws:
SOAPException
-
writeTo
- Specified by:
writeTo
in interfaceLazyEnvelope
- Throws:
XMLStreamException
SOAPException
-
getPayloadQName
Description copied from interface:LazyEnvelope
Retrieve payload qname without materializing its contents- Specified by:
getPayloadQName
in interfaceLazyEnvelope
- Returns:
- QName
- Throws:
SOAPException
- in case of an error
-
getPayloadAttributeValue
Description copied from interface:LazyEnvelope
Retrieve payload attribute value without materializing its contents- Specified by:
getPayloadAttributeValue
in interfaceLazyEnvelope
- Parameters:
localName
- local name- Returns:
- payload attribute value
- Throws:
SOAPException
- in case of an error
-
getPayloadAttributeValue
Description copied from interface:LazyEnvelope
Retrieve payload attribute value without materializing its contents- Specified by:
getPayloadAttributeValue
in interfaceLazyEnvelope
- Parameters:
qName
- QName- Returns:
- payload attribute value
- Throws:
SOAPException
- in case of an error
-
isLazy
public boolean isLazy()- Specified by:
isLazy
in interfaceLazyEnvelope
-