Package org.apache.axis.message
Class SOAPDocumentImpl
java.lang.Object
org.apache.axis.message.SOAPDocumentImpl
- All Implemented Interfaces:
Serializable
,Document
,Node
SOAPDcoumentImpl implements the Document API for SOAPPART. At the moment, it
again delgate the XERCES DOM Implementation Here is my argument on it: I
guess that there is 3 way to implement this. - fully implement the DOM API
here myself. => This is too much and duplicated work. - extends XERCES
Implementation => this makes we are fixed to one Implementation - choose
delgate depends on the user's parser preference => This is the practically
best solution I have now
- Author:
- Heejune Ahn (cityboy@tmax.co.kr)
- See Also:
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node newChild) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) createAttribute
(String name) createAttributeNS
(String namespaceURI, String qualifiedName) Attribute is not particularly dealt with in SAAJ.createCDATASection
(String data) Creates aCDATASection
node whose value is the specified string.createComment
(String data) Creates aComment
node given the specified string.Creates an emptyDocumentFragment
object.createElement
(String tagName) based on the tagName, we will make different kind SOAP Elements Instance Is really we can determine the Type by the Tagname???createElementNS
(String namespaceURI, String qualifiedName) Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)createEntityReference
(String name) createProcessingInstruction
(String target, String data) Creates aProcessingInstruction
node given the specified name and data strings.createTextNode
(String data) Creates aText
node given the specified string.DOM Level 3 stubsshould not be called, the method will be handled in SOAPPartgetElementById
(String elementId) Returns theElement
whoseID
is given byelementId
.getElementsByTagName
(String localName) search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element namegetElementsByTagNameNS
(String namespaceURI, String localName) search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element namegetFeature
(String feature, String version) Do we have to count the Attributes as node ????Node Implementationshort
override it in sub-classeswe have to have a link to them...boolean
getUserData
(String key) boolean
boolean
boolean
importNode
(Node importedNode, boolean deep) insertBefore
(Node newChild, Node refChild) boolean
isDefaultNamespace
(String namespaceURI) boolean
isEqualNode
(Node arg) boolean
isSameNode
(Node other) boolean
isSupported
(String feature, String version) lookupNamespaceURI
(String prefix) lookupPrefix
(String namespaceURI) void
void
removeChild
(Node oldChild) renameNode
(Node n, String namespaceURI, String qualifiedName) replaceChild
(Node newChild, Node oldChild) void
setDocumentURI
(String documentURI) void
setNamespaceURI
(String nsURI) void
setNodeValue
(String nodeValue) void
void
setStrictErrorChecking
(boolean strictErrorChecking) void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) void
setXmlStandalone
(boolean xmlStandalone) void
setXmlVersion
(String xmlVersion)
-
Field Details
-
delegate
-
soapPart
-
-
Constructor Details
-
SOAPDocumentImpl
Construct the Document- Parameters:
sp
- the soap part
-
-
Method Details
-
getDoctype
- Specified by:
getDoctype
in interfaceDocument
- Returns:
-
getImplementation
- Specified by:
getImplementation
in interfaceDocument
-
getDocumentElement
should not be called, the method will be handled in SOAPPart- Specified by:
getDocumentElement
in interfaceDocument
- Returns:
-
createElement
based on the tagName, we will make different kind SOAP Elements Instance Is really we can determine the Type by the Tagname???- Specified by:
createElement
in interfaceDocument
- Parameters:
tagName
-- Returns:
- @throws DOMException
- Throws:
DOMException
-
createDocumentFragment
Creates an emptyDocumentFragment
object. @todo not implemented yet- Specified by:
createDocumentFragment
in interfaceDocument
- Returns:
- A new
DocumentFragment
.
-
createTextNode
Creates aText
node given the specified string.- Specified by:
createTextNode
in interfaceDocument
- Parameters:
data
- The data for the node.- Returns:
- The new
Text
object.
-
createComment
Creates aComment
node given the specified string.- Specified by:
createComment
in interfaceDocument
- Parameters:
data
- The data for the node.- Returns:
- The new
Comment
object.
-
createCDATASection
Creates aCDATASection
node whose value is the specified string.- Specified by:
createCDATASection
in interfaceDocument
- Parameters:
data
- The data for theCDATASection
contents.- Returns:
- The new
CDATASection
object. - Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException Creates aProcessingInstruction
node given the specified name and data strings.- Specified by:
createProcessingInstruction
in interfaceDocument
- Parameters:
target
- The target part of the processing instruction.data
- The data for the node.- Returns:
- The new
ProcessingInstruction
object. - Throws:
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-
createAttribute
- Specified by:
createAttribute
in interfaceDocument
- Throws:
DOMException
-
createEntityReference
- Specified by:
createEntityReference
in interfaceDocument
- Parameters:
name
-- Returns:
- @throws DOMException
- Throws:
DOMException
-
importNode
- Specified by:
importNode
in interfaceDocument
- Throws:
DOMException
-
createElementNS
Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)- Specified by:
createElementNS
in interfaceDocument
- Parameters:
namespaceURI
-qualifiedName
-- Returns:
- @throws DOMException
- Throws:
DOMException
-
createAttributeNS
Attribute is not particularly dealt with in SAAJ.- Specified by:
createAttributeNS
in interfaceDocument
- Throws:
DOMException
-
getElementsByTagNameNS
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name- Specified by:
getElementsByTagNameNS
in interfaceDocument
-
getElementsByTagName
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name- Specified by:
getElementsByTagName
in interfaceDocument
-
getElementById
Returns theElement
whoseID
is given byelementId
. If no such element exists, returnsnull
. Behavior is not defined if more than one element has thisID
. The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to returnnull
.- Specified by:
getElementById
in interfaceDocument
- Parameters:
elementId
- The uniqueid
value for an element.- Returns:
- The matching element.
- Since:
- DOM Level 2
-
getNodeName
Node Implementation- Specified by:
getNodeName
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
getNodeType
public short getNodeType()override it in sub-classes- Specified by:
getNodeType
in interfaceNode
- Returns:
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
Do we have to count the Attributes as node ????- Specified by:
getFirstChild
in interfaceNode
- Returns:
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
- Returns:
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getOwnerDocument
we have to have a link to them...- Specified by:
getOwnerDocument
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
cloneNode
-
normalize
public void normalize() -
isSupported
- Specified by:
isSupported
in interfaceNode
-
getPrefix
-
setPrefix
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNode
-
setNamespaceURI
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
getBaseURI
DOM Level 3 stubs- Specified by:
getBaseURI
in interfaceNode
-
getXmlStandalone
public boolean getXmlStandalone()- Specified by:
getXmlStandalone
in interfaceDocument
-
getStrictErrorChecking
public boolean getStrictErrorChecking()- Specified by:
getStrictErrorChecking
in interfaceDocument
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) - Specified by:
setXmlStandalone
in interfaceDocument
-
renameNode
- Specified by:
renameNode
in interfaceDocument
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking) - Specified by:
setStrictErrorChecking
in interfaceDocument
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getInputEncoding
- Specified by:
getInputEncoding
in interfaceDocument
-
getXmlEncoding
- Specified by:
getXmlEncoding
in interfaceDocument
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
getDocumentURI
- Specified by:
getDocumentURI
in interfaceDocument
-
setDocumentURI
- Specified by:
setDocumentURI
in interfaceDocument
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
adoptNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
setXmlVersion
- Specified by:
setXmlVersion
in interfaceDocument
-
getXmlVersion
- Specified by:
getXmlVersion
in interfaceDocument
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
-
normalizeDocument
public void normalizeDocument()- Specified by:
normalizeDocument
in interfaceDocument
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
getDomConfig
- Specified by:
getDomConfig
in interfaceDocument
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
-