com.sun.xml.messaging.saaj.soap
Class SOAPPartImpl

java.lang.Object
  extended by javax.xml.soap.SOAPPart
      extended by com.sun.xml.messaging.saaj.soap.SOAPPartImpl
All Implemented Interfaces:
SOAPDocument, Document, Node
Direct Known Subclasses:
SOAPPart1_1Impl, SOAPPart1_2Impl

public abstract class SOAPPartImpl
extends SOAPPart
implements SOAPDocument

SOAPPartImpl is the first attachment. This contains the XML/SOAP document.

Author:
Anil Vijendran (anil@sun.com)

Field Summary
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
           
 
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
protected SOAPPartImpl()
           
protected SOAPPartImpl(MessageImpl message)
           
 
Method Summary
 void addMimeHeader(String name, String value)
           
 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()
           
protected  SOAPPartImpl doCloneNode()
           
protected  void doGetDocumentElement()
           
protected abstract  SOAPPartImpl duplicateType()
           
 Iterator getAllMimeHeaders()
           
 NamedNodeMap getAttributes()
           
 String getBaseURI()
           
 NodeList getChildNodes()
           
 Source getContent()
           
 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()
           
 Object getFeature(String feature, String version)
           
 Node getFirstChild()
           
 DOMImplementation getImplementation()
           
 String getInputEncoding()
           
 Node getLastChild()
           
 String getLocalName()
           
 Iterator getMatchingMimeHeaders(String[] names)
           
 String[] getMimeHeader(String name)
           
 String getNamespaceURI()
           
 Node getNextSibling()
           
 String getNodeName()
           
 short getNodeType()
           
 String getNodeValue()
           
 Iterator getNonMatchingMimeHeaders(String[] names)
           
 Document getOwnerDocument()
           
 SOAPElement getParentElement()
           
 Node getParentNode()
           
 String getPrefix()
           
 Node getPreviousSibling()
           
abstract  String getSOAPNamespace()
           
 SOAPPartImpl getSOAPPart()
           
 String getSourceCharsetEncoding()
           
 boolean getStrictErrorChecking()
           
 String getTextContent()
           
 Object getUserData(String key)
           
 String getValue()
           
 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()
           
 void removeAllMimeHeaders()
           
 Node removeChild(Node arg0)
           
 void removeMimeHeader(String header)
           
 Node renameNode(Node n, String namespaceURI, String qualifiedName)
           
 Node replaceChild(Node arg0, Node arg1)
           
 void setContent(Source source)
           
 void setDocumentURI(String documentURI)
           
 void setMimeHeader(String name, String value)
           
 void setNodeValue(String arg0)
           
 void setParentElement(SOAPElement parent)
           
 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)
           
 void setXmlStandalone(boolean xmlStandalone)
           
 void setXmlVersion(String xmlVersion)
           
 
Methods inherited from class javax.xml.soap.SOAPPart
getContentId, getContentLocation, setContentId, setContentLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log

headers

protected MimeHeaders headers

envelope

protected Envelope envelope

source

protected Source source

document

protected SOAPDocumentImpl document

omitXmlDecl

protected boolean omitXmlDecl

sourceCharsetEncoding

protected String sourceCharsetEncoding

message

protected MessageImpl message
Reference to containing message (may be null)

Constructor Detail

SOAPPartImpl

protected SOAPPartImpl()

SOAPPartImpl

protected SOAPPartImpl(MessageImpl message)
Method Detail

getContentType

protected abstract String getContentType()

createEnvelopeFromSource

protected abstract Envelope createEnvelopeFromSource()
                                              throws SOAPException
Throws:
SOAPException

createEmptyEnvelope

protected abstract Envelope createEmptyEnvelope(String prefix)
                                         throws SOAPException
Throws:
SOAPException

duplicateType

protected abstract SOAPPartImpl duplicateType()

getContentTypeString

protected String getContentTypeString()

isFastInfoset

public boolean isFastInfoset()

getEnvelope

public SOAPEnvelope getEnvelope()
                         throws SOAPException
Specified by:
getEnvelope in class SOAPPart
Throws:
SOAPException

lookForEnvelope

protected void lookForEnvelope()
                        throws SOAPException
Throws:
SOAPException

removeAllMimeHeaders

public void removeAllMimeHeaders()
Specified by:
removeAllMimeHeaders in class SOAPPart

removeMimeHeader

public void removeMimeHeader(String header)
Specified by:
removeMimeHeader in class SOAPPart

getMimeHeader

public String[] getMimeHeader(String name)
Specified by:
getMimeHeader in class SOAPPart

setMimeHeader

public void setMimeHeader(String name,
                          String value)
Specified by:
setMimeHeader in class SOAPPart

addMimeHeader

public void addMimeHeader(String name,
                          String value)
Specified by:
addMimeHeader in class SOAPPart

getAllMimeHeaders

public Iterator getAllMimeHeaders()
Specified by:
getAllMimeHeaders in class SOAPPart

getMatchingMimeHeaders

public Iterator getMatchingMimeHeaders(String[] names)
Specified by:
getMatchingMimeHeaders in class SOAPPart

getNonMatchingMimeHeaders

public Iterator getNonMatchingMimeHeaders(String[] names)
Specified by:
getNonMatchingMimeHeaders in class SOAPPart

getContent

public Source getContent()
                  throws SOAPException
Specified by:
getContent in class SOAPPart
Throws:
SOAPException

setContent

public void setContent(Source source)
                throws SOAPException
Specified by:
setContent in class SOAPPart
Throws:
SOAPException

getContentAsStream

public InputStream getContentAsStream()
                               throws IOException
Throws:
IOException

getDocument

public SOAPDocumentImpl getDocument()
Specified by:
getDocument in interface SOAPDocument

getSOAPPart

public SOAPPartImpl getSOAPPart()
Specified by:
getSOAPPart in interface SOAPDocument

getDoctype

public DocumentType getDoctype()
Specified by:
getDoctype in interface Document

getImplementation

public DOMImplementation getImplementation()
Specified by:
getImplementation in interface Document

getDocumentElement

public Element getDocumentElement()
Specified by:
getDocumentElement in interface Document

doGetDocumentElement

protected void doGetDocumentElement()

createElement

public Element createElement(String tagName)
                      throws DOMException
Specified by:
createElement in interface Document
Throws:
DOMException

createDocumentFragment

public DocumentFragment createDocumentFragment()
Specified by:
createDocumentFragment in interface Document

createTextNode

public Text createTextNode(String data)
Specified by:
createTextNode in interface Document

createComment

public Comment createComment(String data)
Specified by:
createComment in interface Document

createCDATASection

public CDATASection createCDATASection(String data)
                                throws DOMException
Specified by:
createCDATASection in interface Document
Throws:
DOMException

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target,
                                                         String data)
                                                  throws DOMException
Specified by:
createProcessingInstruction in interface Document
Throws:
DOMException

createAttribute

public Attr createAttribute(String name)
                     throws DOMException
Specified by:
createAttribute in interface Document
Throws:
DOMException

createEntityReference

public EntityReference createEntityReference(String name)
                                      throws DOMException
Specified by:
createEntityReference in interface Document
Throws:
DOMException

getElementsByTagName

public NodeList getElementsByTagName(String tagname)
Specified by:
getElementsByTagName in interface Document

importNode

public Node importNode(Node importedNode,
                       boolean deep)
                throws DOMException
Specified by:
importNode in interface Document
Throws:
DOMException

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)
                        throws DOMException
Specified by:
createElementNS in interface Document
Throws:
DOMException

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
                       throws DOMException
Specified by:
createAttributeNS in interface Document
Throws:
DOMException

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String localName)
Specified by:
getElementsByTagNameNS in interface Document

getElementById

public Element getElementById(String elementId)
Specified by:
getElementById in interface Document

appendChild

public Node appendChild(Node newChild)
                 throws DOMException
Specified by:
appendChild in interface Node
Throws:
DOMException

cloneNode

public Node cloneNode(boolean deep)
Specified by:
cloneNode in interface Node

doCloneNode

protected SOAPPartImpl doCloneNode()

getAttributes

public NamedNodeMap getAttributes()
Specified by:
getAttributes in interface Node

getChildNodes

public NodeList getChildNodes()
Specified by:
getChildNodes in interface Node

getFirstChild

public Node getFirstChild()
Specified by:
getFirstChild in interface Node

getLastChild

public Node getLastChild()
Specified by:
getLastChild in interface Node

getLocalName

public String getLocalName()
Specified by:
getLocalName in interface Node

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface Node

getNextSibling

public Node getNextSibling()
Specified by:
getNextSibling in interface Node

getNodeName

public String getNodeName()
Specified by:
getNodeName in interface Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface Node

getNodeValue

public String getNodeValue()
                    throws DOMException
Specified by:
getNodeValue in interface Node
Throws:
DOMException

getOwnerDocument

public Document getOwnerDocument()
Specified by:
getOwnerDocument in interface Node

getParentNode

public Node getParentNode()
Specified by:
getParentNode in interface Node

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface Node

getPreviousSibling

public Node getPreviousSibling()
Specified by:
getPreviousSibling in interface Node

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface Node

hasChildNodes

public boolean hasChildNodes()
Specified by:
hasChildNodes in interface Node

insertBefore

public Node insertBefore(Node arg0,
                         Node arg1)
                  throws DOMException
Specified by:
insertBefore in interface Node
Throws:
DOMException

isSupported

public boolean isSupported(String arg0,
                           String arg1)
Specified by:
isSupported in interface Node

normalize

public void normalize()
Specified by:
normalize in interface Node

removeChild

public Node removeChild(Node arg0)
                 throws DOMException
Specified by:
removeChild in interface Node
Throws:
DOMException

replaceChild

public Node replaceChild(Node arg0,
                         Node arg1)
                  throws DOMException
Specified by:
replaceChild in interface Node
Throws:
DOMException

setNodeValue

public void setNodeValue(String arg0)
                  throws DOMException
Specified by:
setNodeValue in interface Node
Throws:
DOMException

setPrefix

public void setPrefix(String arg0)
               throws DOMException
Specified by:
setPrefix in interface Node
Throws:
DOMException

lookForXmlDecl

protected XMLDeclarationParser lookForXmlDecl()
                                       throws SOAPException
Throws:
SOAPException

setSourceCharsetEncoding

public void setSourceCharsetEncoding(String charset)

renameNode

public Node renameNode(Node n,
                       String namespaceURI,
                       String qualifiedName)
                throws DOMException
Specified by:
renameNode in interface Document
Throws:
DOMException

normalizeDocument

public void normalizeDocument()
Specified by:
normalizeDocument in interface Document

getDomConfig

public DOMConfiguration getDomConfig()
Specified by:
getDomConfig in interface Document

adoptNode

public Node adoptNode(Node source)
               throws DOMException
Specified by:
adoptNode in interface Document
Throws:
DOMException

setDocumentURI

public void setDocumentURI(String documentURI)
Specified by:
setDocumentURI in interface Document

getDocumentURI

public String getDocumentURI()
Specified by:
getDocumentURI in interface Document

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)
Specified by:
setStrictErrorChecking in interface Document

getInputEncoding

public String getInputEncoding()
Specified by:
getInputEncoding in interface Document

getXmlEncoding

public String getXmlEncoding()
Specified by:
getXmlEncoding in interface Document

getXmlStandalone

public boolean getXmlStandalone()
Specified by:
getXmlStandalone in interface Document

setXmlStandalone

public void setXmlStandalone(boolean xmlStandalone)
                      throws DOMException
Specified by:
setXmlStandalone in interface Document
Throws:
DOMException

getXmlVersion

public String getXmlVersion()
Specified by:
getXmlVersion in interface Document

setXmlVersion

public void setXmlVersion(String xmlVersion)
                   throws DOMException
Specified by:
setXmlVersion in interface Document
Throws:
DOMException

getStrictErrorChecking

public boolean getStrictErrorChecking()
Specified by:
getStrictErrorChecking in interface Document

getBaseURI

public String getBaseURI()
Specified by:
getBaseURI in interface Node

compareDocumentPosition

public short compareDocumentPosition(Node other)
                              throws DOMException
Specified by:
compareDocumentPosition in interface Node
Throws:
DOMException

getTextContent

public String getTextContent()
                      throws DOMException
Specified by:
getTextContent in interface Node
Throws:
DOMException

setTextContent

public void setTextContent(String textContent)
                    throws DOMException
Specified by:
setTextContent in interface Node
Throws:
DOMException

isSameNode

public boolean isSameNode(Node other)
Specified by:
isSameNode in interface Node

lookupPrefix

public String lookupPrefix(String namespaceURI)
Specified by:
lookupPrefix in interface Node

isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)
Specified by:
isDefaultNamespace in interface Node

lookupNamespaceURI

public String lookupNamespaceURI(String prefix)
Specified by:
lookupNamespaceURI in interface Node

isEqualNode

public boolean isEqualNode(Node arg)
Specified by:
isEqualNode in interface Node

getFeature

public Object getFeature(String feature,
                         String version)
Specified by:
getFeature in interface Node

setUserData

public Object setUserData(String key,
                          Object data,
                          UserDataHandler handler)
Specified by:
setUserData in interface Node

getUserData

public Object getUserData(String key)
Specified by:
getUserData in interface Node

recycleNode

public void recycleNode()

getValue

public String getValue()

setValue

public void setValue(String value)

setParentElement

public void setParentElement(SOAPElement parent)
                      throws SOAPException
Throws:
SOAPException

getParentElement

public SOAPElement getParentElement()

detachNode

public void detachNode()

getSourceCharsetEncoding

public String getSourceCharsetEncoding()

getSOAPNamespace

public abstract String getSOAPNamespace()


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.