AS2 - Send Message

Declaration

<AMAS2 AS2MESSAGE="text" AS2FROM="text" AS2TO="text" SUBJECT="text" MESSAGEID="text" CHARSET="text" HEADERENCODING="text (options)" DATAENCODING="text (options)" DATAFILE="text" SENDAS="text" DATACONTENTTYPE="text" ENCRYPT="YES/NO" ENCRYPTALGO="text (options)" ENCRYPTENCODING="Base64" KEYBITS="number" SIGN="YES" INCLUDECERTCHAIN="YES"><CERTIFICATE CERTIFICATEPATH="text" PASSPHRASE="text (encrypted)" TYPE="text (options)" /><CERTIFICATE CERTIFICATEPATH="text" KEY="text" PASSPHRASE="text (encrypted)" TYPE="sign" /></AMAS2>

See Also

AS2 - Create Message | AS2 - Decode/Verify Message | AS2 - Send Message | AS2 - Verify Receipt | Send Email | Send IM | Get Email

Description

Sends an AS2 message created by the 'Create AS2 Message' activity.

Practical Usage

Used to send a message designed to allow business transactions to move securely over the Internet.

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

AS2 Message File

Text

Yes

(Empty)

DATAFILE="C:\folder1\filename"

The location of the message file to be sent. All AS2 messages must derive from a specific file. This file contains extra fields such as From, To, and Data File. The full path and file name can be entered manually in the provided field or you can click the Folder icon to navigate to the file.

Server URL

Text

Yes

(Empty)

SERVER="u"

The Server URL in which to send the message from.

AS2 Receipt File

Text

Yes

(Empty)

AS2FROM="Clark Kent"

The file in which to save the asynchronous receipt to.

Overwrite Existing File

Yes/No

No

Yes

OVERWRITEFILE="NO"

If set to YES (default value), a receipt file with an identical name that already exists will be overwitten with the new receipt file.   

Credentials Properties

Property

Type

Required

Default

Markup

Description

Authentication Type

Text (options)

No

(Empty)

AUTHENTICATION="digest"

The authentication type to use. The available options are:

  • None (default)

  • Basic

  • Digest

  • NTLM

Username

Text

No

(Empty)

USERNAME="user"

The username used to authenticate. This parameter is ignored if None is selected from the Authentication Type parameter.

Password

Text

No

(Empty)

PASSWORD="encryptedtext"

The password used to authenticate. This parameter is ignored if None is selected from the Authentication Type parameter.

Advanced Properties

Property

Type

Required

Default

Markup

Description

User Agent

Text

No

AutoMate

USERAGENT="AutoMate1"

The user agent used to send the AS2 message.

Timeout

Number

No

100

TIMEOUT="50000"

Along with the Measure parameter, specifies the total amount of time that this activity should be allowed to complete before a timeout error occurs.

Measure

Text (options)

No

Seconds

MEASURE="Milliseconds"

The measure associated to the value entered under the Timeout parameter. The available options are:

  • Milliseconds

  • Seconds

  • Minutes

  • Hours

Certificate File

Text

No

(Empty)

CERTIFICATE="C:\Temp\cert_file.cer"

The certificate file to authenticate the AS2 message being sent.

Passphrase

Text

No

(Empty)

CERTIFICATEPASSPHRASE="encrypted"

The passphrase associated to the certificate file.

Ignore invalid certificates

Yes/No

No

No

IGNOREINVALIDCERTIFICATE="YES"

If set to YES, specifies that any invalid certificates found will automatically be ignored.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description:  Send AS2 message "C:\AS2\Files\SendMessage.as2m" to server "http://localhost:8080/as2handler". Save AS2 receipt into "http://localhost:8080/as2handler".

 

<AMAS2 ACTIVITY="send_message" SERVER="http://localhost:8080/as2handler" AS2MESSAGE="C:\AS2\Files\SendMessage.as2m" AS2RECEIPT="C:\AS2\Files\receipt_file.as2r" TIMEOUT="200" />

 

↑ Top of Page