AS4 MMDs

B2Bi application pickups can consume AS4 MMDs that are generated in the backend. This chapter presents examples of the following types of MMDs that are supported by AS4:

The B2Bi Developer Guide zipped package (of which this document is a part) includes each of these sample MMD files in .txt format. You can edit these sample files, and use them to test A4 MMD use with B2Bi.

Push MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4BUYER</Metadata>

<Metadata name="To" type="String">AS4SUPPLIER</Metadata>

<Metadata name="PModeId">PO</Metadata>

<Metadata name="FromRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/initiator</Metadata>

<Metadata name="ToRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/responder</Metadata>

<Metadata name="Service" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/service</Metadata>

<Metadata name="Action" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/action</Metadata>

<Metadata name="ConversationId" type="string">PO-trading-001</Metadata>

<Metadata name="AgreementRef" type="string">SupplierTrading</Metadata>

<MessagePayloads>

<Payload id="12345" packagingLocation="SOAPBody">

<Location type="filePath">C:\Axway\ShareName\common\smallxmlPO.xml</Location>

</Payload>

<Payload id="12346" packagingLocation="Attachment">

<MimeContentId>POAttach</MimeContentId>

<MimeContentType>application/gzip</MimeContentType>

<Location type="filePath">C:\Axway\ShareName\common\largexmlPO.xml</Location>

</Payload>

</MessagePayloads>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

PModeID

Optional. Indicates the association of the message with a P-Mode (AS4 processing mode).

FromRole

Required. String value that identifies the authorized role of the party sending the message.

ToRole

Required. String value that identifies the authorized role of the party receiving the message.

Service

Required. String value that identifies the service that acts on the message and it is specified by the designer of the service.

Action

Required. String value that identifies an operation or an activity within a Service that may support several actions.

ConversationId

Required. String value that identifies a set of related messages that make up a conversation between Parties.

AgreementRef

Optional. String value that identifies the agreement that governs the exchange.

PackagingLocation

Optional. Attribute of the MessagePayloads element has the following valid values:

  • SoapBody
  • Attachement
  • None

Only one payload can be attached to the SOAPBody, and only one SOAPBody value is allowed if multiple payloads are associated with the MMD.

Pull (queuing) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata type="String" name="From">AS4BUYER</Metadata>

<Metadata type="String" name="To">AS4SUPPLIER</Metadata>

<Metadata name="PModeId">PO</Metadata>

<Metadata type="string" name="FromRole">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/initiator</Metadata>

<Metadata type="string" name="ToRole">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/responder</Metadata>

<Metadata type="string" name="Service">http://docs.oasis-open.org/ebxml-msg/as4/200902/service</Metadata>

<Metadata type="string" name="Action">http://docs.oasis-open.org/ebxml-msg/as4/200902/action</Metadata>

<Metadata type="string" name="ConversationId">PO-trading-001</Metadata>

<Metadata type="string" name="AgreementRef">SupplierTrading</Metadata>

<Metadata type="string" name="message.WaitForPull">true</Metadata>

<Metadata type="string" name="MessagePartitionChannel">http://msh.example.com/mpc123</Metadata>

<MessagePayloads>

<Payload id="12345" packagingLocation="SOAPBody">

<Location type="filePath">C:\Axway\ShareName\common\smallxmlPO.xml</Location>

</Payload>

<Payload id="123456" packagingLocation="Attachment">

<MimeContentId>POAttach</MimeContentId>

<MimeContentType>application/gzip</MimeContentType>

<Location type="filePath">C:\Axway\ShareName\common\largexmlPO.xml</Location>

</Payload>

</MessagePayloads>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

PModeID

Optional. Indicates the association of the message with a P-Mode (AS4 processing mode).

FromRole

Required. String value that identifies the authorized role of the party sending the message.

ToRole

Required. String value that identifies the authorized role of the party receiving the message.

Service

Required. String value that identifies the service that acts on the message and it is specified by the designer of the service.

Action

Required. String value that identifies an operation or an activity within a Service that may support several actions.

ConversationId

Required. String value that identifies a set of related messages that make up a conversation between Parties.

AgreementRef

Optional. String value that identifies the agreement that governs the exchange.

message.WaitForPull

Optional. Used to stop a message from being processed in the action tree and move it to a "wait for pull state". When set to “true” the message is placed in a “WaitForPull” state otherwise when set to “false” the message continues being processed.

MessagePartitionChannel

Optional. Identifies the Message Partition Channel from which the message is to be pulled. The default MPC value (when specified explicity) is http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultMPC. The absence of this attribute implicitly indicates the default MPC.

PackagingLocation

Optional. Attribute of the MessagePayloads element has the following valid values:

  • SoapBody
  • Attachement
  • None

Only one payload can be attached to the SOAPBody, and only one SOAPBody value is allowed if multiple payloads are associated with the MMD.

PullRequest (signal type) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4SUPPLIER</Metadata>

<Metadata name="To" type="String">AS4BUYER</Metadata>

<Metadata name="SignalType" type="string">PullRequest</Metadata>

<Metadata name="AS4.ResponseProcessingExchangePoint" type="string">AS4 Buyer Delivery</Metadata>

<Metadata name="MessagePartitionChannel">http://msh.example.com/mpc123</Metadata>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

SignalType

String identifying the type of signal message the message represents. There are three types of signal message:

  • PullRequest
  • Receipt
  • Error

This example sends a PullRequest signal message to a remote partner and receives a user message in response to the PullRequest.

AS4.ResponseProcessingExchangePoint

Optional. String used to store a reference to an exchange-point friendly name, from which the business protocol settings to be used when processing the response.

MessagePartitionChannel

Optional. Identifies the Message Partition Channel from which the message is to be pulled. The default MPC value (when specified explicity) is http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultMPC. The absence of this attribute implicitly indicates the default MPC.

Receipt (signal type) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4SUPPLIER</Metadata>

<Metadata name="To" type="String">AS4BUYER</Metadata>

<Metadata name="SignalType" type="string">Receipt</Metadata>

<Metadata name="RefToMessageId" type="string">7ec02dd4-6674-4004-8c8c-84b0a379c9ff@AS4BUYER</Metadata>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

SignalType

String identifying the type of signal message the message represents. There are three types of signal message:

  • PullRequest
  • Receipt
  • Error

This example sends an asynchronous Receipt signal message as acknowledgment of receiving a user message.

RefToMessageId

String identifying the reference to a received user message, for which this signal is a receipt.

Error (signal type) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4SUPPLIER</Metadata>

<Metadata name="To" type="String">AS4BUYER</Metadata>

<Metadata name="SignalType" type="string">Error</Metadata>

<Metadata name="ErrorCode" type="string">EBMS:0010</Metadata>

<Metadata name="Category" type="string">Processing</Metadata>

<Metadata name="ErrorDescription" type="string">Error reason</Metadata>

<Metadata name="ErrorDetail" type="string">Error Location</Metadata>

<Metadata name="RefToMessageId" type="string">807bed87-8973-411e-81a8-305569174bfd@AS4BUYER</Metadata>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

SignalType

String identifying the type of signal message the message represents. There are three types of signal message:

  • PullRequest
  • Receipt
  • Error

The example sends an asynchronous Error signal message as acknowledgment of receiving a failed user message.

ErrorCode

Optional. String identifying the unique identifier for ebms error types.

Category

String identifying the type of error related to a particular origin. Example: Content, Packaging, UnPackaging, Communication, Internal Processing.

ErrorDescription

Short description of the error.

ErrorDetail

Additional details about the context in which the error occurred.

RefToMessageId

String identifying the reference to a received user message, for which this signal is a receipt.

Push (split/join) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4BUYER</Metadata>

<Metadata name="To" type="String">AS4SUPPLIER</Metadata>

<Metadata name="PModeId">PO</Metadata>

<Metadata name="FromRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/initiator</Metadata>

<Metadata name="ToRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/responder</Metadata>

<Metadata name="Service" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/service</Metadata>

<Metadata name="Action" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/action</Metadata>

<Metadata name="ConversationId" type="string">PO-trading-001</Metadata>

<Metadata name="AgreementRef" type="string">SupplierTrading</Metadata>

<Metadata name="SplitMessage">true</Metadata>

<Metadata name="FragmentSize">5</Metadata>

<Metadata name="SplitCompressionAlgorithm">gzip</Metadata>

<MessagePayloads>

<Payload id="12346" packagingLocation="Attachment">

<MimeContentId>POAttach</MimeContentId>

<MimeContentType>application/gzip</MimeContentType>

<Location type="filePath">C:\Axway\ShareName\common\VeryLargeFile.xml</Location>

</Payload>

</MessagePayloads>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

PModeID

Optional. Indicates the association of the message with a P-Mode (AS4 processing mode).

FromRole

Required. String value that identifies the authorized role of the party sending the message.

ToRole

Required. String value that identifies the authorized role of the party receiving the message.

Service

Required. String value that identifies the service that acts on the message and it is specified by the designer of the service.

Action

Required. String value that identifies an operation or an activity within a Service that may support several actions.

ConversationId

Required. String value that identifies a set of related messages that make up a conversation between Parties.

AgreementRef

Optional. String value that identifies the agreement that governs the exchange.

SplitMessage

String used to trigger the AS4 splitting on the message being processed.

FragmentSize

String used to override the global system property. Default is 500Kb.

SplitCompressionAlgorithm

The size (in bytes) of the compressed MIME envelope. Default is “None”.

PackagingLocation

Optional. Attribute of the MessagePayloads element has the following valid values:

  • SoapBody
  • Attachement
  • None

Only one payload can be attached to the SOAPBody, and only one SOAPBody value is allowed if multiple payloads are associated with the MMD.

Pull (Split/Join) MMD

Example

<?xml version="1.0" encoding="UTF-8"?>

<MessageMetadataDocument protocol="ebXML" protocolVersion="3.0">

<Metadata name="From" type="String">AS4BUYER</Metadata>

<Metadata name="To" type="String">AS4SUPPLIER</Metadata>

<Metadata name="PModeId">PO</Metadata>

<Metadata name="FromRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/initiator</Metadata>

<Metadata name="ToRole" type="string">http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/responder</Metadata>

<Metadata name="Service" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/service</Metadata>

<Metadata name="Action" type="string">http://docs.oasis-open.org/ebxml-msg/as4/200902/action</Metadata>

<Metadata name="ConversationId" type="string">PO-trading-001</Metadata>

<Metadata name="AgreementRef" type="string">SupplierTrading</Metadata>

<Metadata type="string" name="message.WaitForPull">true</Metadata>

<Metadata type="string" name="MessagePartitionChannel">http://msh.example.com/mpc123</Metadata>

<Metadata name="SplitMessage">true</Metadata>

<Metadata name="FragmentSize">5</Metadata>

<Metadata name="SplitCompressionAlgorithm">gzip</Metadata>

<MessagePayloads>

<Payload id="12346" packagingLocation="Attachment">

<MimeContentId>POAttach</MimeContentId>

<MimeContentType>application/gzip</MimeContentType>

<Location type="filePath">C:\Axway\ShareName\common\VeryLargeFile.xml</Location>

</Payload>

</MessagePayloads>

</MessageMetadataDocument>

Attribute descriptions

protocolVersion and protocol

These attributes reside in the MessageMetadataDocument element. Set these attributes to:

  • protocolVersion="3.0”
  • protocol="ebXML"

From

Required. The routing ID of the sending party.

To

Required. The routing ID of the receiving party.

PModeID

Optional. Indicates the association of the message with a P-Mode (AS4 processing mode).

FromRole

Required. String value that identifies the authorized role of the party sending the message.

ToRole

Required. String value that identifies the authorized role of the party receiving the message.

Service

Required. String value that identifies the service that acts on the message and it is specified by the designer of the service.

Action

Required. String value that identifies an operation or an activity within a Service that may support several actions.

ConversationId

Required. String value that identifies a set of related messages that make up a conversation between Parties.

AgreementRef

Optional. String value that identifies the agreement that governs the exchange.

SplitMessage

String used to trigger the AS4 splitting on the message being processed.

FragmentSize

String used to override the global system property. Default is 500Kb.

SplitCompressionAlgorithm

The size (in bytes) of the compressed MIME envelope. Default is “None”.

message.WaitForPull

Optional. Used to stop a message from being processed in the action tree and move it to a "wait for pull state". When set to “true” the message is placed in a “WaitForPull” state otherwise when set to “false” the message continues being processed.

MessagePartitionChannel

Optional. Identifies the Message Partition Channel from which the message is to be pulled. The default MPC value (when specified explicity) is http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultMPC. The absence of this attribute implicitly indicates the default MPC.

PackagingLocation

Optional. Attribute of the MessagePayloads element has the following valid values:

  • SoapBody
  • Attachement
  • None

Only one payload can be attached to the SOAPBody, and only one SOAPBody value is allowed if multiple payloads are associated with the MMD.

Related Links