java.lang.Objectjavax.xml.soap.SOAPPart
All Implemented Interfaces:
Node, Document
SOAPMessage
object. All messages are required to have a SOAP part, so when a
SOAPMessage
object is created, it will automatically
have a SOAPPart
object.
A SOAPPart
object is a MIME part and has the MIME headers
Content-Id, Content-Location, and Content-Type. Because the value of
Content-Type must be "text/xml", a SOAPPart
object automatically
has a MIME header of Content-Type with its value set to "text/xml".
The value must be "text/xml" because content in the SOAP part of a
message must be in XML format. Content that is not of type "text/xml"
must be in an AttachmentPart
object rather than in the
SOAPPart
object.
When a message is sent, its SOAP part must have the MIME header Content-Type set to "text/xml". Or, from the other perspective, the SOAP part of any message that is received must have the MIME header Content-Type with a value of "text/xml".
A client can access the SOAPPart
object of a
SOAPMessage
object by
calling the method SOAPMessage.getSOAPPart
. The
following line of code, in which message
is a
SOAPMessage
object, retrieves the SOAP part of a message.
SOAPPart soapPart = message.getSOAPPart();
A SOAPPart
object contains a SOAPEnvelope
object,
which in turn contains a SOAPBody
object and a
SOAPHeader
object.
The SOAPPart
method getEnvelope
can be used
to retrieve the SOAPEnvelope
object.
Method from javax.xml.soap.SOAPPart Summary: |
---|
addMimeHeader, getAllMimeHeaders, getContent, getContentId, getContentLocation, getEnvelope, getMatchingMimeHeaders, getMimeHeader, getNonMatchingMimeHeaders, removeAllMimeHeaders, removeMimeHeader, setContent, setContentId, setContentLocation, setMimeHeader |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.xml.soap.SOAPPart Detail: |
---|
MimeHeader object with the specified
name and value and adds it to this SOAPPart object.
If a MimeHeader with the specified name already
exists, this method adds the specified value to the already
existing value(s).
Note that RFC822 headers can contain only US-ASCII characters. |
SOAPPart object
as an iterator over the MimeHeader objects. |
Source
object. |
|
|
SOAPEnvelope object associated with this
SOAPPart object. Once the SOAP envelope is obtained, it
can be used to get its contents. |
MimeHeader objects that match a name in
the given array. |
MimeHeader object
in this SOAPPart object that
is identified by the given String . |
MimeHeader objects whose name does
not match a name in the given array. |
MimeHeader objects for this
SOAPEnvelope object. |
|
SOAPEnvelope object with the data
from the given Source object. This Source
must contain a valid SOAP document. |
String . |
String . |
Note that RFC822 headers can contain only US-ASCII characters. |