AS4 Connector
Properties Configuration Settings
The AS4 Component adds AS4 send and receive capabilities to MuleSoft.
Remarks
The AS4 Connector adds AS4 send and receive capabilities to Mule Project. Using a simple application-like design, the connector allows you to easily incorporate secure EDI (EDI-INT) exchange into your current e-Business process architecture.
Sending AS4 Messages
Outgoing AS4 messages are managed with the Send connector. In order to use the connector, you must specify AS4FromId, AS4ToId, and a URL. Optionally set the SigningCert and RecipientCert to enable signing and encryption. Optionally specify a SignerCert to verify the signature on the response.
Additional properties such as EDIFileName, EDIType, Profile, and more, may also be set.
HTTP/2 is supported on Windows 8.1/Server 2012 R2 or later. If HTTP/2 is used on a version of Windows prior to these versions the connector throws an exception.
Note: HTTP/2 is currently only supported on Windows.
The AS4 Send connector is a Solicit-Response connector and the resulting Mule event will contain the receipt returned by the server if RequireReceipt is True (default).
AS4 Send Example
To get started, add a File Read connector to your flow and configure it to read a target EDI file. Behind the File Read connector, add an AS4 Send module. There is no need to transform the output of the File Read connector before passing it to the AS4 Send module.
All that is left is to configure the connection settings and certificates. The connector will handle sending the AS4 message and receiving a synchronous receipt. The MessageId and ReceiptContent is available in the output attributes.MessageId and attributes.ReceiptContent fields respectively.
Receiving AS4 Messages
The AS4 Receive connector will establish a connection to a server and request messages to download from the specified MPC. If SendReceipt is True (default) the connector will automatically generate a receipt and send it with the next request.
To decrypt the incoming files, set the DecryptionCert property. The SignerCert property specifies the public certificate to use when verifying the signature of received files. Receipts will be signed using the certificate specified by SigningCert.
The connector works by polling the server for files available to download. The polling settings can be found in the "General" tab of the Mule properties page for the connector. During each polling interval the connector will attempt to download all files present in a MPC. Each file will generate a Mule event.
AS4 Receive Example
Add an AS4 Receive source connector to your flow and configure the connection settings and certificates. That is all that is required to get started. The connector will handle connecting to the server and requesting files to download from the specified MPC. One Mule event is generated for each file downloaded.
Behind the AS4 Receive connector you can add a File Write connector to write each file to disk. You will need to dynamically set the Path property on the File Write connector to accomplish this. Click the Mule expression indicator on the Path property and set the value to:
'C:\\temp\\' ++ attributes.ReceivedFileName
The received filename will then be used as the same filename on disk. The content of each file will be present in the payload of the Mule Message. That is all that is required to write an incoming file to disk. Additional properties about the EDI data are also available in the attributes collection.
Receiver Property List
The following is the full list of the properties of the receiver connector with short descriptions. Click on the links for further details.
AgreementRef | The agreement reference. |
AS4FromId | The Id of the party. This value is required. |
AS4FromIdType | The optional type of the Id. If specified this value should be the domain to which the Id belongs. |
AS4FromRole | This field specifies the role of the party. This may be any value agreed upon by the trading partners. |
AS4ToId | The Id of the party. This value is required. |
AS4ToIdType | The optional type of the Id. If specified this value should be the domain to which the Id belongs. |
AS4ToRole | This field specifies the role of the party. This may be any value agreed upon by the trading partners. |
ConversationId | The Conversation Id of the message. |
DecryptionCert | The certificate with private key used to decrypt. |
EDIProperties | A collection of file properties. |
EDISchemaLocation | The EDISchemaLocation , EDISchemaNamespace , and EDISchemaVersion optionally define the schema that applies to this particular file. This may be used by the receiving party to properly interpret the file data. |
EDISchemaNamespace | The namespace of the schema. This property is optional. Refer to EDISchemaLocation for details. |
EDISchemaVersion | The version of the schema. This property is optional. Refer to EDISchemaLocation for details. |
EDIType | The Content-Type of the EDI message. |
Firewall | A set of properties related to firewall access. |
HTTPProxy | A set of properties related to proxy access. |
LogDirectory | The path to a directory for logging. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
LogType | How information gets logged during component execution. |
MessageId | The unique Id of the message. |
MessageProperties | A collection of message properties. |
MPC | The MPC (Message Partition Channel) from which to receive files. |
Other | Defines a set of configuration settings to be used by the component. |
Profile | The AS4 profile. |
ReceiptContent | The content of the receipt. |
ReceiptRefToMessageId | The Message Id to which this receipt applies. |
ReceivedFileName | The name of the file received by the AS4 component. |
RuntimeLicense | Specifies the component runtime license key. |
SendReceipt | Whether to send a receipt. |
Service | The service which acts on the message. |
ServiceAction | The action within a service that acts on the message. |
ServiceType | The type of service. |
SignatureAlgorithm | Signature algorithm to be used in the message. |
SignerCert | The public signing certificate of the partner. |
SigningCert | The certificate used to sign the outgoing AS4 message. |
SSLAcceptServerCert | For sending HTTPS requests, a server certificate to unconditionally accept. |
SSLCert | The certificate to use for client authentication during the SSL handshake. |
TempPath | A temporary local directory where data can be stored before the component processes it. |
Timeout | A timeout for the component. |
TokenPassword | The password used in UsernameToken authentication. |
TokenUser | The user used in UsernameToken authentication. |
URL | The URL to which the request is made. |
Sender Property List
The following is the full list of the properties of the sender connector with short descriptions. Click on the links for further details.
AgreementRef | The agreement reference. |
AS4FromId | The Id of the party. This value is required. |
AS4FromIdType | The optional type of the Id. If specified this value should be the domain to which the Id belongs. |
AS4FromRole | This field specifies the role of the party. This may be any value agreed upon by the trading partners. |
AS4ToId | The Id of the party. This value is required. |
AS4ToIdType | The optional type of the Id. If specified this value should be the domain to which the Id belongs. |
AS4ToRole | This field specifies the role of the party. This may be any value agreed upon by the trading partners. |
CompressionFormat | The compression format (if any) to use. |
ConversationId | The Conversation Id of the message. |
EDIFileName | The file name to be used in outbound request. |
EDIProperties | A collection of file properties. |
EDIType | The Content-Type of the EDI message. |
EncryptionAlgorithm | The algorithm, if any, used to encrypt the EDI data. |
ErrorCode | TBD. |
ErrorMessage | TBD. |
Firewall | A set of properties related to firewall access. |
HTTPPassword | A password if authentication is to be used. |
HTTPProxy | A set of properties related to proxy access. |
HTTPUser | A user name if authentication is to be used. |
LogDirectory | The path to a directory for logging. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
LogType | How information gets logged during component execution. |
MessageId | The unique Id of the message. |
MessageProperties | A collection of message properties. |
Other | Defines a set of configuration settings to be used by the component. |
Profile | The AS4 profile. |
ReceiptContent | The content of the receipt. |
ReceiptRefToMessageId | The Message Id to which this receipt applies. |
RecipientCert | The public certificate used to encrypt files when sending. |
RefToMessageId | Specifies the RefToMessageId in the message. |
RequireReceipt | Whether to require a receipt. |
RuntimeLicense | Specifies the component runtime license key. |
Service | The service which acts on the message. |
ServiceAction | The action within a service that acts on the message. |
ServiceType | The type of service. |
SignatureAlgorithm | Signature algorithm to be used in the message. |
SignerCert | The public signing certificate of the partner. |
SigningCert | The certificate used to sign the outgoing AS4 message. |
SSLAcceptServerCert | For sending HTTPS requests, a server certificate to unconditionally accept. |
SSLCert | The certificate to use for client authentication during the SSL handshake. |
Timeout | A timeout for the component. |
URL | The URL to which the request is made. |
Configuration Settings
The following is a list of configuration settings for the connector with short descriptions. Click on the links for further details.
AgreementRefPMode | AgreementRef PMode of message. |
AgreementRefType | The type of AgreementRef. |
AllowWarnings | Whether warnings are interpreted as fatal errors. |
AttachXMLFiles | Whether to send XML files as attachments or within the SOAP body. |
CloseStreamAfterProcessing | Whether to close the input or output stream after processing. |
CompressXMLPayloads | Whether to compress XML data. |
ContentTransferEncoding | The content encoding of the payload data. |
DetectDuplicates | Whether to detect duplicate messages when receiving. |
EBPrefix | Specifies the prefix to use for messaging. |
EDIDataPartId[i] | Specified the part Id at the given index. |
EncryptionSecurityTokenFormat | The format to use for the security token when encryption. |
ErrorOnNegativeMDN | Whether an exception should be raised when a negative MDN is received. |
FilenameProperty | Defines a part property to hold the filename. |
ForceSigningCert | Whether to force only the SigningCert to be used for signing. |
FromId[i] | The Id of the party specified by AS4From. |
FromIdCount | The number of Ids for the party specified by AS4From. |
FromIdType[i] | The Id type of the party specified by AS4From. |
IdRight | A custom Id for the right side of the MessageId. |
KeyEncryptionAlgorithm | The algorithm used to encrypt the key. |
LogLevel | The level of information to log. |
LogOptions | The information to be written to log files. |
MaxDownloads | The maximum number of downloads to perform in each polling interval. |
MessageType | Indicates the type of message received. |
NormalizeIssuerSubject | Whether to normalize the certificate subject within the X509Data element. |
OAEPMGF1HashAlgorithm | The MGF1 hash algorithm used when encrypting a key. |
OAEPParams | The hex encoded OAEP parameters to be used when encrypting a key. |
OAEPRSAHashAlgorithm | The RSA hash algorithm used when encrypting a key. |
ReceiptURL | The URL to which receipts are sent. |
ReferenceHashAlgorithm | The hash algorithm used to has the data specified in the reference of a signature. |
RequireEncryption | Whether encryption is required when processing received messages. |
RequireSignature | Whether a signature is required when processing received messages. |
ResponseFile | A file from which to read the response. |
SignerCACert | The CA certificates that issued the signer certificate. |
SigningSecurityTokenFormat | The format to use for the security token when signing. |
TempPath | Where temporary files are optionally written. |
ToId[i] | The Id of the party specified by AS4To. |
ToIdCount | The number of Ids for the party specified by AS4To. |
ToIdType[i] | The Id type of the party specified by AS4To. |
TokenPasswordType | The password type used in UsernameToken authentication. |
TransformReceipt | Whether to canonicalize the received receipt. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLSecurityFlags | Flags that control certificate verification. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |