The AS2 Connector allows you to send and receive data from AS2 certified servers.

Additional Info

Requires Mule Enterprise License

Yes  

Requires Entitlement

Yes  

Mule Version

3.5.3 or higher

Configs


Configuration

<as2:config>

Configuration

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

httpEndpointRef

String

Global HTTP endpoint reference from where the connector will read or write messages to.

x 


Partner Manager Configuration

<as2:partner-manager-config>

Configuration Integrate with Anypoint Partner Manager to manage your AS2 Connector and record AS2 transmissions. Partner Manager Connector must be configured before enabling this feature.

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

standard

Standard

Format Standard.

x 

standardVersion

String

Format Version.

 

messageType

String

Message Type.

 

httpEndpointRef

String

Global HTTP endpoint reference from where the connector will read or write messages to.

x 

Processors


Send

<as2:send>

Send AS2 messages using the current Mule Message payload for the message's content.

../../../doc/as2-connector.xml.sample as2:send

XML Sample

<as2:send config-ref="connector-config" as2From="home" as2To="partner" encrypt="true" keyStorePassword="modus" keyStorePath="home.jks" requestReceipt="signed" sign="true" requireReceiptForUnsupportedSignatureFormat="true" requireReceiptForUnsupportedDigestAlgorithm="true" subject="Hello World" contentType="application/EDI-X12" compress="true" contentTransferEncoding="binary" fallbackDigestAlgorithm="none" filename="modus.dat" digestAlgorithm="sha1" receiptDeliveryOption="http://modusintegration.com" receiptTimeout="5000" asyncReceiptTlsCertificateKeyStoreEntryAlias="partnerTls" receiptVerificationCertificateKeyStoreEntryAlias="partnerSig"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

messageId

String

Specify the value for the Message-Id header. The ID is generated when this property is not set.

 

subject

String

Human readable string summarizing the request.

 

contentType

String

Content-Type of the message payload.

application/EDIFACT

 

contentTransferEncoding

ContentTransferEncodingEnum

Content-Transfer-Encoding of the message payload. Only applicable for signed or encrypted requests.

binary

 

filename

String

Filename set in the Content-Disposition header. Only applicable for signed or encrypted requests.

 

receiptTimeout

Integer

Wait time, in milliseconds, for receipt.

 

compress

Boolean

Specify whether to compress the message payload.

false

 

as2From

String

AS2 identifier of the sender.

x 

as2To

String

AS2 identifier of the receiver.

x 

keyStorePath

String

Path to the JKS key store containing the certificate and public/private key pair for signing and encrypting the request as well as verifying the receipt. If the key store cannot be read from the filesystem, the connector tries to read it from the Java classpath.

 

keyStorePassword

String

Password protecting the key store.

 

receiptVerificationCertificateKeyStoreEntryAlias

String

Key store entry alias of the certificate used to verify the signed receipt. This option must be set if distinct certificates are used to encrypt the request and verify the returned receipt.

 

asyncReceiptTlsCertificateKeyStoreEntryAlias

String

Key store entry alias of the certificate to present to the sender when receiving an async receipt over HTTPS.

 

requestReceipt

RequestReceipt

Specify whether to request a receipt.

unsigned

 

sign

Boolean

Specify whether to sign the request.

false

 

encrypt

Boolean

Specify whether to encrypt the request.

false

 

suppressCmsAlgorithmProtectionAttribute

Boolean

Suppress the CMS algorithm protection attribute for AS2 systems that do not support it.

false

 

requireReceiptForUnsupportedSignatureFormat

Boolean

Specify whether the receiver should return an unsigned receipt in case the receiver could not sign the receipt with the requested signature format.

false

 

requireReceiptForUnsupportedDigestAlgorithm

Boolean

Specify whether the receiver should return an unsigned receipt in case the receiver could not create the receipt signature or MIC with the requested digest algorithm.

false

 

digestAlgorithm

DigestAlgorithmEnum

Specify the preferred digest algorithm the receiver uses to create the MIC and the signature.

sha1

 

fallbackDigestAlgorithm

DigestAlgorithmOptionEnum

Specify the fallback digest algorithm the receiver uses to create the MIC and the signature.

none

 

receiptDeliveryOption

String

Return URL the receiver uses to send the receipt.

 

servicePath

String

/

 

metadata

Map<String,Serializable>

Extra metadata to contribute to AS2 transmissions on Partner Manager.

 

Returns

Return Java Type Description

MuleEvent

Receiver's receipt.

Sources


Receive

<as2:receive>

Receive AS2 messages.

../../../doc/as2-connector.xml.sample as2:receive

XML Sample

<as2:receive config-ref="connector-config" requireSenderAs2From="partner" requireSenderAs2To="home" keyStorePassword="modus" keyStorePath="home.jks" receiptSubject="Hello World Receipt" requireSenderEncrypts="true" requireSenderSigns="true" preferredDigestAlgorithm="none"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

callback

SourceCallback

Callback to be invoked when a message is received.

x 

receiptSubject

String

Human readable string summarizing the receipt.

 

requireSenderCompress

Boolean

Specify whether the request received must be compressed.

false

 

requireSenderAs2From

String

Required sender AS2 identifier in the request.

 

requireSenderAs2To

String

Required receiver AS2 identifier in the request.

 

keyStorePath

String

Path to the JKS key store containing the certificate and public/private key pair for verifying and decrypting the request as well as signing the receipt. If the key store cannot be read from the filesystem, the connector tries to read it from the Java classpath.

 

keyStorePassword

String

Password protecting the key store.

 

suppressCmsAlgorithmProtectionAttribute

Boolean

Suppress the CMS algorithm protection attribute for AS2 systems that do not support it.

false

 

requireSenderSigns

Boolean

Specify whether the request received must be signed.

false

 

requireSenderEncrypts

Boolean

Specify whether the request received must be encrypted.

false

 

preferredDigestAlgorithm

DigestAlgorithmOptionEnum

Specify the preferred digest algorithm to use.

none

 

invokeFlowBeforeSendReceipt

String

Name of the flow to invoke after processing an AS2 request but before sending receipt to sender. If the invoked flow throws an exception, then a 500 HTTP status code is returned to the sender.

 

metadata

Map<String,Serializable>

 

servicePath

String

/

 

Returns

Return Java Type Description

void