synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiranya Jayathilaka <hiranya...@gmail.com>
Subject Re: [SYNAPSE-860] AS2 Support
Date Wed, 28 Mar 2012 04:21:05 GMT
Great research work up front. Do you have a plan as to how this can be
implemented in Synapse? Since the wire level transport is HTTP I don't
think we need a new transport. It would be basically a builder/formatter
pair and a set of mediators to manipulate AS2 messages. Is that the case?

Thanks,
Hiranya

On Tue, Mar 27, 2012 at 8:15 PM, Amila Manoj <amilamanoj@gmail.com> wrote:

> Hi,
>
> Here's a brief summery on AS2.
> Files are encoded as attachments in a S/MIME message. This is what we call
> an AS2 message.
> Those messages are sent using the HTTP/HTTPS, usually POST
> The Messages can be signed, encrypted. This is optional according to the
> specs.
> Also, the Messages may request a MDN. (to provide non-repudiation) This is
> optional too. MDN is typically not encrypted.
> If there are problems receiving or interpreting the original AS2 message,
> a "failed" MDN may be sent back.
> Both "failed" MDN and not receiving MDN (when it is requested) are
> considered as failures according to specs.
>
> I tried out Mendelson. They provide a AS2 server for testing [1] and a
> nice user interface.
> The endpoints are referred to as business partners in AS2 jargon.
> Mendelson allows to configure business partners. A business partner can be
> a local station or a remote station.
> In a local config, we need to specify private keys for encryption and
> signing. These are picked from a PKCS12 key-store file. The URL to receive
> MDN can be also configured.
> In a remote business partner, notable options are sending URL, encryption
> and signing algorithms (can choose not to sign/encrypt) and its public keys.
>
> I'm looking at its source to understand how they handle S/MIME messages.
>
> Will update the thread.
>
>
>
> On Fri, Mar 23, 2012 at 12:17 PM, Amila Manoj <amilamanoj@gmail.com>wrote:
>
>> 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/
>>
>
> [1]- http://as2.mendelson-e-c.com:8080/webas2/
>
>
>
> --
> Amila Manoj Silva
> Undergraduate
> Department of Computer Science and Engineering
> University of Moratuwa
> http://amilamanoj.blogspot.com/
>



-- 
Hiranya Jayathilaka
Associate Technical Lead;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Mime
View raw message