Package org.apache.axis.message
Class SOAPDocumentImpl
- java.lang.Object
-
- org.apache.axis.message.SOAPDocumentImpl
-
- All Implemented Interfaces:
java.io.Serializable,org.w3c.dom.Document,org.w3c.dom.Node
public class SOAPDocumentImpl extends java.lang.Object implements org.w3c.dom.Document, java.io.SerializableSOAPDcoumentImpl 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.w3c.dom.Documentdelegateprotected SOAPPartsoapPart-
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
Constructors Constructor Description SOAPDocumentImpl(SOAPPart sp)Construct the Document
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.NodeadoptNode(org.w3c.dom.Node source)org.w3c.dom.NodeappendChild(org.w3c.dom.Node newChild)org.w3c.dom.NodecloneNode(boolean deep)shortcompareDocumentPosition(org.w3c.dom.Node other)org.w3c.dom.AttrcreateAttribute(java.lang.String name)org.w3c.dom.AttrcreateAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)Attribute is not particularly dealt with in SAAJ.org.w3c.dom.CDATASectioncreateCDATASection(java.lang.String data)Creates aCDATASectionnode whose value is the specified string.org.w3c.dom.CommentcreateComment(java.lang.String data)Creates aCommentnode given the specified string.org.w3c.dom.DocumentFragmentcreateDocumentFragment()Creates an emptyDocumentFragmentobject.org.w3c.dom.ElementcreateElement(java.lang.String tagName)based on the tagName, we will make different kind SOAP Elements Instance Is really we can determine the Type by the Tagname???org.w3c.dom.ElementcreateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)org.w3c.dom.EntityReferencecreateEntityReference(java.lang.String name)org.w3c.dom.ProcessingInstructioncreateProcessingInstruction(java.lang.String target, java.lang.String data)Creates aProcessingInstructionnode given the specified name and data strings.org.w3c.dom.TextcreateTextNode(java.lang.String data)Creates aTextnode given the specified string.org.w3c.dom.NamedNodeMapgetAttributes()java.lang.StringgetBaseURI()DOM Level 3 stubsorg.w3c.dom.NodeListgetChildNodes()org.w3c.dom.DocumentTypegetDoctype()org.w3c.dom.ElementgetDocumentElement()should not be called, the method will be handled in SOAPPartjava.lang.StringgetDocumentURI()org.w3c.dom.DOMConfigurationgetDomConfig()org.w3c.dom.ElementgetElementById(java.lang.String elementId)Returns theElementwhoseIDis given byelementId.org.w3c.dom.NodeListgetElementsByTagName(java.lang.String localName)search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element nameorg.w3c.dom.NodeListgetElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element namejava.lang.ObjectgetFeature(java.lang.String feature, java.lang.String version)org.w3c.dom.NodegetFirstChild()Do we have to count the Attributes as node ????org.w3c.dom.DOMImplementationgetImplementation()java.lang.StringgetInputEncoding()org.w3c.dom.NodegetLastChild()java.lang.StringgetLocalName()java.lang.StringgetNamespaceURI()org.w3c.dom.NodegetNextSibling()java.lang.StringgetNodeName()Node ImplementationshortgetNodeType()override it in sub-classesjava.lang.StringgetNodeValue()org.w3c.dom.DocumentgetOwnerDocument()we have to have a link to them...org.w3c.dom.NodegetParentNode()java.lang.StringgetPrefix()org.w3c.dom.NodegetPreviousSibling()booleangetStrictErrorChecking()java.lang.StringgetTextContent()java.lang.ObjectgetUserData(java.lang.String key)java.lang.StringgetXmlEncoding()booleangetXmlStandalone()java.lang.StringgetXmlVersion()booleanhasAttributes()booleanhasChildNodes()org.w3c.dom.NodeimportNode(org.w3c.dom.Node importedNode, boolean deep)org.w3c.dom.NodeinsertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)booleanisDefaultNamespace(java.lang.String namespaceURI)booleanisEqualNode(org.w3c.dom.Node arg)booleanisSameNode(org.w3c.dom.Node other)booleanisSupported(java.lang.String feature, java.lang.String version)java.lang.StringlookupNamespaceURI(java.lang.String prefix)java.lang.StringlookupPrefix(java.lang.String namespaceURI)voidnormalize()voidnormalizeDocument()org.w3c.dom.NoderemoveChild(org.w3c.dom.Node oldChild)org.w3c.dom.NoderenameNode(org.w3c.dom.Node n, java.lang.String namespaceURI, java.lang.String qualifiedName)org.w3c.dom.NodereplaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)voidsetDocumentURI(java.lang.String documentURI)voidsetNamespaceURI(java.lang.String nsURI)voidsetNodeValue(java.lang.String nodeValue)voidsetPrefix(java.lang.String prefix)voidsetStrictErrorChecking(boolean strictErrorChecking)voidsetTextContent(java.lang.String textContent)java.lang.ObjectsetUserData(java.lang.String key, java.lang.Object data, org.w3c.dom.UserDataHandler handler)voidsetXmlStandalone(boolean xmlStandalone)voidsetXmlVersion(java.lang.String xmlVersion)
-
-
-
Field Detail
-
delegate
protected org.w3c.dom.Document delegate
-
soapPart
protected SOAPPart soapPart
-
-
Constructor Detail
-
SOAPDocumentImpl
public SOAPDocumentImpl(SOAPPart sp)
Construct the Document- Parameters:
sp- the soap part
-
-
Method Detail
-
getDoctype
public org.w3c.dom.DocumentType getDoctype()
- Specified by:
getDoctypein interfaceorg.w3c.dom.Document- Returns:
-
getImplementation
public org.w3c.dom.DOMImplementation getImplementation()
- Specified by:
getImplementationin interfaceorg.w3c.dom.Document
-
getDocumentElement
public org.w3c.dom.Element getDocumentElement()
should not be called, the method will be handled in SOAPPart- Specified by:
getDocumentElementin interfaceorg.w3c.dom.Document- Returns:
-
createElement
public org.w3c.dom.Element createElement(java.lang.String tagName) throws org.w3c.dom.DOMExceptionbased on the tagName, we will make different kind SOAP Elements Instance Is really we can determine the Type by the Tagname???- Specified by:
createElementin interfaceorg.w3c.dom.Document- Parameters:
tagName-- Returns:
- Throws:
org.w3c.dom.DOMException
-
createDocumentFragment
public org.w3c.dom.DocumentFragment createDocumentFragment()
Creates an emptyDocumentFragmentobject. @todo not implemented yet- Specified by:
createDocumentFragmentin interfaceorg.w3c.dom.Document- Returns:
- A new
DocumentFragment.
-
createTextNode
public org.w3c.dom.Text createTextNode(java.lang.String data)
Creates aTextnode given the specified string.- Specified by:
createTextNodein interfaceorg.w3c.dom.Document- Parameters:
data- The data for the node.- Returns:
- The new
Textobject.
-
createComment
public org.w3c.dom.Comment createComment(java.lang.String data)
Creates aCommentnode given the specified string.- Specified by:
createCommentin interfaceorg.w3c.dom.Document- Parameters:
data- The data for the node.- Returns:
- The new
Commentobject.
-
createCDATASection
public org.w3c.dom.CDATASection createCDATASection(java.lang.String data) throws org.w3c.dom.DOMExceptionCreates aCDATASectionnode whose value is the specified string.- Specified by:
createCDATASectionin interfaceorg.w3c.dom.Document- Parameters:
data- The data for theCDATASectioncontents.- Returns:
- The new
CDATASectionobject. - Throws:
org.w3c.dom.DOMException- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-
createProcessingInstruction
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws org.w3c.dom.DOMExceptionCreates aProcessingInstructionnode given the specified name and data strings.- Specified by:
createProcessingInstructionin interfaceorg.w3c.dom.Document- Parameters:
target- The target part of the processing instruction.data- The data for the node.- Returns:
- The new
ProcessingInstructionobject. - Throws:
org.w3c.dom.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
public org.w3c.dom.Attr createAttribute(java.lang.String name) throws org.w3c.dom.DOMException- Specified by:
createAttributein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
createEntityReference
public org.w3c.dom.EntityReference createEntityReference(java.lang.String name) throws org.w3c.dom.DOMException- Specified by:
createEntityReferencein interfaceorg.w3c.dom.Document- Parameters:
name-- Returns:
- Throws:
org.w3c.dom.DOMException
-
importNode
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep) throws org.w3c.dom.DOMException- Specified by:
importNodein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
createElementNS
public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws org.w3c.dom.DOMExceptionReturn SOAPElements (what if they want SOAPEnvelope or Header/Body?)- Specified by:
createElementNSin interfaceorg.w3c.dom.Document- Parameters:
namespaceURI-qualifiedName-- Returns:
- Throws:
org.w3c.dom.DOMException
-
createAttributeNS
public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws org.w3c.dom.DOMExceptionAttribute is not particularly dealt with in SAAJ.- Specified by:
createAttributeNSin interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getElementsByTagNameNS
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name- Specified by:
getElementsByTagNameNSin interfaceorg.w3c.dom.Document
-
getElementsByTagName
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String localName)
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name- Specified by:
getElementsByTagNamein interfaceorg.w3c.dom.Document
-
getElementById
public org.w3c.dom.Element getElementById(java.lang.String elementId)
Returns theElementwhoseIDis 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:
getElementByIdin interfaceorg.w3c.dom.Document- Parameters:
elementId- The uniqueidvalue for an element.- Returns:
- The matching element.
- Since:
- DOM Level 2
-
getNodeName
public java.lang.String getNodeName()
Node Implementation- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node
-
getNodeValue
public java.lang.String getNodeValue() throws org.w3c.dom.DOMException- Specified by:
getNodeValuein interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
setNodeValue
public void setNodeValue(java.lang.String nodeValue) throws org.w3c.dom.DOMException- Specified by:
setNodeValuein interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
getNodeType
public short getNodeType()
override it in sub-classes- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node- Returns:
-
getParentNode
public org.w3c.dom.Node getParentNode()
- Specified by:
getParentNodein interfaceorg.w3c.dom.Node
-
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
- Specified by:
getChildNodesin interfaceorg.w3c.dom.Node
-
getFirstChild
public org.w3c.dom.Node getFirstChild()
Do we have to count the Attributes as node ????- Specified by:
getFirstChildin interfaceorg.w3c.dom.Node- Returns:
-
getLastChild
public org.w3c.dom.Node getLastChild()
- Specified by:
getLastChildin interfaceorg.w3c.dom.Node- Returns:
-
getPreviousSibling
public org.w3c.dom.Node getPreviousSibling()
- Specified by:
getPreviousSiblingin interfaceorg.w3c.dom.Node
-
getNextSibling
public org.w3c.dom.Node getNextSibling()
- Specified by:
getNextSiblingin interfaceorg.w3c.dom.Node
-
getAttributes
public org.w3c.dom.NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceorg.w3c.dom.Node
-
getOwnerDocument
public org.w3c.dom.Document getOwnerDocument()
we have to have a link to them...- Specified by:
getOwnerDocumentin interfaceorg.w3c.dom.Node
-
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException- Specified by:
insertBeforein interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException- Specified by:
replaceChildin interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException- Specified by:
removeChildin interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException- Specified by:
appendChildin interfaceorg.w3c.dom.Node- Throws:
org.w3c.dom.DOMException
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodesin interfaceorg.w3c.dom.Node
-
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
- Specified by:
cloneNodein interfaceorg.w3c.dom.Node
-
normalize
public void normalize()
- Specified by:
normalizein interfaceorg.w3c.dom.Node
-
isSupported
public boolean isSupported(java.lang.String feature, java.lang.String version)- Specified by:
isSupportedin interfaceorg.w3c.dom.Node
-
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefixin interfaceorg.w3c.dom.Node
-
setPrefix
public void setPrefix(java.lang.String prefix)
- Specified by:
setPrefixin interfaceorg.w3c.dom.Node
-
getNamespaceURI
public java.lang.String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceorg.w3c.dom.Node
-
setNamespaceURI
public void setNamespaceURI(java.lang.String nsURI)
-
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalNamein interfaceorg.w3c.dom.Node
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributesin interfaceorg.w3c.dom.Node
-
getBaseURI
public java.lang.String getBaseURI()
DOM Level 3 stubs- Specified by:
getBaseURIin interfaceorg.w3c.dom.Node
-
getXmlStandalone
public boolean getXmlStandalone()
- Specified by:
getXmlStandalonein interfaceorg.w3c.dom.Document
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
- Specified by:
getStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone)
- Specified by:
setXmlStandalonein interfaceorg.w3c.dom.Document
-
renameNode
public org.w3c.dom.Node renameNode(org.w3c.dom.Node n, java.lang.String namespaceURI, java.lang.String qualifiedName)- Specified by:
renameNodein interfaceorg.w3c.dom.Document
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
- Specified by:
setStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
setUserData
public java.lang.Object setUserData(java.lang.String key, java.lang.Object data, org.w3c.dom.UserDataHandler handler)- Specified by:
setUserDatain interfaceorg.w3c.dom.Node
-
getInputEncoding
public java.lang.String getInputEncoding()
- Specified by:
getInputEncodingin interfaceorg.w3c.dom.Document
-
getXmlEncoding
public java.lang.String getXmlEncoding()
- Specified by:
getXmlEncodingin interfaceorg.w3c.dom.Document
-
setTextContent
public void setTextContent(java.lang.String textContent)
- Specified by:
setTextContentin interfaceorg.w3c.dom.Node
-
isSameNode
public boolean isSameNode(org.w3c.dom.Node other)
- Specified by:
isSameNodein interfaceorg.w3c.dom.Node
-
getDocumentURI
public java.lang.String getDocumentURI()
- Specified by:
getDocumentURIin interfaceorg.w3c.dom.Document
-
setDocumentURI
public void setDocumentURI(java.lang.String documentURI)
- Specified by:
setDocumentURIin interfaceorg.w3c.dom.Document
-
getFeature
public java.lang.Object getFeature(java.lang.String feature, java.lang.String version)- Specified by:
getFeaturein interfaceorg.w3c.dom.Node
-
adoptNode
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
- Specified by:
adoptNodein interfaceorg.w3c.dom.Document
-
isDefaultNamespace
public boolean isDefaultNamespace(java.lang.String namespaceURI)
- Specified by:
isDefaultNamespacein interfaceorg.w3c.dom.Node
-
isEqualNode
public boolean isEqualNode(org.w3c.dom.Node arg)
- Specified by:
isEqualNodein interfaceorg.w3c.dom.Node
-
setXmlVersion
public void setXmlVersion(java.lang.String xmlVersion)
- Specified by:
setXmlVersionin interfaceorg.w3c.dom.Document
-
getXmlVersion
public java.lang.String getXmlVersion()
- Specified by:
getXmlVersionin interfaceorg.w3c.dom.Document
-
lookupPrefix
public java.lang.String lookupPrefix(java.lang.String namespaceURI)
- Specified by:
lookupPrefixin interfaceorg.w3c.dom.Node
-
getUserData
public java.lang.Object getUserData(java.lang.String key)
- Specified by:
getUserDatain interfaceorg.w3c.dom.Node
-
getTextContent
public java.lang.String getTextContent()
- Specified by:
getTextContentin interfaceorg.w3c.dom.Node
-
normalizeDocument
public void normalizeDocument()
- Specified by:
normalizeDocumentin interfaceorg.w3c.dom.Document
-
lookupNamespaceURI
public java.lang.String lookupNamespaceURI(java.lang.String prefix)
- Specified by:
lookupNamespaceURIin interfaceorg.w3c.dom.Node
-
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
- Specified by:
getDomConfigin interfaceorg.w3c.dom.Document
-
compareDocumentPosition
public short compareDocumentPosition(org.w3c.dom.Node other)
- Specified by:
compareDocumentPositionin interfaceorg.w3c.dom.Node
-
-