org.apache.axis.message

Class SOAPDocumentImpl

Implemented Interfaces:
Document, java.io.Serializable

public class SOAPDocumentImpl
extends java.lang.Object
implements Document, java.io.Serializable

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:
Serialized Form

Field Summary

protected Document
delegate
protected SOAPPart
soapPart

Constructor Summary

SOAPDocumentImpl(SOAPPart sp)
Construct the Document

Method Summary

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)
Attribute is not particularly dealt with in SAAJ.
CDATASection
createCDATASection(String data)
Creates a CDATASection node whose value is the specified string.
Comment
createComment(String data)
Creates a Comment node given the specified string.
DocumentFragment
createDocumentFragment()
Creates an empty DocumentFragment object.
Element
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???
Element
createElementNS(String namespaceURI, String qualifiedName)
Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)
EntityReference
createEntityReference(String name)
ProcessingInstruction
createProcessingInstruction(String target, String data)
Creates a ProcessingInstruction node given the specified name and data strings.
org.w3c.dom.Text
createTextNode(String data)
Creates a Text node given the specified string.
NamedNodeMap
getAttributes()
String
getBaseURI()
DOM Level 3 stubs
NodeList
getChildNodes()
DocumentType
getDoctype()
Element
getDocumentElement()
should not be called, the method will be handled in SOAPPart
String
getDocumentURI()
DOMConfiguration
getDomConfig()
Element
getElementById(String elementId)
Returns the Element whose ID is given by elementId.
NodeList
getElementsByTagName(String localName)
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name
NodeList
getElementsByTagNameNS(String namespaceURI, String localName)
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name
Object
getFeature(String feature, String version)
Node
getFirstChild()
Do we have to count the Attributes as node ????
DOMImplementation
getImplementation()
String
getInputEncoding()
Node
getLastChild()
String
getLocalName()
String
getNamespaceURI()
Node
getNextSibling()
String
getNodeName()
Node Implementation
short
getNodeType()
override it in sub-classes
String
getNodeValue()
Document
getOwnerDocument()
we have to have a link to them...
Node
getParentNode()
String
getPrefix()
Node
getPreviousSibling()
boolean
getStrictErrorChecking()
String
getTextContent()
Object
getUserData(String key)
String
getXmlEncoding()
boolean
getXmlStandalone()
String
getXmlVersion()
boolean
hasAttributes()
boolean
hasChildNodes()
Node
importNode(Node importedNode, boolean deep)
Node
insertBefore(Node newChild, Node refChild)
boolean
isDefaultNamespace(String namespaceURI)
boolean
isEqualNode(Node arg)
boolean
isSameNode(Node other)
boolean
isSupported(String feature, String version)
String
lookupNamespaceURI(String prefix)
String
lookupPrefix(String namespaceURI)
void
normalize()
void
normalizeDocument()
Node
removeChild(Node oldChild)
Node
renameNode(Node n, String namespaceURI, String qualifiedName)
Node
replaceChild(Node newChild, Node oldChild)
void
setDocumentURI(String documentURI)
void
setNamespaceURI(String nsURI)
void
setNodeValue(String nodeValue)
void
setPrefix(String prefix)
void
setStrictErrorChecking(boolean strictErrorChecking)
void
setTextContent(String textContent)
Object
setUserData(String key, Object data, UserDataHandler handler)
void
setXmlStandalone(boolean xmlStandalone)
void
setXmlVersion(String xmlVersion)

Field Details

delegate

protected Document delegate

soapPart

protected SOAPPart soapPart

Constructor Details

SOAPDocumentImpl

public SOAPDocumentImpl(SOAPPart sp)
Construct the Document
Parameters:
sp - the soap part

Method Details

adoptNode

public Node adoptNode(Node source)

appendChild

public Node appendChild(Node newChild)
            throws DOMException

cloneNode

public Node cloneNode(boolean deep)

compareDocumentPosition

public short compareDocumentPosition(Node other)

createAttribute

public Attr createAttribute(String name)
            throws DOMException

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
            throws DOMException
Attribute is not particularly dealt with in SAAJ.

createCDATASection

public CDATASection createCDATASection(String data)
            throws DOMException
Creates a CDATASection node whose value is the specified string.
Parameters:
data - The data for the CDATASection contents.
Returns:
The new CDATASection object.

createComment

public Comment createComment(String data)
Creates a Comment node given the specified string.
Parameters:
data - The data for the node.
Returns:
The new Comment object.

createDocumentFragment

public DocumentFragment createDocumentFragment()
Creates an empty DocumentFragment object. @todo not implemented yet
Returns:
A new DocumentFragment.

createElement

public Element createElement(String tagName)
            throws DOMException
based on the tagName, we will make different kind SOAP Elements Instance Is really we can determine the Type by the Tagname???
Parameters:
tagName -
Returns:

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)
            throws DOMException
Return SOAPElements (what if they want SOAPEnvelope or Header/Body?)
Parameters:
namespaceURI -
qualifiedName -
Returns:

createEntityReference

public EntityReference createEntityReference(String name)
            throws DOMException
Parameters:
name -
Returns:

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target,
                                                         String data)
            throws DOMException
Creates a ProcessingInstruction node given the specified name and data strings.
Parameters:
target - The target part of the processing instruction.
data - The data for the node.
Returns:
The new ProcessingInstruction object.

createTextNode

public org.w3c.dom.Text createTextNode(String data)
Creates a Text node given the specified string.
Parameters:
data - The data for the node.
Returns:
The new Text object.

getAttributes

public NamedNodeMap getAttributes()

getBaseURI

public String getBaseURI()
DOM Level 3 stubs

getChildNodes

public NodeList getChildNodes()

getDoctype

public DocumentType getDoctype()
Returns:

getDocumentElement

public Element getDocumentElement()
should not be called, the method will be handled in SOAPPart
Returns:

getDocumentURI

public String getDocumentURI()

getDomConfig

public DOMConfiguration getDomConfig()

getElementById

public Element getElementById(String elementId)
Returns the Element whose ID is given by elementId. If no such element exists, returns null. Behavior is not defined if more than one element has this ID. 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 return null.
Parameters:
elementId - The unique id value for an element.
Returns:
The matching element.
Since:
DOM Level 2

getElementsByTagName

public NodeList getElementsByTagName(String localName)
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String localName)
search the SOAPPart in order of SOAPHeader and SOAPBody for the requested Element name

getFeature

public Object getFeature(String feature,
                         String version)

getFirstChild

public Node getFirstChild()
Do we have to count the Attributes as node ????
Returns:

getImplementation

public DOMImplementation getImplementation()

getInputEncoding

public String getInputEncoding()

getLastChild

public Node getLastChild()
Returns:

getLocalName

public String getLocalName()

getNamespaceURI

public String getNamespaceURI()

getNextSibling

public Node getNextSibling()

getNodeName

public String getNodeName()
Node Implementation

getNodeType

public short getNodeType()
override it in sub-classes
Returns:

getNodeValue

public String getNodeValue()
            throws DOMException

getOwnerDocument

public Document getOwnerDocument()
we have to have a link to them...

getParentNode

public Node getParentNode()

getPrefix

public String getPrefix()

getPreviousSibling

public Node getPreviousSibling()

getStrictErrorChecking

public boolean getStrictErrorChecking()

getTextContent

public String getTextContent()

getUserData

public Object getUserData(String key)

getXmlEncoding

public String getXmlEncoding()

getXmlStandalone

public boolean getXmlStandalone()

getXmlVersion

public String getXmlVersion()

hasAttributes

public boolean hasAttributes()

hasChildNodes

public boolean hasChildNodes()

importNode

public Node importNode(Node importedNode,
                       boolean deep)
            throws DOMException

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
            throws DOMException

isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)

isEqualNode

public boolean isEqualNode(Node arg)

isSameNode

public boolean isSameNode(Node other)

isSupported

public boolean isSupported(String feature,
                           String version)

lookupNamespaceURI

public String lookupNamespaceURI(String prefix)

lookupPrefix

public String lookupPrefix(String namespaceURI)

normalize

public void normalize()

normalizeDocument

public void normalizeDocument()

removeChild

public Node removeChild(Node oldChild)
            throws DOMException

renameNode

public Node renameNode(Node n,
                       String namespaceURI,
                       String qualifiedName)

replaceChild

public Node replaceChild(Node newChild,
                         Node oldChild)
            throws DOMException

setDocumentURI

public void setDocumentURI(String documentURI)

setNamespaceURI

public void setNamespaceURI(String nsURI)

setNodeValue

public void setNodeValue(String nodeValue)
            throws DOMException

setPrefix

public void setPrefix(String prefix)

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)

setTextContent

public void setTextContent(String textContent)

setUserData

public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler)

setXmlStandalone

public void setXmlStandalone(boolean xmlStandalone)

setXmlVersion

public void setXmlVersion(String xmlVersion)

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.