AS2 - Decode/Verify Message

Declaration

<AMAS2 ACTIVITY="decode_message" AS2MESSAGE="text" DATAFILE="text" OVERWRITEFILE="NO" RESULTVARIABLE="text" RESULTDATASET="text" ERRORDATASET="text" />

See Also

Decode/Verify AS2 Message, Send AS2 Message, Verify AS2 Receipt, Send Email, HTTP Download, HTTP Post

Description

Decodes verifies an AS2 message.

Practical Usage

Used to decompile the code written in AS2 and verify that the signature wrapper in the AS2 message is valid.

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

AS2 Message File

Text

Yes

(Empty)

AS2MESSAGE=

"C:\folder1\filename.as2m"

Specifies the location of the message file to decode/verify. 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.

Data File

Text

Yes

(Empty)

DATAFILE=

"C:\folder2\filename.bin"

Specifies the location of the AS2 data file to decode/verify.

Overwrite existing file

Yes/No

No

Yes

OVERWRITEFILE="NO"

If set to YES, indicates that if an existing file with the same name already exists, it will be overwritten. This parameter is set to YES by default.

Populate variable with result

Text

No

(Empty)

RESULTVARIABLE="varName"

The name of an existing variable to populate with decode/verification results.

Populate dataset with message information

Text

No

(Empty)

RESULTDATASET="theDataset"

The dataset to create and populate with AS2 message information.

Populate dataset with error information

Text

No

(Empty)

ERRORDATASET="errorData"

The dataset to create and populate with AS2 error information.

Certificates to Verify Signature Properties

Property

Type

Required

Default

Markup

Description

Certificate

Text

No

(Empty)

CERTIFICATEPATH=

"C:\temp\cert_file.cer"

The location of the certificate file to verify.

PassPhrase

Text

No

(Empty)

PASSPHRASE="encrypted_text"

The passphrase associated with the certificate file to verify.

Use embedded certificate(s)

Yes/No

No

No

USEEMBEDDED="YES"

If set to YES, specifies that embedded certificates will be used. This parameter is set to NO by default.

Use local certificates

Yes/No

No

No

USELOCAL="YES"

If set to YES, specifies that local certificates will be used. This parameter is set to NO by default.

Verify message digests

Yes/No

No

No

VERIFYMESSAGEDIGEST="YES"

If set to YES, specifies that message digests will also be verified. This parameter is set to NO by default.

Certificates to Decode Data Properties

Property

Type

Required

Default

Markup

Description

Certificate

Text

No

(Empty)

CERTIFICATEPATH=

"C:\temp\cert_file.cer"

The location of the certificate file used to decode the message.

Key

Text

No

(Empty)

KEY="C:\temp\key_file.key"

The location of the key file used to decode the message.

PassPhrase

Text

No

(Empty)

PASSPHRASE="encrypted_text"

The passphrase associated with the certificate file to decode.

 

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 allows you to 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 and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

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:  Decode/Verify AS2 message "C:\AS2\Files\SendMessage.as2m". Store message data into file "C:\temp\datafile.xml".

 

<AMAS2 ACTIVITY="decode_message" AS2MESSAGE="C:\AS2\Files\SendMessage.as2m" DATAFILE="C:\temp\datafile.xml" RESULTDATASET="InfoDataset" ERRORDATASET="ErrDataset" />

 

↑ Top of Page