|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.soap.SOAPPart org.apache.axis.message.SOAPPartImpl org.apache.axis.message.SOAPPartAxisImpl org.apache.axis.MessagePart
The SOAPPart provides access to the root part of the Message which contains the envelope.
SOAPPart implements Part, providing common MIME operations. SOAPPart also allows access to its envelope, as a string, byte[], InputStream, or SOAPEnvelope. (This functionality used to be in Message, and has been moved here more or less verbatim pending further cleanup.)
Field Summary | |
static int |
FORM_BODYINSTREAM
|
static int |
FORM_BYTES
|
static int |
FORM_FAULT
|
static int |
FORM_INPUTSTREAM
|
static int |
FORM_SOAPENVELOPE
|
static int |
FORM_STRING
|
protected Document |
mDocument
SOAPEnvelope is the Document Elements of this XML docuement |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
MessagePart(Message parent,
Object initialContents,
boolean isBodyStream)
Create a new SOAPPart. |
Method Summary | |
void |
addMimeHeader(String header,
String value)
Add the specified MIME header, as per JAXM. |
Node |
adoptNode(Node node)
|
Node |
appendChild(Node newChild)
|
Node |
cloneNode(boolean deep)
|
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)
|
EntityReference |
createEntityReference(String name)
|
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
|
Text |
createTextNode(String data)
|
Iterator |
getAllMimeHeaders()
Retrieves all the headers for this SOAPPart
object as an iterator over the MimeHeader
objects. |
byte[] |
getAsBytes()
Get the contents of this Part (not the headers!), as a byte array. |
SOAPEnvelopeAxisImpl |
getAsSOAPEnvelope()
Get the contents of this Part (not the MIME headers!), as a SOAPEnvelope. |
String |
getAsString()
Get the contents of this Part (not the headers!), as a String. |
NamedNodeMap |
getAttributes()
|
NodeList |
getChildNodes()
|
Source |
getContent()
Returns the content of the SOAPEnvelope as a JAXP
Source object. |
String |
getContentId()
Content ID. |
String |
getContentIdRef()
Content ID. |
int |
getContentLength()
Get the content length for this SOAPPart. |
String |
getContentLocation()
Content location. |
String |
getContentType()
Content type is always "text/xml" for SOAPParts. |
Object |
getCurrentMessage()
Get the current message, in whatever form it happens to be right now. |
DocumentType |
getDoctype()
|
Element |
getDocumentElement()
|
Element |
getElementById(String elementId)
|
NodeList |
getElementsByTagName(String tagname)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
String |
getEncoding()
|
javax.xml.soap.SOAPEnvelope |
getEnvelope()
Gets the SOAPEnvelope object associated with
this SOAPPart object. |
Node |
getFirstChild()
|
DOMImplementation |
getImplementation()
|
Node |
getLastChild()
|
String |
getLocalName()
|
Iterator |
getMatchingMimeHeaders(String[] match)
Get all headers that match. |
Message |
getMessage()
Get the Message for this Part . |
String[] |
getMimeHeader(String name)
Gets all the values of the MimeHeader object
in this SOAPPart object that is identified by
the given String . |
String |
getNamespaceURI()
|
Node |
getNextSibling()
|
String |
getNodeName()
Node Implementation |
short |
getNodeType()
|
String |
getNodeValue()
|
Iterator |
getNonMatchingMimeHeaders(String[] match)
Get all headers that do not match. |
Document |
getOwnerDocument()
|
Node |
getParentNode()
|
String |
getPrefix()
|
Node |
getPreviousSibling()
|
int |
getSize()
Get the total size in bytes, including headers, of this Part. |
Document |
getSOAPDocument()
|
boolean |
getStandalone()
|
boolean |
getStrictErrorChecking()
|
String |
getVersion()
|
boolean |
hasAttributes()
|
boolean |
hasChildNodes()
|
Node |
importNode(Node importedNode,
boolean deep)
|
Node |
insertBefore(Node newChild,
Node refChild)
|
boolean |
isSupported(String feature,
String version)
|
void |
normalize()
|
void |
removeAllMimeHeaders()
Removes all the MimeHeader objects for this
SOAPEnvelope object. |
Node |
removeChild(Node oldChild)
|
void |
removeMimeHeader(String header)
Removes all MIME headers that match the given name. |
Node |
replaceChild(Node newChild,
Node oldChild)
|
void |
setContent(Source source)
Sets the content of the SOAPEnvelope object
with the data from the given Source object. |
void |
setContentId(String newCid)
Sets Content-Id of this part. |
void |
setContentLocation(String loc)
Set content location. |
void |
setCurrentMessage(Object currMsg,
int form)
Set the current message |
void |
setEncoding(String s)
|
void |
setMessage(Message msg)
Set the Message for this Part. |
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 nodeValue)
|
void |
setPrefix(String prefix)
|
void |
setSOAPEnvelope(SOAPEnvelopeAxisImpl env)
This set the SOAP Envelope for this part. |
void |
setStandalone(boolean flag)
|
void |
setStrictErrorChecking(boolean flag)
|
void |
setVersion(String s)
|
void |
writeTo(Writer writer)
Write the contents to the specified writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FORM_STRING
public static final int FORM_INPUTSTREAM
public static final int FORM_SOAPENVELOPE
public static final int FORM_BYTES
public static final int FORM_BODYINSTREAM
public static final int FORM_FAULT
protected Document mDocument
Constructor Detail |
public MessagePart(Message parent, Object initialContents, boolean isBodyStream)
parent
- the parent Message
initialContents
- the initial contens Object
isBodyStream
- if the body is in a streamMethod Detail |
public Message getMessage()
Message
for this Part
.
Message
for this Part
public void setMessage(Message msg)
msg
- the Message
for this partpublic String getContentType()
getContentType
in interface Part
public int getContentLength()
public void setSOAPEnvelope(SOAPEnvelopeAxisImpl env)
env
- the SOAPEnvelope
for this SOAPPart
public int getSize()
public void writeTo(Writer writer) throws IOException
writer
- the Writer
to write to
IOException
public Object getCurrentMessage()
public void setCurrentMessage(Object currMsg, int form)
currMsg
- form
- public byte[] getAsBytes() throws AxisFault
AxisFault
- if this Part can't be serialized to the byte arraypublic String getAsString() throws AxisFault
String
containing the content of this message
AxisFault
- if there is an error serializing this partpublic SOAPEnvelopeAxisImpl getAsSOAPEnvelope() throws AxisFault
SOAPEnvelope
containing the message content
AxisFault
- if the envelope could not be constructedpublic void addMimeHeader(String header, String value)
addMimeHeader
in interface Part
addMimeHeader
in class SOAPPartImpl
header
- the header to addvalue
- the value of that headerpublic String getContentLocation()
getContentLocation
in interface Part
getContentLocation
in class SOAPPartImpl
public void setContentLocation(String loc)
setContentLocation
in interface Part
setContentLocation
in class SOAPPartImpl
loc
- the content locationpublic void setContentId(String newCid)
setContentId
in interface Part
setContentId
in class SOAPPartImpl
newCid
- new Content-Idpublic String getContentId()
getContentId
in interface Part
getContentId
in class SOAPPartImpl
public String getContentIdRef()
getContentIdRef
in interface Part
public Iterator getMatchingMimeHeaders(String[] match)
getMatchingMimeHeaders
in interface Part
getMatchingMimeHeaders
in class SOAPPartImpl
match
- an array of String
s giving mime header names
Iterator
over all values matching these headerspublic Iterator getNonMatchingMimeHeaders(String[] match)
getNonMatchingMimeHeaders
in interface Part
getNonMatchingMimeHeaders
in class SOAPPartImpl
match
- an array of String
s giving mime header names
Iterator
over all values not matching these
headerspublic void setContent(Source source) throws javax.xml.soap.SOAPException
SOAPEnvelope
object
with the data from the given Source
object.
setContent
in class SOAPPartImpl
source
- javax.xml.transform.Source object with the data to
be set
javax.xml.soap.SOAPException
- if there is a problem in
setting the sourcegetContent()
public Source getContent() throws javax.xml.soap.SOAPException
Source
object.
getContent
in class SOAPPartImpl
javax.xml.transform.Source
object
javax.xml.soap.SOAPException
- if the implementation cannot
convert the specified Source
objectsetContent(javax.xml.transform.Source)
public Iterator getAllMimeHeaders()
SOAPPart
object as an iterator over the MimeHeader
objects.
getAllMimeHeaders
in class SOAPPartImpl
Iterator
object with all of the Mime
headers for this SOAPPart
objectpublic void setMimeHeader(String name, String value)
Note that RFC822 headers can contain only US-ASCII characters.
setMimeHeader
in class SOAPPartImpl
name
- a String
giving the
header name for which to searchvalue
- a String
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 new MimeHeader
object.getMimeHeader(java.lang.String)
public String[] getMimeHeader(String name)
MimeHeader
object
in this SOAPPart
object that is identified by
the given String
.
getMimeHeader
in interface Part
getMimeHeader
in class SOAPPartImpl
name
- the name of the header; example:
"Content-Type"
String
array giving all the values for
the specified headersetMimeHeader(java.lang.String, java.lang.String)
public void removeAllMimeHeaders()
MimeHeader
objects for this
SOAPEnvelope
object.
removeAllMimeHeaders
in class SOAPPartImpl
public void removeMimeHeader(String header)
removeMimeHeader
in class SOAPPartImpl
header
- a String
giving
the name of the MIME header(s) to be removedpublic javax.xml.soap.SOAPEnvelope getEnvelope() throws javax.xml.soap.SOAPException
SOAPEnvelope
object associated with
this SOAPPart
object. Once the SOAP envelope is
obtained, it can be used to get its contents.
getEnvelope
in class SOAPPartImpl
SOAPEnvelope
object for this
SOAPPart
object
javax.xml.soap.SOAPException
- if there is a SOAP errorpublic Document getSOAPDocument()
public DocumentType getDoctype()
getDoctype
in interface Document
getDoctype
in class SOAPPartImpl
public DOMImplementation getImplementation()
getImplementation
in interface Document
getImplementation
in class SOAPPartImpl
public Element getDocumentElement()
getDocumentElement
in interface Document
getDocumentElement
in class SOAPPartImpl
public Element createElement(String tagName) throws DOMException
createElement
in interface Document
createElement
in class SOAPPartImpl
tagName
-
DOMException
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
createDocumentFragment
in class SOAPPartImpl
public Text createTextNode(String data)
createTextNode
in interface Document
createTextNode
in class SOAPPartImpl
public Comment createComment(String data)
createComment
in interface Document
createComment
in class SOAPPartImpl
public CDATASection createCDATASection(String data) throws DOMException
createCDATASection
in interface Document
createCDATASection
in class SOAPPartImpl
DOMException
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction
in interface Document
createProcessingInstruction
in class SOAPPartImpl
DOMException
public Attr createAttribute(String name) throws DOMException
createAttribute
in interface Document
createAttribute
in class SOAPPartImpl
DOMException
public EntityReference createEntityReference(String name) throws DOMException
createEntityReference
in interface Document
createEntityReference
in class SOAPPartImpl
DOMException
public NodeList getElementsByTagName(String tagname)
getElementsByTagName
in interface Document
getElementsByTagName
in class SOAPPartImpl
public Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
in interface Document
importNode
in class SOAPPartImpl
DOMException
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS
in interface Document
createElementNS
in class SOAPPartImpl
DOMException
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS
in interface Document
createAttributeNS
in class SOAPPartImpl
DOMException
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Document
getElementsByTagNameNS
in class SOAPPartImpl
public Element getElementById(String elementId)
getElementById
in interface Document
getElementById
in class SOAPPartImpl
public String getEncoding()
public void setEncoding(String s)
public boolean getStandalone()
public void setStandalone(boolean flag)
public boolean getStrictErrorChecking()
public void setStrictErrorChecking(boolean flag)
public String getVersion()
public void setVersion(String s)
public Node adoptNode(Node node) throws DOMException
DOMException
public String getNodeName()
getNodeName
in interface Node
getNodeName
in class SOAPPartImpl
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
getNodeValue
in class SOAPPartImpl
DOMException
public void setNodeValue(String nodeValue) throws DOMException
setNodeValue
in interface Node
setNodeValue
in class SOAPPartImpl
DOMException
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class SOAPPartImpl
public Node getParentNode()
getParentNode
in interface Node
getParentNode
in class SOAPPartImpl
public NodeList getChildNodes()
getChildNodes
in interface Node
getChildNodes
in class SOAPPartImpl
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class SOAPPartImpl
public Node getLastChild()
getLastChild
in interface Node
getLastChild
in class SOAPPartImpl
public Node getPreviousSibling()
getPreviousSibling
in interface Node
getPreviousSibling
in class SOAPPartImpl
public Node getNextSibling()
getNextSibling
in interface Node
getNextSibling
in class SOAPPartImpl
public NamedNodeMap getAttributes()
getAttributes
in interface Node
getAttributes
in class SOAPPartImpl
public Document getOwnerDocument()
getOwnerDocument
in interface Node
getOwnerDocument
in class SOAPPartImpl
public Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore
in interface Node
insertBefore
in class SOAPPartImpl
DOMException
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild
in interface Node
replaceChild
in class SOAPPartImpl
DOMException
public Node removeChild(Node oldChild) throws DOMException
removeChild
in interface Node
removeChild
in class SOAPPartImpl
DOMException
public Node appendChild(Node newChild) throws DOMException
appendChild
in interface Node
appendChild
in class SOAPPartImpl
DOMException
public boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class SOAPPartImpl
public Node cloneNode(boolean deep)
cloneNode
in interface Node
cloneNode
in class SOAPPartImpl
public void normalize()
normalize
in interface Node
normalize
in class SOAPPartImpl
public boolean isSupported(String feature, String version)
isSupported
in interface Node
isSupported
in class SOAPPartImpl
public String getNamespaceURI()
getNamespaceURI
in interface Node
getNamespaceURI
in class SOAPPartImpl
public String getPrefix()
getPrefix
in interface Node
getPrefix
in class SOAPPartImpl
public void setPrefix(String prefix) throws DOMException
setPrefix
in interface Node
setPrefix
in class SOAPPartImpl
DOMException
public String getLocalName()
getLocalName
in interface Node
getLocalName
in class SOAPPartImpl
public boolean hasAttributes()
hasAttributes
in interface Node
hasAttributes
in class SOAPPartImpl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |