A W&G project about installing and using OpenAS2 server.
https://github.com/OpenAS2/OpenAs2App
OpenAS2 is a java-based implementation of the EDIINT AS2 standard. It is intended to be used as a server.
Configuration files (in C:\OpenAS2\config):
config.xmlpartnership.xmlas2_certs.p12commands.xmlTo configure sending data it is necessary :
partnerships.xmlpartner tagpartnership tagas2_certs.p12)x509_alias of the partner tagExample configuration:
<partner name="PartnerC"
as2_id="PartnerC_OID"
x509_alias="partnerc"
email="as2msgs@partnerc.com"/>
...
<partnership name="MyCompany-to-PartnerC">
<sender name="MyCompany"/>
<receiver name="PartnerC"/>
<pollerConfig enabled="true"/>
<attribute name="protocol" value="as2"/>
<attribute name="content_transfer_encoding" value="binary"/>
<attribute name="subject" value="File $attributes.filename$ sent from $sender.name$ to $receiver.name$"/>
<attribute name="as2_url" value="http://localhost:10080"/>
<attribute name="as2_mdn_to" value="edi@myCompany.com"/>
<attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, $attribute.sign$"/>
<attribute name="encrypt" value="3DES"/>
<!-- <attribute name="sign" value="SHA256"/>-->
<attribute name="sign" value="SHA1"/>
<attribute name="resend_max_retries" value="3"/>
<attribute name="prevent_canonicalization_for_mic" value="false"/>
<attribute name="rename_digest_to_old_name" value="false"/>
<attribute name="remove_cms_algorithm_protection_attrib" value="false"/>
</partnership>
Sending:
C:\OpenAS2\data\outbox\PartnerA_OIDconfig.xml:<pollerConfigBase classname=“org.openas2.processor.receiver.AS2DirectoryPollingModule” outboxdir=“$properties.storageBaseDir$/outbox/$partnership.receiver.as2_id$”
Received MDN will be written into the folder defined in config.xml by property module.MDNFileModule.filename
module.MDNFileModule.filename=“module.MDNFileModule.filename=“$properties.storageBaseDir$/$mdn.msg.sender.as2_id$-$mdn.msg.receiver.as2_id$/mdn/$date.yyyy-MM-dd$/$mdn.msg.headers.message-id$”C:\OpenAS2\data\MyCompany_OID-PartnerC_OID\mdn\2023-03-02\20230302115027+0100-559-MyCompany_OID_PartnerC_OID_testFile.txt