ebXML message metadata documents (MMDs)
When exchanging messages with a file system located in the back end Activator supports ebXML business processes using message metadata documents (MMDs) as the interface between it and the back-end. The MMDs are XML documents that point to an ebXML document on a file system and contain information that Activator uses to process documents.
MMDs are used only with back-end file system exchanges, although the same type of metadata are transported when application transports such as JMS or web services API are used.
Related topics
MMD example
The following is an example of an MMD associated with an ebXML document. Activator generates MMDs for the ebXML documents that it sends to a back-end system. Your back-end system must generate the MMDs for the ebXML documents that Activator retrieves from the back end. The metadata elements of the MMD are defined in ebXML message metadata.
Example of ebXML MMD for outbound message
<MessageMetadataDocoment documentID="Test_B2" protocol="ebXML" protocolVersion="2.0"> <Metadata name="From" type="string">remery-ebxml</Metadata> <Metadata name="FromRole" type="http://www.starstandard.org/processes/3A4.xml#Initiator">interop</Metadata> <Metadata name="To" type="string">esx6-ebxml</Metadata> <Metadata name="ToRole" type="http://www.starstandard.org/processes/3A4.xml#Responder">interop</Metadata> <Metadata name="Service" type="string">FileTransfer</Metadata> <Metadata name="Action" type="string">B1</Metadata> <Metadata name="CPAID">remery-esx6</Metadata> <MessagePayloads> <Payload id="0784247"> <RemovePayloadAfterProcessing>true</RemovePayloadAfterProcessing> <MimeContentId>smallXmlPo</MimeContentId> <MimeContentType>application/xml</MimeContentType> <Location typle="filePath"> /Users/remery/Source/MiscHaboobStuff/ebXMlInterop4Q2004/CpasAndMmds/smallxmlPO_delete.xml</Location> </Payload> </MessagePayloads> </MessageMetadataDocument>
|
Using an MMD to ping a partner
Ping is an optional service that lets one message service handler determine whether another MSH is operating.
You can send a ping MMD to check network connectivity and the operational status of your and your partner’s systems. The receiver sends a pong response if all is well.
In Message Tracker a ping is reported as a payload and a pong as a receipt. You can confirm a ping or pong by viewing the message contents.
Example of ping MMD
The following is an example of a ping MMD. Replace the placeholder values in this example with your sender and receiver information. Copy the MMD to a community file system integration pickup directory.
<?xml version="1.0" encoding="UTF-8"?>
<MessageMetadataDocument documentId="PingMMD" protocol="ebXML" protocolVersion="2.0">
<Metadata name="From" type="string">PartnerA</Metadata>
<Metadata name="To" type="string">PartnerB</Metadata>
<Metadata name="Service">urn:oasis:names:tc:ebxml-msg:service</Metadata>
<Metadata name="Action" type="string">Ping</Metadata>
<Metadata name="CPAId">PartnerA-PartnerB-cpa-1</Metadata>
</MessageMetadataDocument>
|
Example of ping-pong messages
The following are examples of a ping message from one party and the pong response from the other party. These examples are packaged in SOAP envelopes.
Ping
The first example is the ping message sent by PartnerA.
Content-Type: text/xml
SOAPAction: "ebXML"
Content-Length: 1637
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-
open.org/committees/ebxml-msg/schema/envelope.xsd">
<soap:Header xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd" xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
<eb:MessageHeader eb:id="ID6572235551131040785875coronation" eb:version="2.0"
soap:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="string">PartnerA</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="string">PartnerB</eb:PartyId>
</eb:To>
<eb:CPAId>PartnerA-PartnerB-cpa-1</eb:CPAId>
<eb:ConversationId>ab102b17-4724-4ecb-8572-8dc050a0f1a7</eb:ConversationId>
<eb:Service>urn:oasis:names:tc:ebxml-msg:service</eb:Service>
<eb:Action>Ping</eb:Action>
<eb:MessageData>
<eb:MessageId>M1131040785868.792@
coronation7786261718245588383
</eb:MessageId>
<eb:Timestamp>2005-11-03T17:59:45.868Z</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
</soap:Header>
<soap:Body xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"/>
</soap:Envelope>
|
Pong
The second example is the pong reply from PartnerB.
POST http://PartnerA:4080/exchange/PartnerA HTTP/1.1
Content-Type: text/xml
SOAPAction: "ebXML"
User-Agent: haboob/5.3.3.0.6 build-1552
Host: coronation:4080
Connection: close
Content-Length: 1722
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://www.oasis-
open.org/committees/ebxml-msg/schema/envelope.xsd">
<soap:Header xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd" xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
<eb:MessageHeader eb:id="ID268087701131040580929gnaraloo" eb:version="2.0"
soap:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="string">PartnerB</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="string">PartnerA</eb:PartyId>
</eb:To>
<eb:CPAId>PartnerA-PartnerB-cpa-1</eb:CPAId>
<eb:ConversationId>ab102b17-4724-4ecb-8572-8dc050a0f1a7</eb:ConversationId>
<eb:Service>urn:oasis:names:tc:ebxml-msg:service</eb:Service>
<eb:Action>Pong</eb:Action>
<eb:MessageData>
<eb:MessageId>M1131040580919.411688@
gnaraloo8174619434348129230
</eb:MessageId>
<eb:Timestamp>2005-11-03T17:56:20.919Z</eb:Timestamp>
<eb:RefToMessageId>
M1131040785868.792@coronation7786261718245588383
</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
</soap:Header>
<soap:Body xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xsi:schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"/>
</soap:Envelope>
|
Use an MMD for a status request
You can use an MMD to ask a partner about the status of a previously sent message using the StatusRequest action. For instance, you could use this after reliable messaging retries in the CPA have been exhausted, but you want to check whether the partner received the payload.
The following figure is an example of a StatusRequest MMD. To use this MMD, you must provide an ebXML message ID as the value of the StatusRequest element near the top of the MMD. You also must provide your own values for From, To and CPAId.
A StatusRequest MMD follows. Note that the second line ("StatusRequest") contains the message ID.
<MessageMetadataDocument documentID="Test_G3" protocol="ebXML" protocolVersion="2.0"> <Metadata name="StatusRequest">M1109715442335.631@partnerA-osx5001680093774348165</Metadata> <Metadata name="From" type="string">partnerA-ebxml</Metadata> <Metadata name="FromRole" type="http://www.starstandard.org/processes/3A4.xml#Initiator">interop</Metadata> <Metadata name="To" type="string">partnerB-ebxml</Metadata> <Metadata name="ToRole" type="http://www.starstandard.org/processes/3A4.xml#Responder">interop</Metadata> <Metadata name="Service" type="string">urn:oasis:names:tc:ebxml-msg:service</Metadata> <Metadata name="Action" type="string">StatusRequest</Metadata> <Metadata name="CPAId" type="string">partnerAB-esx6</Metadata> </MessageMetadataDocument>
|
Schema location and description
Activator supports elements in MMDs of outbound messages for identifying locations of related schemas and describing payloads. The following MMD snippet shows an example of how the Schema and Description elements can be used as child elements of Payload:
<Payload id="01234">
<MimeContentId>XmlPo</MimeContentId>
<MimeContentType>application/xml</MimeContentType>
<Schema location="http://schema.com/po.xsd" version="1.0"/>
<Description language="en-GB">xmlpo</Description>
|
For inbound messages the Schema and Description values are copied from the message and included as message metadata. In addition, for an inbound message where an MMD is created, the MMD message in Message Tracker contains the description and schema metadata of the first unpackaged payload.
In an MMD for an outbound message the Payload element can contain multiple Description elements but only one Schema element. The Schema element has two attributes: location, which is a URL, and version. The Description element has a language attribute. The Description element text should contain the actual description.
Once an MMD with these elements has been parsed, Activator reports the metadata as follows. See ebXML metadata descriptions for more information.
- ebXML.Payload.SchemaLocation
- ebXML.Payload.SchemaVersion
- ebXML.Payload.Description
- ebXML.Payload.DescriptionLang
Related topics