For the complete documentation index, see llms.txt. This page is also available as Markdown.

SendMessage

As4 SendMessage task sends a message to an AS4 server using the provided parameters.

Task version: 1.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

SenderAs4Id : String

Id of the company that will send the message.

Default: - Example: MyCompany

ReceiverAs4Id : String

Id of the company that will receive the message.

Default: - Example: YourCompany

Subject : String

Optional subject that will be added as an AS4 message property.

Default: - Example: Subject of the message

MessageFilePath : String

Path to the file that will be sent in the message.

Default: - Example: C:\Document\message.txt

AdditionalHeaders : Header[]

Optional additional AS4 message properties to send with the message.

Default: - Example: [{ "Name": "X-ApiKey", "Value": "my-api-key" }]

Name
Description

As4EndpointUrl : String

Connection string to AS4 server.

Default: - Example: https://as4.example.com/msh

SignMessage : Boolean

Defines whether to sign the message.

Default: False Example: true

EncryptMessage : Boolean

Defines whether to encrypt the message.

Default: False Example: true

🗝SenderCertificatePassword : String

Password for the sender certificate.

Default: - Example: mySecurePassword123

SenderCertificatePath : String

Path to the sender certificate file in .pfx format.

Default: - Example: C:\Document\sender_cert.pfx

ReceiverCertificatePath : String

Path to the receiver public certificate file used for encryption and receipt signature verification.

Default: - Example: C:\Document\receiver_cert.pem

AgreementRef : String

Agreement identifier shared by both AS4 parties. If not provided the agreement will be generated automatically in form "SenderId:ReceiverId".

Default: - Example: urn:agreement:my-company:partner

ContentTypeHeader : String

Payload content type for the file being sent.

Default: text/plain Example: application/zip

Name
Description

ReceiptMode : ReceiptMode

Specifies whether to request a synchronous or asynchronous AS4 receipt.

Possible values:

  • Sync: Synchronous receipt mode. The sender waits for the receipt immediately after sending the message.

  • Async: Asynchronous receipt mode. The sender requests the receipt to be returned later,

allowing the send operation to complete without waiting for it.

Default: Sync Example: Sync

AsyncReceiptInfoDirectory : String

Directory where the component stores correlation data for async receipt verification.

Required when asynchronous receipts are enabled.

Default: - Example: C:\Temp\Frends\As4\AsyncReceipts

LogDirectory : String

Directory where transport logs are written.

If left empty, logging is not enabled.

Default: - Example: C:\Temp\Frends\As4\Logs

ThrowErrorOnFailure : Boolean

Whether to throw an error on failure.

Default: True Example: false

ErrorMessageOnFailure : String

Overrides the error message on failure.

Default: - Example: Custom error message

Task Result

Name
Description

Success : Boolean

Indicates if the task completed successfully. Example: true

PartnerResponse : String

The raw receipt content returned by the AS4 partner when using synchronous receipts. Example: soap:Envelope...</soap:Envelope>

MessageId : String

ID of a sent message. Example: 123

ReceiptStatus : String

Status of receipt handling. Example: ReceiptVerified

ReceiptMessage : String

Human-readable receipt handling message. Example: Synchronous receipt verified.

ReceiptReferenceMessageId : String

Message Id referenced by the returned receipt, when available. Example: 123@nsoftware

IsReceiptPending : Boolean

Indicates whether the receipt is expected asynchronously. Example: false

Error : Error

Error that occurred during task execution. Example: object { string Message, object { Exception Exception } AdditionalInfo }

Error.Message : String

Summary of the error. Example: Unable to send As4 message.

Error.AdditionalInfo : Exception

Additional information about the error. Example: object { Exception Exception }

Task Changelog

Changelog for Task Frends.As4.SendMessage.

[1.0.0] - 2026-08-19

Added

  • Initial implementation.

Last updated

Was this helpful?