hi all,
After having some discussion with my mentor I came with the following design
for the Mail Transport for Axis2/C for SOAP 1.2.

Please be kind enough to add your comments,suggestions and improvements to
it.
I will upload this at the public wiki of ASF [1].

For your convince I will repeat here as well.

Design of Mail Transport support for Axis2/C
---------------------------------------------------------
Currently Apache Axis2/C uses HTTP(S) as the general transport. The aim of
this project is to give users the ability to use EMAIL as a fully fledge
transport to exchanges SOAP messages.
When developing the Mail Transport(aka Mail Transport) we need to consider
two protocols, SMTP and POP. SMTP is the sending part(aka Mail Transport
Sender) and POP as the receiving part(aka Mail Transport Receiver). EMAIL is
inherently ONE-WAY asynchronous.

The initial implementation of the Mail Transport concern with Asynchronous +
WS-Addressing+Non-Blocking architecture, Axis2/Java has a synchronous
behavior without addressing and it will be done if the time permit to finish
first asynchronous part.

As mentioned this project mainly concern with writing Mail Transport
Sender(for SMTP) and Mail Transport Receiver(for POP) in independent way
,thus server and the client could use them orthogonally.

Client process
------------------
In the client side message goes through and at the end it comes to the
transport sender , where Axis2 pick the transport and send the SOAP message.
In the client side Client API is used to send the SOAP message to the target
endpoint as follows.


// create required  env etc..
options = axis2_options_create(env);
address = "mailto:[EMAIL PROTECTED]"/my/service/urlpath<[EMAIL 
PROTECTED]/my/service/urlpath>
\"";

Please note that the address is "mailto:"; indicating client is using the
Mail Transport [2]<http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html>.


endpoint_ref = axis2_endpoint_ref_create(env, address);
axis2_options_set_to (options, env, endpoint_ref);

Following normal client API we create the svc client and send the SOAP
message to the mail server and listen to the response.  So at this point
Axis2/C engine should be able to pick the Mail Transport Sender (Configured
in the configuration file
<transportSender name="mailto"
                     class="axis2_mail_sender"/>
</transportSender name> ).
and send the SOAP message using Mail Transport Sender. This message will be
sent as a base64 encoded MIME attachment as in the  [MAIL
BINDING<http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html>
].
The Mail Transport Sender is a part Mail Transport is responsible for
encoding the SOAP envelope using base64 encoding mechanism   and send it to
the Mail server.
At the same time Mail Transport Receiver in the client side will
periodically download the EMAILS from the mail server. Mail Transport
Receiver in client side is responsible for downloading Emails from the Inbox
and generate a SOAP envelope for further processing at client side.

Server process
-------------------
The server part is also consists of a Mail Transport Sender and a Mail
Transport Receiver. At the server side the Mail Transport Receiver listen to
the incoming connection (once you configured Axis2/C to use Mail Transport)
and periodically will download the Emails from the mail server. After that
the SOAP envelope will be generated and will be submitted to normal
processing through phases and handlers.  Once the result is available Mail
Transport Sender is there to encode the SOAP envelope in base64 and send
that to the mail server.

Please look at the path of the SOAP
message[3<http://www.cse.mrt.ac.lk/%7Edanrkuma/gsoc/docs/mail_transport.pdf>
].

At the end of the project there will be a Mail Transport Sender and a Mail
Transport  Receiver client and server side. The end result will be a shared
resource (possibly libaxis2_mail_sender.so,libaxis2_mail_receiver.so on Unix
like systems and axis2_mail_sender.dll and axis2_mail_receiver.dll on MS
windows) which implement the Mail Transport.

The C Mail API plays a major role in the Mail Transport behind the seen
doing the all hard work.
The C Mail API which is going to use is the c-client API
[4<http://www.washington.edu/imap/>]
of   the UW IMAP tool kit. It is used  in application scuh as Pine and
EasyMail and MailManager for the Next.


Source folder structure
-----------------------------
+----+transport
               + http
               + mail
                    + receiver
                    + sender
                    + commons
                    + utils


References:
[1] -  http://wiki.apache.org/ws/SummerOfCode/2007MailTrasport
[2] -  http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
[3] -  http://www.cse.mrt.ac.lk/~danrkuma/gsoc/docs/mail_transport.pdf
[4] -  http://www.washington.edu/imap/

Thank you,
Regards,
Rajika Kumarasiri.

Reply via email to