|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.handlers.AbstractHandler
org.apache.axis2.transport.mail.MailTransportSender
public class MailTransportSender
0. For this profile we only care about SOAP 1.2 1. There should be no mime text body in this case 2. The SOAP envelope should be base64 encoded and marked with the following headers SOAP 1.2 Content-Type: application/soap+xml; charset=UTF-8 ; action="soap-action-goes-here" Content-Transfer-Encoding: base64 Content-Description: "/serviceName" 3. The content-description is the logical name of the service. It should be quoted. 4. The subject can be anything. Perhaps something like "SOAP Message" might be useful to people looking at the mail in a normal mail browser. 5. If there are attachments the there will be a mime multipart. There should only be one part with content-type: application/soap+xml. 6. The service URL will be created as mailto:paul@wso2.com?X-Service-Path=/axis2/services/MyService or paul@wso2.com?/axis2/services/MyService
Example without attachments ======================== From: rm_client@lenio.dk To: lenioserver@oiositest.dk Message-ID: <8868170.01165394158287.JavaMail.hgk@hans-guldager-knudsens-computer.local> Subject: ANYTHING MIME-Version: 1.0 Content-Type: application/soap+xml; charset=UTF-8 ; action="http://rep.oio.dk/oiosi/IMessageHandler/RequestRespondRequest" Content-Transfer-Encoding: base64 Content-Description: /my/service/urlpath
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48c29hcGVudjpFbnZlbG9wZSB4 Y3VtZW50YXRpb24uPC9EZXNjcmlwdGlvbj48L05vdGlmaWNhdGlvbj48L3NvYXBlbnY6Qm9keT48 L3NvYXBlbnY6RW52ZWxvcGU+
========================
Example with attachments
======================== From: rm_client@lenio.dk To: lenioserver@oiositest.dk Message-ID: <8868170.01165394158287.JavaMail.hgk@hans-guldager-knudsens-computer.local> Subject: ANYTHING MIME-Version: 1.0 content-type: multipart/mixed; boundary=--boundary_0_9fdec710-2336-4dc9-8bcd-45f2c06cf605
----boundary_0_9fdec710-2336-4dc9-8bcd-45f2c06cf605 Content-Type: application/soap+xml; charset=UTF-8 ; action="http://rep.oio.dk/oiosi/IMessageHandler/RequestRespondRequest" Content-Transfer-Encoding: base64 Content-Description: /my/service/urlpath
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz48c29hcGVudjpFbnZlbG9wZSB4 Y3VtZW50YXRpb24uPC9EZXNjcmlwdGlvbj48L05vdGlmaWNhdGlvbj48L3NvYXBlbnY6Qm9keT48 L3NvYXBlbnY6RW52ZWxvcGU+
----boundary_0_9fdec710-2336-4dc9-8bcd-45f2c06cf605 ----boundary_0_9fdec710-2336-4dc9-8bcd-45f2c06cf605 content-type: application/octet-stream content-transfer-encoding: base64
PHM6RW52ZWxvcGUgeG1sbnM6cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMy8wNS9zb2FwLWVu dmVsb3BlIiB4bWxuczphPSJodHRwOi8vd3d3LnczLm9yZy8yMDA1LzA4L2FkZHJlc3Npbmci IHhtbG5zOnU9Imh0dHA6Ly9kb2NzLm9hc2lzLW9wZW4ub3JnL3dzcy8yMDA0LzAxL29hc2lz LTIwMDQwMS13c3Mtd3NzZWN1cml0eS11dGlsaXR5LTEuMC54c2QiPjxzOkhlYWRlcj48YTpB Y3Rpb24gczptdXN0VW5kZXJzdGFuZD0iMSI+aHR0cDovL3JlcC5vaW8uZGsvb2lvc2kvSU1l c3NhZ2VIYW5kbGVyL1JlcXVlc3RSZXNwb25kUmVxdWVzdDwvYTpBY3Rpb24+PGE6TWVzc2Fn
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler |
---|
Handler.InvocationResponse |
Field Summary |
---|
Fields inherited from class org.apache.axis2.handlers.AbstractHandler |
---|
handlerDesc |
Constructor Summary | |
---|---|
MailTransportSender()
|
Method Summary | |
---|---|
void |
cleanup(MessageContext msgContext)
Clean up |
void |
init(ConfigurationContext configurationContext,
TransportOutDescription transportOut)
Initialize |
Handler.InvocationResponse |
invoke(MessageContext msgContext)
This method will be called on each registered handler when a message needs to be processed. |
void |
sendMimeMessage(MessageContext msgContext)
|
void |
stop()
|
void |
writeMimeMessage(MessageContext msgContext,
java.io.OutputStream out)
|
Methods inherited from class org.apache.axis2.handlers.AbstractHandler |
---|
cleanup, flowComplete, getHandlerDesc, getName, getParameter, init, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.axis2.engine.Handler |
---|
cleanup, flowComplete, getHandlerDesc, getName, getParameter, init |
Constructor Detail |
---|
public MailTransportSender()
Method Detail |
---|
public void init(ConfigurationContext configurationContext, TransportOutDescription transportOut) throws AxisFault
TransportSender
init
in interface TransportSender
AxisFault
public void cleanup(MessageContext msgContext) throws AxisFault
TransportSender
cleanup
in interface TransportSender
AxisFault
public void sendMimeMessage(MessageContext msgContext) throws AxisFault
AxisFault
public void writeMimeMessage(MessageContext msgContext, java.io.OutputStream out) throws AxisFault
AxisFault
public void stop()
stop
in interface TransportSender
public Handler.InvocationResponse invoke(MessageContext msgContext) throws AxisFault
Handler
This method may be called concurrently from multiple threads.
Handlers that want to determine the type of message that is to be processed (e.g. response vs request, inbound vs. outbound, etc.) can retrieve that information from the MessageContext via MessageContext.getFLOW() and MessageContext.getAxisOperation().getMessageExchangePattern() APIs.
invoke
in interface Handler
msgContext
-
AxisFault
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |