send

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Built-in Functions > /system/as2 >

send

Full path: /system/as2/send

 

Sends an AS2 message to a remote AS2 server. In order to call this function from a job, the AS2 partner's details (including any applicable certificates) must be already configured in FlowForce Server. See also Creating the AS2 Job.

 

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

 

Parameters

Name

Type

Description

Partner

AS2 Partner

References the "AS2 partner" object, see Configuring AS2 Partners.

Message

stream

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 The FlowForce Expression Language.

Abort on error

Boolean

This Boolean parameter determines what should be the return value of the function if the job fails. If Abort on error is FALSE, the function will return Boolean FALSE as well. If Abort on error is TRUE, the job execution is aborted. The default value is TRUE.

 

Examples

See the following examples:

 

Example: Full AS2 Message Exchange (Simple)
Example: Full AS2 Message Exchange (Advanced)

© 2019 Altova GmbH