addMimeHeader
public void addMimeHeader(String header,
String value)
Add the specified MIME header, as per JAXM.
- addMimeHeader in interface Part
- addMimeHeader in interface SOAPPart
header
- the header to addvalue
- the value of that header
adoptNode
public Node adoptNode(Node node)
throws DOMException
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
createCDATASection
public CDATASection createCDATASection(String data)
throws DOMException
createComment
public Comment createComment(String data)
createDocumentFragment
public DocumentFragment createDocumentFragment()
createElement
public Element createElement(String tagName)
throws DOMException
tagName
-
createElementNS
public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException
createEntityReference
public EntityReference createEntityReference(String name)
throws DOMException
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException
createTextNode
public Text createTextNode(String data)
getAllMimeHeaders
public Iterator getAllMimeHeaders()
Retrieves all the headers for this SOAPPart
object as an iterator over the MimeHeader
objects.
- getAllMimeHeaders in interface SOAPPart
- an
Iterator
object with all of the Mime
headers for this SOAPPart
object
getAsBytes
public byte[] getAsBytes()
throws AxisFault
Get the contents of this Part (not the headers!), as a byte
array. This will force buffering of the message.
- an array of bytes containing a byte representation of this Part
AxisFault
- if this Part can't be serialized to the byte array
getAsSOAPEnvelope
public SOAPEnvelope getAsSOAPEnvelope()
throws AxisFault
Get the contents of this Part (not the MIME headers!), as a
SOAPEnvelope. This will force a complete parse of the
message.
- a
SOAPEnvelope
containing the message content
AxisFault
- if the envelope could not be constructed
getAsString
public String getAsString()
throws AxisFault
Get the contents of this Part (not the headers!), as a String.
This will force buffering of the message.
- a
String
containing the content of this message
AxisFault
- if there is an error serializing this part
getAttributes
public NamedNodeMap getAttributes()
getBaseURI
public String getBaseURI()
DOM Level 3 stubs
getChildNodes
public NodeList getChildNodes()
getContent
public Source getContent()
throws SOAPException
Returns the content of the SOAPEnvelope as a JAXP
Source
object.
- getContent in interface SOAPPart
- the content as a
javax.xml.transform.Source
object
SOAPException
- if the implementation cannot
convert the specified Source
object
setContent(javax.xml.transform.Source)
getContentId
public String getContentId()
Content ID.
- getContentId in interface Part
- getContentId in interface SOAPPart
- the content ID
getContentIdRef
public String getContentIdRef()
Content ID.
- getContentIdRef in interface Part
- the contentId reference value that should be used directly
as an href in a SOAP element to reference this attachment.
Not part of JAX-RPC, JAX-M, SAAJ, etc.
getContentLength
public long getContentLength()
throws AxisFault
Get the content length for this SOAPPart.
This will force buffering of the SOAPPart, but it will
also cache the byte[] form of the SOAPPart.
- the content length in bytes
getContentLocation
public String getContentLocation()
Content location.
- getContentLocation in interface Part
- getContentLocation in interface SOAPPart
- the content location
getContentType
public String getContentType()
Content type is always "text/xml" for SOAPParts.
- getContentType in interface Part
- the content type
getCurrentForm
public int getCurrentForm()
getCurrentMessage
public Object getCurrentMessage()
Get the current message, in whatever form it happens to be right now.
Will return a String, byte[], InputStream, or SOAPEnvelope, depending
on circumstances.
The method name is historical.
TODO: rename this for clarity; should be more like getContents.
- the current content
getDoctype
public DocumentType getDoctype()
getDocumentElement
public Element getDocumentElement()
getDocumentURI
public String getDocumentURI()
getDomConfig
public DOMConfiguration getDomConfig()
getElementById
public Element getElementById(String elementId)
getElementsByTagName
public NodeList getElementsByTagName(String tagname)
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
getEncoding
public String getEncoding()
getEnvelope
public SOAPEnvelope getEnvelope()
throws SOAPException
Gets the SOAPEnvelope
object associated with
this SOAPPart
object. Once the SOAP envelope is
obtained, it can be used to get its contents.
- getEnvelope in interface SOAPPart
- the
SOAPEnvelope
object for this
SOAPPart
object
SOAPException
- if there is a SOAP error
getFeature
public Object getFeature(String feature,
String version)
getFirstChild
public Node getFirstChild()
getImplementation
public DOMImplementation getImplementation()
getInputEncoding
public String getInputEncoding()
getLastChild
public Node getLastChild()
getLocalName
public String getLocalName()
getMatchingMimeHeaders
public java.util.Iterator getMatchingMimeHeaders(String[] match)
Get all headers that match.
- getMatchingMimeHeaders in interface Part
match
- an array of String
s giving mime header names
- an
Iterator
over all values matching these headers
getMessage
public Message getMessage()
Get the Message
for this Part
.
- the
Message
for this Part
getMimeHeader
public String[] getMimeHeader(String name)
Gets all the values of the MimeHeader
object
in this SOAPPart
object that is identified by
the given String
.
- getMimeHeader in interface Part
- getMimeHeader in interface SOAPPart
name
- the name of the header; example:
"Content-Type"
- a
String
array giving all the values for
the specified header
setMimeHeader(java.lang.String, java.lang.String)
getNamespaceURI
public String getNamespaceURI()
getNextSibling
public Node getNextSibling()
getNodeName
public String getNodeName()
Node Implementation
getNodeType
public short getNodeType()
getNodeValue
public String getNodeValue()
throws DOMException
getNonMatchingMimeHeaders
public java.util.Iterator getNonMatchingMimeHeaders(String[] match)
Get all headers that do not match.
- getNonMatchingMimeHeaders in interface Part
match
- an array of String
s giving mime header names
- an
Iterator
over all values not matching these
headers
getOwnerDocument
public Document getOwnerDocument()
getParentNode
public Node getParentNode()
getPrefix
public String getPrefix()
getPreviousSibling
public Node getPreviousSibling()
getSOAPDocument
public Document getSOAPDocument()
- SAAJ 1.2
getStandalone
public boolean getStandalone()
getStrictErrorChecking
public boolean getStrictErrorChecking()
getTextContent
public String getTextContent()
getUserData
public Object getUserData(String key)
getVersion
public String getVersion()
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
isBodyStream
public boolean isBodyStream()
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()
removeAllMimeHeaders
public void removeAllMimeHeaders()
Removes all the MimeHeader
objects for this
SOAPEnvelope
object.
- removeAllMimeHeaders in interface SOAPPart
removeChild
public Node removeChild(Node oldChild)
throws DOMException
removeMimeHeader
public void removeMimeHeader(String header)
Removes all MIME headers that match the given name.
- removeMimeHeader in interface SOAPPart
header
- a String
giving
the name of the MIME header(s) to be removed
renameNode
public Node renameNode(Node n,
String namespaceURI,
String qualifiedName)
replaceChild
public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException
saveChanges
public void saveChanges()
throws AxisFault
setContent
public void setContent(Source source)
throws SOAPException
Sets the content of the SOAPEnvelope
object
with the data from the given Source
object.
- setContent in interface SOAPPart
source
- javax.xml.transform.Source object with the data to
be set
SOAPException
- if there is a problem in
setting the source
getContent()
setContentId
public void setContentId(String newCid)
Sets Content-Id of this part.
already defined.
- setContentId in interface Part
- setContentId in interface SOAPPart
newCid
- new Content-Id
setContentLocation
public void setContentLocation(String loc)
Set content location.
- setContentLocation in interface Part
- setContentLocation in interface SOAPPart
loc
- the content location
setCurrentMessage
public void setCurrentMessage(Object currMsg,
int form)
Set the current message
currMsg
- form
-
setDocumentURI
public void setDocumentURI(String documentURI)
setEncoding
public void setEncoding(String s)
setMessage
public void setMessage(Message msg)
Set the Message for this Part.
Do not call this Directly. Called by Message.
msg
- the Message
for this part
setMimeHeader
public 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. If there is a match, this method clears
all existing values for the first header that matches and
sets the given value instead. If more than one header has
the given name, this method removes all of the matching
headers after the first one.
Note that RFC822 headers can contain only US-ASCII
characters.
- setMimeHeader in interface SOAPPart
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)
setNodeValue
public void setNodeValue(String nodeValue)
throws DOMException
setPrefix
public void setPrefix(String prefix)
throws DOMException
setSOAPEnvelope
public void setSOAPEnvelope(SOAPEnvelope env)
This set the SOAP Envelope for this part.
Note: It breaks the chicken/egg created.
I need a message to create an attachment...
From the attachment I should be able to get a reference...
I now want to edit elements in the envelope in order to
place the attachment reference to it.
How do I now update the SOAP envelope with what I've changed?
env
- the SOAPEnvelope
for this SOAPPart
setStandalone
public void setStandalone(boolean flag)
setStrictErrorChecking
public void setStrictErrorChecking(boolean flag)
setTextContent
public void setTextContent(String textContent)
setUserData
public Object setUserData(String key,
Object data,
UserDataHandler handler)
setVersion
public void setVersion(String s)
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone)
setXmlVersion
public void setXmlVersion(String xmlVersion)
writeTo
public void writeTo(Writer writer)
throws IOException
Write the contents to the specified writer.
writer
- the Writer
to write to
writeTo
public void writeTo(java.io.OutputStream os)
throws IOException
Write the contents to the specified stream.
os
- the java.io.OutputStream
to write to