|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.soap.SOAPPart
org.jboss.axis.message.SOAPPartImpl
org.jboss.axis.message.SOAPPartAxisImpl
org.jboss.axis.MessagePart
public class 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 |
| 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 org.jboss.axis.message.SOAPPartImpl |
|---|
compareDocumentPosition, getBaseURI, getDocumentURI, getDomConfig, getFeature, getInputEncoding, getTextContent, getUserData, getXmlEncoding, getXmlStandalone, getXmlVersion, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, normalizeDocument, renameNode, setDocumentURI, setTextContent, setUserData, setXmlStandalone, setXmlVersion |
| 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 MessageinitialContents - the initial contens ObjectisBodyStream - if the body is in a stream| Method Detail |
|---|
public Message getMessage()
Message for this Part.
Message for this Partpublic void setMessage(Message msg)
msg - the Message for this partpublic String getContentType()
getContentType in interface Partpublic int getContentLength()
public void setSOAPEnvelope(SOAPEnvelopeAxisImpl env)
env - the SOAPEnvelope for this SOAPPartpublic int getSize()
public void writeTo(Writer writer)
throws IOException
writer - the Writer to write to
IOExceptionpublic 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 array
public String getAsString()
throws AxisFault
String containing the content of this message
AxisFault - if there is an error serializing this part
public SOAPEnvelopeAxisImpl getAsSOAPEnvelope()
throws AxisFault
SOAPEnvelope containing the message content
AxisFault - if the envelope could not be constructed
public void addMimeHeader(String header,
String value)
addMimeHeader in interface PartaddMimeHeader in class SOAPPartImplheader - the header to addvalue - the value of that headerpublic String getContentLocation()
getContentLocation in interface PartgetContentLocation in class SOAPPartImplpublic void setContentLocation(String loc)
setContentLocation in interface PartsetContentLocation in class SOAPPartImplloc - the content locationpublic void setContentId(String newCid)
setContentId in interface PartsetContentId in class SOAPPartImplnewCid - new Content-Idpublic String getContentId()
getContentId in interface PartgetContentId in class SOAPPartImplpublic String getContentIdRef()
getContentIdRef in interface Partpublic Iterator getMatchingMimeHeaders(String[] match)
getMatchingMimeHeaders in interface PartgetMatchingMimeHeaders in class SOAPPartImplmatch - an array of Strings giving mime header names
Iterator over all values matching these headerspublic Iterator getNonMatchingMimeHeaders(String[] match)
getNonMatchingMimeHeaders in interface PartgetNonMatchingMimeHeaders in class SOAPPartImplmatch - an array of Strings giving mime header names
Iterator over all values not matching these
headers
public void setContent(Source source)
throws javax.xml.soap.SOAPException
SOAPEnvelope object
with the data from the given Source object.
setContent in class SOAPPartImplsource - 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 SOAPPartImplIterator object with all of the Mime
headers for this SOAPPart object
public void setMimeHeader(String name,
String value)
Note that RFC822 headers can contain only US-ASCII characters.
setMimeHeader in class SOAPPartImplname - 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 PartgetMimeHeader in class SOAPPartImplname - 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 SOAPPartImplpublic void removeMimeHeader(String header)
removeMimeHeader in class SOAPPartImplheader - a String giving
the name of the MIME header(s) to be removed
public 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 SOAPPartImplSOAPEnvelope object for this
SOAPPart object
javax.xml.soap.SOAPException - if there is a SOAP errorpublic Document getSOAPDocument()
public DocumentType getDoctype()
getDoctype in interface DocumentgetDoctype in class SOAPPartImplpublic DOMImplementation getImplementation()
getImplementation in interface DocumentgetImplementation in class SOAPPartImplpublic Element getDocumentElement()
getDocumentElement in interface DocumentgetDocumentElement in class SOAPPartImpl
public Element createElement(String tagName)
throws DOMException
createElement in interface DocumentcreateElement in class SOAPPartImpltagName -
DOMExceptionpublic DocumentFragment createDocumentFragment()
createDocumentFragment in interface DocumentcreateDocumentFragment in class SOAPPartImplpublic Text createTextNode(String data)
createTextNode in interface DocumentcreateTextNode in class SOAPPartImplpublic Comment createComment(String data)
createComment in interface DocumentcreateComment in class SOAPPartImpl
public CDATASection createCDATASection(String data)
throws DOMException
createCDATASection in interface DocumentcreateCDATASection in class SOAPPartImplDOMException
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException
createProcessingInstruction in interface DocumentcreateProcessingInstruction in class SOAPPartImplDOMException
public Attr createAttribute(String name)
throws DOMException
createAttribute in interface DocumentcreateAttribute in class SOAPPartImplDOMException
public EntityReference createEntityReference(String name)
throws DOMException
createEntityReference in interface DocumentcreateEntityReference in class SOAPPartImplDOMExceptionpublic NodeList getElementsByTagName(String tagname)
getElementsByTagName in interface DocumentgetElementsByTagName in class SOAPPartImpl
public Node importNode(Node importedNode,
boolean deep)
throws DOMException
importNode in interface DocumentimportNode in class SOAPPartImplDOMException
public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException
createElementNS in interface DocumentcreateElementNS in class SOAPPartImplDOMException
public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
throws DOMException
createAttributeNS in interface DocumentcreateAttributeNS in class SOAPPartImplDOMException
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
getElementsByTagNameNS in interface DocumentgetElementsByTagNameNS in class SOAPPartImplpublic Element getElementById(String elementId)
getElementById in interface DocumentgetElementById in class SOAPPartImplpublic String getEncoding()
public void setEncoding(String s)
public boolean getStandalone()
public void setStandalone(boolean flag)
public boolean getStrictErrorChecking()
getStrictErrorChecking in interface DocumentgetStrictErrorChecking in class SOAPPartImplpublic void setStrictErrorChecking(boolean flag)
setStrictErrorChecking in interface DocumentsetStrictErrorChecking in class SOAPPartImplpublic String getVersion()
public void setVersion(String s)
public Node adoptNode(Node node)
throws DOMException
adoptNode in interface DocumentadoptNode in class SOAPPartImplDOMExceptionpublic String getNodeName()
getNodeName in interface NodegetNodeName in class SOAPPartImpl
public String getNodeValue()
throws DOMException
getNodeValue in interface NodegetNodeValue in class SOAPPartImplDOMException
public void setNodeValue(String nodeValue)
throws DOMException
setNodeValue in interface NodesetNodeValue in class SOAPPartImplDOMExceptionpublic short getNodeType()
getNodeType in interface NodegetNodeType in class SOAPPartImplpublic Node getParentNode()
getParentNode in interface NodegetParentNode in class SOAPPartImplpublic NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class SOAPPartImplpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class SOAPPartImplpublic Node getLastChild()
getLastChild in interface NodegetLastChild in class SOAPPartImplpublic Node getPreviousSibling()
getPreviousSibling in interface NodegetPreviousSibling in class SOAPPartImplpublic Node getNextSibling()
getNextSibling in interface NodegetNextSibling in class SOAPPartImplpublic NamedNodeMap getAttributes()
getAttributes in interface NodegetAttributes in class SOAPPartImplpublic Document getOwnerDocument()
getOwnerDocument in interface NodegetOwnerDocument in class SOAPPartImpl
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException
insertBefore in interface NodeinsertBefore in class SOAPPartImplDOMException
public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException
replaceChild in interface NodereplaceChild in class SOAPPartImplDOMException
public Node removeChild(Node oldChild)
throws DOMException
removeChild in interface NoderemoveChild in class SOAPPartImplDOMException
public Node appendChild(Node newChild)
throws DOMException
appendChild in interface NodeappendChild in class SOAPPartImplDOMExceptionpublic boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class SOAPPartImplpublic Node cloneNode(boolean deep)
cloneNode in interface NodecloneNode in class SOAPPartImplpublic void normalize()
normalize in interface Nodenormalize in class SOAPPartImpl
public boolean isSupported(String feature,
String version)
isSupported in interface NodeisSupported in class SOAPPartImplpublic String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class SOAPPartImplpublic String getPrefix()
getPrefix in interface NodegetPrefix in class SOAPPartImpl
public void setPrefix(String prefix)
throws DOMException
setPrefix in interface NodesetPrefix in class SOAPPartImplDOMExceptionpublic String getLocalName()
getLocalName in interface NodegetLocalName in class SOAPPartImplpublic boolean hasAttributes()
hasAttributes in interface NodehasAttributes in class SOAPPartImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||