|
Apache SOAP API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.soap.messaging.Message
A Message
is the class whose instances represent one-way messages in SOAP. While messages are one-way, they are sometimes carried on two-way transports such as HTTP. To accomodate that, the API supported here has a "receive" method as well - that is only applicable if the transport that is being used supports the receive() method (@see org.apache.soap.transport.SOAPTransport) so that this API can get at the 'response' envelope.
Constructor Summary | |
Message() |
Method Summary | |
void |
addBodyPart(javax.mail.internet.MimeBodyPart part) Add a MIME BodyPart to the request MIME envelope. |
javax.mail.internet.MimeBodyPart |
findBodyPart(java.lang.String uri) Find the MIME part referred to by the given URI in the response MIME envelope. |
javax.mail.internet.MimeBodyPart |
getBodyPart(int index) Get the specified Part in the reponse MIME envelope by its index. |
int |
getPartCount() Return the number of enclosed BodyPart objects in the response MIME envelope. |
SOAPContext |
getRequestSOAPContext() Get the request SOAPContext. |
SOAPContext |
getResponseSOAPContext() Get the response SOAPContext. |
javax.mail.internet.MimeBodyPart |
getRootPart() Get the root Part of the reponse MIME envelope, or the only part if the response wasn't multipart. |
org.apache.soap.transport.SOAPTransport |
getSOAPTransport() |
javax.activation.DataHandler |
receive() Receive a response from the given transport. |
Envelope |
receiveEnvelope() Receive an envelope from the given transport. |
void |
send(java.net.URL url, java.lang.String actionURI, Envelope env) Send an envelope to the given URL via the SOAPTransport that has been configured for this instance (or SOAPHTTPConnection by default). |
void |
setSOAPTransport(org.apache.soap.transport.SOAPTransport st) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Message()
Method Detail |
public void setSOAPTransport(org.apache.soap.transport.SOAPTransport st)
public org.apache.soap.transport.SOAPTransport getSOAPTransport()
public void send(java.net.URL url, java.lang.String actionURI, Envelope env) throws SOAPException
url
- the url to send toactionURI
- the value of the SOAPAction headerenv
- envelope to sendSOAPException
- if something goes wrong.public Envelope receiveEnvelope() throws SOAPException
SOAPException
- if something goes wrongreceive()
public javax.activation.DataHandler receive() throws SOAPException, javax.mail.MessagingException
SOAPException
- if something goes wrongjavax.mail.MessagingException
receive()
public SOAPContext getRequestSOAPContext()
public void addBodyPart(javax.mail.internet.MimeBodyPart part) throws javax.mail.MessagingException
part
- The Part to be appendedjavax.mail.MessagingException
public SOAPContext getResponseSOAPContext()
public javax.mail.internet.MimeBodyPart findBodyPart(java.lang.String uri)
Note: relative URIs not entirely implemented yet.
uri
- the URIpublic int getPartCount() throws javax.mail.MessagingException
javax.mail.MessagingException
public javax.mail.internet.MimeBodyPart getBodyPart(int index) throws java.lang.IndexOutOfBoundsException
index
- the index of the desired Partjava.lang.IndexOutOfBoundsException
- if no such Part existspublic javax.mail.internet.MimeBodyPart getRootPart() throws javax.mail.MessagingException
javax.mail.MessagingException
|
Apache SOAP API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |