|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A minimalistic interface for handling outbound (possibly) multipart SOAP messages. Multipart SOAP messages are MIME-encoded SOAP messages with attachments, as defined in the SOAP-with-attachments RFC document. Basically, the XML elements in the SOAP body can refer to attached binary data by a "href" attribute that starts with a "cid:" prefix. The interface was designed to have as few dependencies as possible. The only requirement is (a class that conforms to) the XmlSerializer. The KDOM is not used, but it is reasonably easy to generate the SOAP body from a DOM tree by calling "myDocument.write(myMsg.getBody())". There's also no direct dependency to the servlet API. The complete message is piped into the OutputStream of an HTTP request/response instead. This allows the API (implementing classes, that is) to be used in J2SE and J2ME environments. It even opens a door for using SOAP via non-HTTP transmission channels, for example, e-mail.
Method Summary | |
java.lang.String |
addAttachment(java.io.InputStream stream,
java.lang.String contentType)
Adds an attachment to this SOAP message and returns the access key for it. |
void |
encode(java.io.OutputStream output)
Encodes the whole SOAP request plus all attachments into one - possibly multipart - SOAP request. |
XmlSerializer |
getBody()
Returns an XML serializer for writing the body part of this SOAP message. |
java.lang.String |
getContentType()
Returns the content type of this message. |
void |
setAuthentication(java.lang.String login,
java.lang.String password)
Sets the login and password to use during the authentication phase of the SOAP request. |
Method Detail |
public void setAuthentication(java.lang.String login, java.lang.String password) throws java.io.IOException, java.lang.IllegalStateException
java.io.IOException
java.lang.IllegalStateException
public XmlSerializer getBody() throws java.io.IOException
java.io.IOException
public java.lang.String addAttachment(java.io.InputStream stream, java.lang.String contentType)
public java.lang.String getContentType()
public void encode(java.io.OutputStream output) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |