Altova FlowForce Server 2025 Advanced Edition

Full path: /system/as2/send

 

The as2/send function sends an AS2 message to a remote AS2 server. To be able to call this function from a job, you must first configure the AS2 partner's details (including any applicable certificates) in FlowForce Server. For details, see Configuring AS2 Partners. For general information about AS2 integration and usage, see AS2 Integration.

 

The as2/send function returns an AS2 MDN object which encapsulates the actual MDN returned by the server and auxiliary information from the protocol. To get additional information from the AS2 MDN object (e.g., the HTTP status or the MDN of the original message), add an execution step that calls the required AS2 expression functions.

 

To find out more about how the as2/send function is used in a job, see Send AS2 Messages.

 

Parameters

Name

Type

Description

Partner

AS2 Partner

Mandatory parameter. References the AS2 partner object (see Configuring AS2 Partners).

Message

stream

Mandatory parameter. The content of the AS2 message to send, as a stream object. The stream required by this field can be converted from a file (for example, XML or EDI file) by means of a FlowForce Expression, for example:

 

stream-open("C:\files\myfile.edi", "application/EDIFACT")

 

Notice that the stream-open function above also supplies the message Content-Type header as second parameter. Other values for Content-Type can also be used if necessary.

 

For an introduction to expressions in FlowForce, see Expressions.

Message ID

string

Optional parameter. This field provides the value of the Message-ID header field, as a string. To generate this value, call the new-message-id expression function.

Abort on error

Boolean

Optional parameter. This parameter determines the outcome of a job in which an error has occurred. If the Abort on error parameter is true, job execution will be terminated. If the Abort on error parameter is false, FlowForce Server will ignore errors and continue job execution. The default value is true.

 

Examples

See the following examples:

 

Example: Full AS2 Message Exchange (Simple)

Example: Full AS2 Message Exchange (Advanced)

 

© 2018-2024 Altova GmbH