public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope
Modifier and Type | Field and Description |
---|---|
protected BodyImpl |
body |
protected HeaderImpl |
header |
DSIG_NS, elementQName, log, WSU_NS, XENC_NS, XML_URI, XMLNS_URI
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
Modifier | Constructor and Description |
---|---|
|
EnvelopeImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
protected |
EnvelopeImpl(SOAPDocumentImpl ownerDoc,
Name name) |
protected |
EnvelopeImpl(SOAPDocumentImpl ownerDoc,
NameImpl name,
boolean createHeader,
boolean createBody) |
protected |
EnvelopeImpl(SOAPDocumentImpl ownerDoc,
QName name) |
Modifier and Type | Method and Description |
---|---|
SOAPBody |
addBody()
Creates a
SOAPBody object and sets it as the
SOAPBody object for this SOAPEnvelope
object. |
SOAPBody |
addBody(String prefix) |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
SOAPHeader |
addHeader()
Creates a
SOAPHeader object and sets it as the
SOAPHeader object for this SOAPEnvelope
object. |
SOAPHeader |
addHeader(String prefix) |
Name |
createName(String localName)
Creates a new
Name object initialized with the
given local name. |
Name |
createName(String localName,
String prefix) |
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. |
protected abstract NameImpl |
getBodyName(String prefix) |
Source |
getContent()
Get the content as a JAXP Source.
|
SOAPHeader |
getHeader()
Returns the
SOAPHeader object for
this SOAPEnvelope object. |
protected abstract NameImpl |
getHeaderName(String prefix) |
String |
getPayloadAttributeValue(QName qName)
Retrieve payload attribute value without materializing its contents
|
String |
getPayloadAttributeValue(String localName)
Retrieve payload attribute value without materializing its contents
|
QName |
getPayloadQName()
Retrieve payload qname without materializing its contents
|
XMLStreamReader |
getPayloadReader() |
StaxBridge |
getStaxBridge() |
boolean |
isLazy() |
protected void |
lookForBody() |
protected void |
lookForHeader() |
void |
output(OutputStream out)
Output the content.
|
void |
output(OutputStream out,
boolean isFastInfoset)
Serialize to FI if boolean parameter set.
|
void |
setCharsetEncoding(String value) |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
void |
setOmitXmlDecl(String value) |
void |
setStaxBridge(StaxBridge bridge) |
void |
setXmlDecl(String value) |
void |
writeTo(XMLStreamWriter writer) |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
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, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
protected HeaderImpl header
protected BodyImpl body
protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, Name name)
protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, QName name)
protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, NameImpl name, boolean createHeader, boolean createBody) throws SOAPException
SOAPException
public EnvelopeImpl(SOAPDocumentImpl ownerDoc, Element domElement)
public 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 SOAPHeader addHeader(String prefix) throws SOAPException
SOAPException
protected void lookForHeader() throws SOAPException
SOAPException
public 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
objectprotected void lookForBody() throws SOAPException
SOAPException
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 SOAPBody addBody(String prefix) throws SOAPException
SOAPException
protected SOAPElement addElement(Name name) throws SOAPException
addElement
in class ElementImpl
SOAPException
protected SOAPElement addElement(QName name) throws SOAPException
addElement
in class ElementImpl
SOAPException
public 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 Source getContent()
Envelope
getContent
in interface Envelope
public 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 Name createName(String localName, String prefix) throws SOAPException
SOAPException
public 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 void setOmitXmlDecl(String value)
public void setXmlDecl(String value)
public void setCharsetEncoding(String value)
public void output(OutputStream out) throws IOException
Envelope
output
in interface Envelope
out
- output stream.IOException
- in case of an I/O error.public void output(OutputStream out, boolean isFastInfoset) throws IOException
output
in interface Envelope
out
- output streamisFastInfoset
- true if it is fast infoset.IOException
- in case of an I/O error.public SOAPElement setElementQName(QName newName) throws SOAPException
SOAPElement
Element
to newName
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.
setElementQName
in interface SOAPElement
setElementQName
in class ElementImpl
newName
- the new name for the Element
.SOAPException
- if changing the name of this Element
is not allowed.public void setStaxBridge(StaxBridge bridge) throws SOAPException
setStaxBridge
in interface Envelope
SOAPException
public StaxBridge getStaxBridge() throws SOAPException
getStaxBridge
in interface Envelope
SOAPException
public XMLStreamReader getPayloadReader() throws SOAPException
getPayloadReader
in interface LazyEnvelope
SOAPException
public void writeTo(XMLStreamWriter writer) throws XMLStreamException, SOAPException
writeTo
in interface LazyEnvelope
XMLStreamException
SOAPException
public QName getPayloadQName() throws SOAPException
LazyEnvelope
getPayloadQName
in interface LazyEnvelope
SOAPException
- in case of an errorpublic String getPayloadAttributeValue(String localName) throws SOAPException
LazyEnvelope
getPayloadAttributeValue
in interface LazyEnvelope
localName
- local nameSOAPException
- in case of an errorpublic String getPayloadAttributeValue(QName qName) throws SOAPException
LazyEnvelope
getPayloadAttributeValue
in interface LazyEnvelope
qName
- QNameSOAPException
- in case of an errorpublic boolean isLazy()
isLazy
in interface LazyEnvelope
Copyright © 2021 JBoss by Red Hat. All rights reserved.