public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument
Modifier and Type | Field and Description |
---|---|
protected SOAPDocumentImpl |
document |
protected Envelope |
envelope |
protected MimeHeaders |
headers |
protected static Logger |
log |
protected MessageImpl |
message
Reference to containing message (may be null)
|
protected boolean |
omitXmlDecl |
protected Source |
source |
protected String |
sourceCharsetEncoding |
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 |
---|---|
protected |
SOAPPartImpl() |
protected |
SOAPPartImpl(MessageImpl message) |
Modifier and Type | Method and Description |
---|---|
void |
addMimeHeader(String name,
String value)
Creates a
MimeHeader object with the specified
name and value and adds it to this SOAPPart object. |
Node |
adoptNode(Node source) |
Node |
appendChild(Node newChild) |
Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(Node other) |
Attr |
createAttribute(String name) |
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName) |
CDATASection |
createCDATASection(String data) |
Comment |
createComment(String data) |
DocumentFragment |
createDocumentFragment() |
Element |
createElement(String tagName) |
Element |
createElementNS(String namespaceURI,
String qualifiedName) |
protected abstract Envelope |
createEmptyEnvelope(String prefix) |
EntityReference |
createEntityReference(String name) |
protected abstract Envelope |
createEnvelopeFromSource() |
ProcessingInstruction |
createProcessingInstruction(String target,
String data) |
Text |
createTextNode(String data) |
void |
detachNode()
Removes this
Node object from the tree. |
protected SOAPPartImpl |
doCloneNode() |
protected void |
doGetDocumentElement() |
protected abstract SOAPPartImpl |
duplicateType() |
Iterator<MimeHeader> |
getAllMimeHeaders()
Retrieves all the headers for this
SOAPPart object
as an iterator over the MimeHeader objects. |
NamedNodeMap |
getAttributes() |
String |
getBaseURI() |
NodeList |
getChildNodes() |
Source |
getContent()
Returns the content of the SOAPEnvelope as a JAXP
Source
object. |
InputStream |
getContentAsStream() |
protected abstract String |
getContentType() |
protected String |
getContentTypeString() |
DocumentType |
getDoctype() |
SOAPDocumentImpl |
getDocument() |
Element |
getDocumentElement() |
String |
getDocumentURI() |
DOMConfiguration |
getDomConfig() |
Element |
getElementById(String elementId) |
NodeList |
getElementsByTagName(String tagname) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
SOAPEnvelope |
getEnvelope()
Gets the
SOAPEnvelope object associated with this
SOAPPart object. |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild() |
DOMImplementation |
getImplementation() |
String |
getInputEncoding() |
Node |
getLastChild() |
String |
getLocalName() |
Iterator<MimeHeader> |
getMatchingMimeHeaders(String[] names)
Retrieves all
MimeHeader objects that match a name in
the given array. |
String[] |
getMimeHeader(String name)
Gets all the values of the
MimeHeader object
in this SOAPPart object that
is identified by the given String . |
String |
getNamespaceURI() |
Node |
getNextSibling() |
String |
getNodeName() |
short |
getNodeType() |
String |
getNodeValue() |
Iterator<MimeHeader> |
getNonMatchingMimeHeaders(String[] names)
Retrieves all
MimeHeader objects whose name does
not match a name in the given array. |
Document |
getOwnerDocument() |
SOAPElement |
getParentElement()
Returns the parent element of this
Node object. |
Node |
getParentNode() |
String |
getPrefix() |
Node |
getPreviousSibling() |
abstract String |
getSOAPNamespace() |
SOAPPartImpl |
getSOAPPart() |
String |
getSourceCharsetEncoding() |
boolean |
getStrictErrorChecking() |
String |
getTextContent() |
Object |
getUserData(String key) |
String |
getValue()
Returns the value of this node if this is a
Text node or the
value of the immediate child of this node otherwise. |
String |
getXmlEncoding() |
boolean |
getXmlStandalone() |
String |
getXmlVersion() |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
Node |
importNode(Node importedNode,
boolean deep) |
Node |
insertBefore(Node arg0,
Node arg1) |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
boolean |
isFastInfoset() |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String arg0,
String arg1) |
protected void |
lookForEnvelope() |
protected XMLDeclarationParser |
lookForXmlDecl() |
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
normalize() |
void |
normalizeDocument() |
void |
recycleNode()
Notifies the implementation that this
Node
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later. |
void |
removeAllMimeHeaders()
Removes all the
MimeHeader objects for this
SOAPEnvelope object. |
Node |
removeChild(Node arg0) |
void |
removeMimeHeader(String header)
Removes all MIME headers that match the given name.
|
Node |
renameNode(Node n,
String namespaceURI,
String qualifiedName) |
Node |
replaceChild(Node arg0,
Node arg1) |
void |
setContent(Source source)
Sets the content of the
SOAPEnvelope object with the data
from the given Source object. |
void |
setDocumentURI(String documentURI) |
void |
setMimeHeader(String name,
String value)
Changes the first header entry that matches the given header name
so that its value is the given value, adding a new header with the
given name and value if no
existing header is a match.
|
void |
setNodeValue(String arg0) |
void |
setParentElement(SOAPElement parent)
Sets the parent of this
Node object to the given
SOAPElement object. |
void |
setPrefix(String arg0) |
void |
setSourceCharsetEncoding(String charset) |
void |
setStrictErrorChecking(boolean strictErrorChecking) |
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
void |
setValue(String value)
If this is a Text node then this method will set its value,
otherwise it sets the value of the immediate (Text) child of this node.
|
void |
setXmlStandalone(boolean xmlStandalone) |
void |
setXmlVersion(String xmlVersion) |
getContentId, getContentLocation, setContentId, setContentLocation
protected static final Logger log
protected MimeHeaders headers
protected Envelope envelope
protected Source source
protected SOAPDocumentImpl document
protected boolean omitXmlDecl
protected String sourceCharsetEncoding
protected MessageImpl message
protected SOAPPartImpl()
protected SOAPPartImpl(MessageImpl message)
protected abstract String getContentType()
protected abstract Envelope createEnvelopeFromSource() throws SOAPException
SOAPException
protected abstract Envelope createEmptyEnvelope(String prefix) throws SOAPException
SOAPException
protected abstract SOAPPartImpl duplicateType()
protected String getContentTypeString()
public boolean isFastInfoset()
public SOAPEnvelope getEnvelope() throws SOAPException
SOAPPart
SOAPEnvelope
object associated with this
SOAPPart
object. Once the SOAP envelope is obtained, it
can be used to get its contents.getEnvelope
in class SOAPPart
SOAPEnvelope
object for this
SOAPPart
objectSOAPException
- if there is a SOAP errorprotected void lookForEnvelope() throws SOAPException
SOAPException
public void removeAllMimeHeaders()
SOAPPart
MimeHeader
objects for this
SOAPEnvelope
object.removeAllMimeHeaders
in class SOAPPart
public void removeMimeHeader(String header)
SOAPPart
removeMimeHeader
in class SOAPPart
header
- a String
giving the name of the MIME header(s) to
be removedpublic String[] getMimeHeader(String name)
SOAPPart
MimeHeader
object
in this SOAPPart
object that
is identified by the given String
.getMimeHeader
in class SOAPPart
name
- the name of the header; example: "Content-Type"String
array giving all the values for the
specified headerSOAPPart.setMimeHeader(java.lang.String, java.lang.String)
public void setMimeHeader(String name, String value)
SOAPPart
Note that RFC822 headers can contain only US-ASCII characters.
setMimeHeader
in class SOAPPart
name
- a String
giving the header name
for which to searchvalue
- a String
giving the value to be set.
This value will be substituted for the current value(s)
of the first header that is a match if there is one.
If there is no match, this value will be the value for
a new MimeHeader
object.SOAPPart.getMimeHeader(java.lang.String)
public void addMimeHeader(String name, String value)
SOAPPart
MimeHeader
object with the specified
name and value and adds it to this SOAPPart
object.
If a MimeHeader
with the specified name already
exists, this method adds the specified value to the already
existing value(s).
Note that RFC822 headers can contain only US-ASCII characters.
addMimeHeader
in class SOAPPart
name
- a String
giving the header namevalue
- a String
giving the value to be set
or addedpublic Iterator<MimeHeader> getAllMimeHeaders()
SOAPPart
SOAPPart
object
as an iterator over the MimeHeader
objects.getAllMimeHeaders
in class SOAPPart
Iterator
object with all of the Mime
headers for this SOAPPart
objectpublic Iterator<MimeHeader> getMatchingMimeHeaders(String[] names)
SOAPPart
MimeHeader
objects that match a name in
the given array.getMatchingMimeHeaders
in class SOAPPart
names
- a String
array with the name(s) of the
MIME headers to be returnedIterator
objectpublic Iterator<MimeHeader> getNonMatchingMimeHeaders(String[] names)
SOAPPart
MimeHeader
objects whose name does
not match a name in the given array.getNonMatchingMimeHeaders
in class SOAPPart
names
- a String
array with the name(s) of the
MIME headers not to be returnedSOAPPart
object
except those that match one of the names in the
given array. The nonmatching MIME headers are returned as an
Iterator
object.public Source getContent() throws SOAPException
SOAPPart
Source
object.getContent
in class SOAPPart
javax.xml.transform.Source
objectSOAPException
- if the implementation cannot convert
the specified Source
objectSOAPPart.setContent(javax.xml.transform.Source)
public void setContent(Source source) throws SOAPException
SOAPPart
SOAPEnvelope
object with the data
from the given Source
object. This Source
must contain a valid SOAP document.setContent
in class SOAPPart
source
- the javax.xml.transform.Source
object with the
data to be setSOAPException
- if there is a problem in setting the sourceSOAPPart.getContent()
public InputStream getContentAsStream() throws IOException
IOException
public SOAPDocumentImpl getDocument()
getDocument
in interface SOAPDocument
public SOAPPartImpl getSOAPPart()
getSOAPPart
in interface SOAPDocument
public DocumentType getDoctype()
getDoctype
in interface Document
public DOMImplementation getImplementation()
getImplementation
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
protected void doGetDocumentElement()
public Element createElement(String tagName) throws DOMException
createElement
in interface Document
DOMException
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
public Text createTextNode(String data)
createTextNode
in interface Document
public Comment createComment(String data)
createComment
in interface Document
public CDATASection createCDATASection(String data) throws DOMException
createCDATASection
in interface Document
DOMException
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction
in interface Document
DOMException
public Attr createAttribute(String name) throws DOMException
createAttribute
in interface Document
DOMException
public EntityReference createEntityReference(String name) throws DOMException
createEntityReference
in interface Document
DOMException
public NodeList getElementsByTagName(String tagname)
getElementsByTagName
in interface Document
public Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
in interface Document
DOMException
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS
in interface Document
DOMException
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS
in interface Document
DOMException
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Document
public Element getElementById(String elementId)
getElementById
in interface Document
public Node appendChild(Node newChild) throws DOMException
appendChild
in interface Node
DOMException
protected SOAPPartImpl doCloneNode()
public NamedNodeMap getAttributes()
getAttributes
in interface Node
public NodeList getChildNodes()
getChildNodes
in interface Node
public Node getFirstChild()
getFirstChild
in interface Node
public Node getLastChild()
getLastChild
in interface Node
public String getLocalName()
getLocalName
in interface Node
public String getNamespaceURI()
getNamespaceURI
in interface Node
public Node getNextSibling()
getNextSibling
in interface Node
public String getNodeName()
getNodeName
in interface Node
public short getNodeType()
getNodeType
in interface Node
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
DOMException
public Document getOwnerDocument()
getOwnerDocument
in interface Node
public Node getParentNode()
getParentNode
in interface Node
public Node getPreviousSibling()
getPreviousSibling
in interface Node
public boolean hasAttributes()
hasAttributes
in interface Node
public boolean hasChildNodes()
hasChildNodes
in interface Node
public Node insertBefore(Node arg0, Node arg1) throws DOMException
insertBefore
in interface Node
DOMException
public boolean isSupported(String arg0, String arg1)
isSupported
in interface Node
public Node removeChild(Node arg0) throws DOMException
removeChild
in interface Node
DOMException
public Node replaceChild(Node arg0, Node arg1) throws DOMException
replaceChild
in interface Node
DOMException
public void setNodeValue(String arg0) throws DOMException
setNodeValue
in interface Node
DOMException
public void setPrefix(String arg0) throws DOMException
setPrefix
in interface Node
DOMException
protected XMLDeclarationParser lookForXmlDecl() throws SOAPException
SOAPException
public void setSourceCharsetEncoding(String charset)
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
renameNode
in interface Document
DOMException
public void normalizeDocument()
normalizeDocument
in interface Document
public DOMConfiguration getDomConfig()
getDomConfig
in interface Document
public Node adoptNode(Node source) throws DOMException
adoptNode
in interface Document
DOMException
public void setDocumentURI(String documentURI)
setDocumentURI
in interface Document
public String getDocumentURI()
getDocumentURI
in interface Document
public void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking
in interface Document
public String getInputEncoding()
getInputEncoding
in interface Document
public String getXmlEncoding()
getXmlEncoding
in interface Document
public boolean getXmlStandalone()
getXmlStandalone
in interface Document
public void setXmlStandalone(boolean xmlStandalone) throws DOMException
setXmlStandalone
in interface Document
DOMException
public String getXmlVersion()
getXmlVersion
in interface Document
public void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion
in interface Document
DOMException
public boolean getStrictErrorChecking()
getStrictErrorChecking
in interface Document
public String getBaseURI()
getBaseURI
in interface Node
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
DOMException
public String getTextContent() throws DOMException
getTextContent
in interface Node
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
DOMException
public boolean isSameNode(Node other)
isSameNode
in interface Node
public String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
public boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
public String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
public boolean isEqualNode(Node arg)
isEqualNode
in interface Node
public Object getFeature(String feature, String version)
getFeature
in interface Node
public Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
public Object getUserData(String key)
getUserData
in interface Node
public void recycleNode()
Node
Node
object is no longer being used by the application and that the
implementation is free to reuse this object for nodes that may
be created later.
Calling the method recycleNode
implies that the method
detachNode
has been called previously.
public String getValue()
Node
Text
node or the
value of the immediate child of this node otherwise.
If there is an immediate child of this Node
that it is a
Text
node then it's value will be returned. If there is
more than one Text
node then the value of the first
Text
Node will be returned.
Otherwise null
is returned.String
with the text of this node if this is a
Text
node or the text contained by the first
immediate child of this Node
object that is a
Text
object if such a child exists;
null
otherwise.public void setValue(String value)
Node
Text
node, or if
there are no children in which case a child Text
node will be
created.public void setParentElement(SOAPElement parent) throws SOAPException
Node
Node
object to the given
SOAPElement
object.parent
- the SOAPElement
object to be set as
the parent of this Node
objectSOAPException
- if there is a problem in setting the
parent to the given elementNode.getParentElement()
public SOAPElement getParentElement()
Node
Node
object.
This method can throw an UnsupportedOperationException
if the tree is not kept in memory.SOAPElement
object that is the parent of
this Node
object or null
if this
Node
object is rootNode.setParentElement(javax.xml.soap.SOAPElement)
public void detachNode()
Node
Node
object from the tree.public String getSourceCharsetEncoding()
public abstract String getSOAPNamespace()
Copyright © 2019 JBoss by Red Hat. All rights reserved.