Hi all,
As I previously mentioned in the JIRA [0], I'm interested in adding
$subject for Synapse as my GSoC 2012 project.
I went through some AS2 and EDIFACT resources, including [1] [2].
To add AS2 support to Synapse, I think the task is to write a new transport
(as described in Axis2 documentation).
Once the transport is complete, Synapse will be able to mediate AS2 based
messages across other transports that Synapse support.
Like all other transport components of Synapse, AS2 transport should
include a receiver and a sender.
These will be configurable in the axis2.xml file of Synapse.
Configuring Synapse using axis2.xml for AS2 will look like:
<transportReceiver name="as2"
class="org.apache.synapse.transport.as2.AS2TransportListener">
...parameters...
</transportReceiver>
and similarly,
<transportSender name="as2"
class="org.apache.synapse.transport.as2.AS2TransportSender">
...parameters...
</transportSender>
According to the specifications, AS2 can be used send appropriately
packaged EDI, XML, or other business data, using HTTP POST.
I think the focus should be to support EDIFACT based messages.
Since Synapse uses SOAP as the common message representation, we should
convert incoming messages into a SOAP representation.
However, EDIFACT messages are non-XML. Therefore we'll have to convert them
into XML and wrap it within a SOAP envelope.
(Similar to what's done in FIX transport [3]). For this purpose, I think
XML/EDIFACT format can be used [4]
Found this [7] library to convert EDIFACT TO XML (GPLv3), which might be
useful.
Usually AS2 clients are called "Trading partners". When sending a message,
they can request an acknowledgement message called MDN (Message Disposition
Notification).
There are several options to send MDN, Sync, ASync, NoMDN etc. I think this
is somewhat similar to axis2's MEP (message exchange patterns). (MDN vs.
NoMDN for in-out vs. in-only MEPs. Sync vs. ASying for Blocking vs.
Non-blocking MEPs)
Found 2 open source implementations of AS2 for java:
OpenAS2 (BSD) [5]
Mendelson (GPL) [6]
These days I'm trying out those implementations to get a better
understanding of AS2.
I Will read on how security requirements specified in AS2 can be handled
with Synapse.
Will also look into more details on how other transports in Synapse (like
FIX) are written.
Any suggestions, pointers to the things I've missed are very much
appreciated.
[0] - https://issues.apache.org/jira/browse/SYNAPSE-860
[1] - http://www.ietf.org/rfc/rfc4130.txt
[2] -
http://www.unece.org/tradewelcome/areas-of-work/un-centre-for-trade-facilitation-and-e-business-uncefact/outputs/standards/unedifact/tradeedifactrules/part-4-edifact-rules-for-electronic-data-interchange-for-administration-commerce-and-transport/part-4-unedifact-rules-chapter-22-syntax-rules.html
[3] -
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/optional/fix/src/main/java/org/apache/synapse/transport
/fix/FIXUtils.java?view=markup
[4] - http://en.wikipedia.org/wiki/XML/EDIFACT
[5] - http://sourceforge.net/projects/openas2/
[6] - http://sourceforge.net/projects/mec-as2/
[7] - https://github.com/metormote/edifact-xml
Thanks,
Amila
--
Amila Manoj Silva
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa
http://amilamanoj.blogspot.com/