|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A minimalistic interface for handling inbound (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 parser that conforms to) the XmlPullParser. The KDOM is not used, but it is reasonably easy to generate a DOM for the SOAP body by calling "new Document.read(myMsg.getBody())". There's also no direct dependency to the servlet API. The message class is initialized on the InputStream and content type returned from 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 | |
void |
decode(java.io.InputStream input,
java.lang.String contentType)
Decodes and initializes the object. |
java.io.InputStream |
getAttachment(java.lang.String key)
Returns an InputStream to a single attachment by its key. |
java.util.Enumeration |
getAttachments()
Returns an enumeration holding the keys for all the attachments of the SOAP request. |
java.lang.String |
getAttachmentType(java.lang.String key)
Returns the MIME type of a single attachment by its key. |
XmlPullParser |
getBody()
Returns an XML parser for the body of the SOAP request. |
java.lang.String |
getLogin()
Returns the remote user's login or null if no login has been set. |
java.lang.String |
getPassword()
Returns the remote user's password or null if no password has been set. |
Method Detail |
public java.lang.String getLogin()
public java.lang.String getPassword()
public XmlPullParser getBody() throws XmlPullParserException
XmlPullParserException
public java.util.Enumeration getAttachments()
public java.io.InputStream getAttachment(java.lang.String key) throws java.lang.IllegalArgumentException, java.io.IOException
java.lang.IllegalArgumentException
java.io.IOException
public java.lang.String getAttachmentType(java.lang.String key) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void decode(java.io.InputStream input, java.lang.String contentType) throws java.io.IOException, XmlPullParserException, java.lang.IllegalArgumentException
java.io.IOException
XmlPullParserException
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |