java.lang.Object
jakarta.xml.soap.SOAPPart
com.sun.xml.messaging.saaj.soap.SOAPPartImpl
- All Implemented Interfaces:
SOAPDocument
,Node
,Document
,Node
- Direct Known Subclasses:
SOAPPart1_1Impl
,SOAPPart1_2Impl
SOAPPartImpl is the first attachment. This contains the XML/SOAP document.
-
Field Summary
Modifier and TypeFieldDescriptionprotected SOAPDocumentImpl
protected Envelope
protected MimeHeaders
protected MessageImpl
Reference to containing message (may be null)protected boolean
protected Source
protected String
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMimeHeader
(String name, String value) Creates aMimeHeader
object with the specified name and value and adds it to thisSOAPPart
object.appendChild
(Node newChild) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) createAttribute
(String name) createAttributeNS
(String namespaceURI, String qualifiedName) createCDATASection
(String data) createComment
(String data) createElement
(String tagName) createElementNS
(String namespaceURI, String qualifiedName) protected abstract Envelope
createEmptyEnvelope
(String prefix) createEntityReference
(String name) protected abstract Envelope
createProcessingInstruction
(String target, String data) createTextNode
(String data) void
Removes thisNode
object from the tree.protected SOAPPartImpl
protected void
protected abstract SOAPPartImpl
Retrieves all the headers for thisSOAPPart
object as an iterator over theMimeHeader
objects.Returns the content of the SOAPEnvelope as a JAXPSource
object.protected abstract String
protected String
getElementById
(String elementId) getElementsByTagName
(String tagname) getElementsByTagNameNS
(String namespaceURI, String localName) Gets theSOAPEnvelope
object associated with thisSOAPPart
object.getFeature
(String feature, String version) getMatchingMimeHeaders
(String[] names) Retrieves allMimeHeader
objects that match a name in the given array.String[]
getMimeHeader
(String name) Gets all the values of theMimeHeader
object in thisSOAPPart
object that is identified by the givenString
.short
getNonMatchingMimeHeaders
(String[] names) Retrieves allMimeHeader
objects whose name does not match a name in the given array.Returns the parent element of thisNode
object.abstract String
boolean
getUserData
(String key) getValue()
Returns the value of this node if this is aText
node or the value of the immediate child of this node otherwise.boolean
boolean
boolean
importNode
(Node importedNode, boolean deep) insertBefore
(Node arg0, Node arg1) boolean
isDefaultNamespace
(String namespaceURI) boolean
isEqualNode
(Node arg) boolean
boolean
isSameNode
(Node other) boolean
isSupported
(String arg0, String arg1) protected void
protected XMLDeclarationParser
lookupNamespaceURI
(String prefix) lookupPrefix
(String namespaceURI) void
void
void
Notifies the implementation that thisNode
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
Removes all theMimeHeader
objects for thisSOAPEnvelope
object.removeChild
(Node arg0) void
removeMimeHeader
(String header) Removes all MIME headers that match the given name.renameNode
(Node n, String namespaceURI, String qualifiedName) replaceChild
(Node arg0, Node arg1) void
setContent
(Source source) Sets the content of theSOAPEnvelope
object with the data from the givenSource
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 thisNode
object to the givenSOAPElement
object.void
void
setSourceCharsetEncoding
(String charset) void
setStrictErrorChecking
(boolean strictErrorChecking) void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) void
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) Methods inherited from class jakarta.xml.soap.SOAPPart
getContentId, getContentLocation, setContentId, setContentLocation
-
Field Details
-
headers
-
envelope
-
source
-
document
-
omitXmlDecl
protected boolean omitXmlDecl -
sourceCharsetEncoding
-
message
Reference to containing message (may be null)
-
-
Constructor Details
-
SOAPPartImpl
protected SOAPPartImpl() -
SOAPPartImpl
-
-
Method Details
-
getContentType
-
createEnvelopeFromSource
- Throws:
SOAPException
-
createEmptyEnvelope
- Throws:
SOAPException
-
duplicateType
-
getContentTypeString
-
isFastInfoset
public boolean isFastInfoset() -
getEnvelope
Description copied from class:SOAPPart
Gets theSOAPEnvelope
object associated with thisSOAPPart
object. Once the SOAP envelope is obtained, it can be used to get its contents.- Specified by:
getEnvelope
in classSOAPPart
- Returns:
- the
SOAPEnvelope
object for thisSOAPPart
object - Throws:
SOAPException
- if there is a SOAP error
-
lookForEnvelope
- Throws:
SOAPException
-
removeAllMimeHeaders
public void removeAllMimeHeaders()Description copied from class:SOAPPart
Removes all theMimeHeader
objects for thisSOAPEnvelope
object.- Specified by:
removeAllMimeHeaders
in classSOAPPart
-
removeMimeHeader
Description copied from class:SOAPPart
Removes all MIME headers that match the given name.- Specified by:
removeMimeHeader
in classSOAPPart
- Parameters:
header
- aString
giving the name of the MIME header(s) to be removed
-
getMimeHeader
Description copied from class:SOAPPart
Gets all the values of theMimeHeader
object in thisSOAPPart
object that is identified by the givenString
.- Specified by:
getMimeHeader
in classSOAPPart
- Parameters:
name
- the name of the header; example: "Content-Type"- Returns:
- a
String
array giving all the values for the specified header - See Also:
-
setMimeHeader
Description copied from class:SOAPPart
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. If there is a match, this method clears all existing values for the first header that matches and sets the given value instead. If more than one header has the given name, this method removes all the matching headers after the first one.Note that RFC822 headers can contain only US-ASCII characters.
- Specified by:
setMimeHeader
in classSOAPPart
- Parameters:
name
- aString
giving the header name for which to searchvalue
- aString
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 newMimeHeader
object.- See Also:
-
addMimeHeader
Description copied from class:SOAPPart
Creates aMimeHeader
object with the specified name and value and adds it to thisSOAPPart
object. If aMimeHeader
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.
- Specified by:
addMimeHeader
in classSOAPPart
- Parameters:
name
- aString
giving the header namevalue
- aString
giving the value to be set or added
-
getAllMimeHeaders
Description copied from class:SOAPPart
Retrieves all the headers for thisSOAPPart
object as an iterator over theMimeHeader
objects.- Specified by:
getAllMimeHeaders
in classSOAPPart
- Returns:
- an
Iterator
object with all the Mime headers for thisSOAPPart
object
-
getMatchingMimeHeaders
Description copied from class:SOAPPart
Retrieves allMimeHeader
objects that match a name in the given array.- Specified by:
getMatchingMimeHeaders
in classSOAPPart
- Parameters:
names
- aString
array with the name(s) of the MIME headers to be returned- Returns:
- all the MIME headers that match one of the names in the
given array, returned as an
Iterator
object
-
getNonMatchingMimeHeaders
Description copied from class:SOAPPart
Retrieves allMimeHeader
objects whose name does not match a name in the given array.- Specified by:
getNonMatchingMimeHeaders
in classSOAPPart
- Parameters:
names
- aString
array with the name(s) of the MIME headers not to be returned- Returns:
- all the MIME headers in this
SOAPPart
object except those that match one of the names in the given array. The non-matching MIME headers are returned as anIterator
object.
-
getContent
Description copied from class:SOAPPart
Returns the content of the SOAPEnvelope as a JAXPSource
object.- Specified by:
getContent
in classSOAPPart
- Returns:
- the content as a
javax.xml.transform.Source
object - Throws:
SOAPException
- if the implementation cannot convert the specifiedSource
object- See Also:
-
setContent
Description copied from class:SOAPPart
Sets the content of theSOAPEnvelope
object with the data from the givenSource
object. ThisSource
must contain a valid SOAP document.- Specified by:
setContent
in classSOAPPart
- Parameters:
source
- thejavax.xml.transform.Source
object with the data to be set- Throws:
SOAPException
- if there is a problem in setting the source- See Also:
-
getContentAsStream
- Throws:
IOException
-
getDocument
- Specified by:
getDocument
in interfaceSOAPDocument
-
getSOAPPart
- Specified by:
getSOAPPart
in interfaceSOAPDocument
-
getDoctype
- Specified by:
getDoctype
in interfaceDocument
-
getImplementation
- Specified by:
getImplementation
in interfaceDocument
-
getDocumentElement
- Specified by:
getDocumentElement
in interfaceDocument
-
doGetDocumentElement
protected void doGetDocumentElement() -
createElement
- Specified by:
createElement
in interfaceDocument
- Throws:
DOMException
-
createDocumentFragment
- Specified by:
createDocumentFragment
in interfaceDocument
-
createTextNode
- Specified by:
createTextNode
in interfaceDocument
-
createComment
- Specified by:
createComment
in interfaceDocument
-
createCDATASection
- Specified by:
createCDATASection
in interfaceDocument
- Throws:
DOMException
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException - Specified by:
createProcessingInstruction
in interfaceDocument
- Throws:
DOMException
-
createAttribute
- Specified by:
createAttribute
in interfaceDocument
- Throws:
DOMException
-
createEntityReference
- Specified by:
createEntityReference
in interfaceDocument
- Throws:
DOMException
-
getElementsByTagName
- Specified by:
getElementsByTagName
in interfaceDocument
-
importNode
- Specified by:
importNode
in interfaceDocument
- Throws:
DOMException
-
createElementNS
- Specified by:
createElementNS
in interfaceDocument
- Throws:
DOMException
-
createAttributeNS
- Specified by:
createAttributeNS
in interfaceDocument
- Throws:
DOMException
-
getElementsByTagNameNS
- Specified by:
getElementsByTagNameNS
in interfaceDocument
-
getElementById
- Specified by:
getElementById
in interfaceDocument
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
cloneNode
-
doCloneNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNode
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getPrefix
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
normalize
public void normalize() -
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
setPrefix
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
lookForXmlDecl
- Throws:
SOAPException
-
setSourceCharsetEncoding
-
renameNode
- Specified by:
renameNode
in interfaceDocument
- Throws:
DOMException
-
normalizeDocument
public void normalizeDocument()- Specified by:
normalizeDocument
in interfaceDocument
-
getDomConfig
- Specified by:
getDomConfig
in interfaceDocument
-
adoptNode
- Specified by:
adoptNode
in interfaceDocument
- Throws:
DOMException
-
setDocumentURI
- Specified by:
setDocumentURI
in interfaceDocument
-
getDocumentURI
- Specified by:
getDocumentURI
in interfaceDocument
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking) - Specified by:
setStrictErrorChecking
in interfaceDocument
-
getInputEncoding
- Specified by:
getInputEncoding
in interfaceDocument
-
getXmlEncoding
- Specified by:
getXmlEncoding
in interfaceDocument
-
getXmlStandalone
public boolean getXmlStandalone()- Specified by:
getXmlStandalone
in interfaceDocument
-
setXmlStandalone
- Specified by:
setXmlStandalone
in interfaceDocument
- Throws:
DOMException
-
getXmlVersion
- Specified by:
getXmlVersion
in interfaceDocument
-
setXmlVersion
- Specified by:
setXmlVersion
in interfaceDocument
- Throws:
DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()- Specified by:
getStrictErrorChecking
in interfaceDocument
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
recycleNode
public void recycleNode()Description copied from interface:Node
Notifies the implementation that thisNode
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 methoddetachNode
has been called previously.- Specified by:
recycleNode
in interfaceNode
-
getValue
Description copied from interface:Node
Returns the value of this node if this is aText
node or the value of the immediate child of this node otherwise. If there is an immediate child of thisNode
that it is aText
node then it's value will be returned. If there is more than oneText
node then the value of the firstText
Node will be returned. Otherwisenull
is returned. -
setValue
Description copied from interface:Node
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. The value of the immediate child of this node can be set only if, there is one child node and that node is aText
node, or if there are no children in which case a childText
node will be created. -
setParentElement
Description copied from interface:Node
Sets the parent of thisNode
object to the givenSOAPElement
object.- Specified by:
setParentElement
in interfaceNode
- Parameters:
parent
- theSOAPElement
object to be set as the parent of thisNode
object- Throws:
SOAPException
- if there is a problem in setting the parent to the given element- See Also:
-
getParentElement
Description copied from interface:Node
Returns the parent element of thisNode
object. This method can throw anUnsupportedOperationException
if the tree is not kept in memory.- Specified by:
getParentElement
in interfaceNode
- Returns:
- the
SOAPElement
object that is the parent of thisNode
object ornull
if thisNode
object is root - See Also:
-
detachNode
public void detachNode()Description copied from interface:Node
Removes thisNode
object from the tree.- Specified by:
detachNode
in interfaceNode
-
getSourceCharsetEncoding
-
getSOAPNamespace
-