MessageHeader
The MessageHeader element goes into the SOAP Header element and has the following child elements: From, To, CPAId, ConversationId, Service, Action, MessageData, QualityOfServiceInfo, SequenceNumber, Description. The MessageHeader element has a further two attributes: mustUnderstand and Version. This element plays an important role. The child elements of the MessageHeader will be described next.
The elements often have further child elements.
It is worth noting that some of the elements are introduced to realise the functionality of security, error handling, reliable messaging and might be confusing at the moment. It is also worth pointing out, that some elements are related to other elements, e.g. if one element is used another element must be used. A * indicates if the element is mandatory or not.
- From and To *
These two elements seem clear. They define the sender of the message and the receiver of the message. This element has the PartyId which can contain an internationally known identifier, like a DUNS number or a simple web site address.
- CPAId *
This element is also quite obvious. The element references the CPA of the two trading partners.
- ConversationId *
This element represents a unique ID for the current conversation between two trading partners. The initiating MSH creates this ID and from that moment this ID will be used in the proceeding messages.
- Service *
The Service element relates back to the Business Process Specification, where authorised roles within a business process are used. The service element names the activity of a party for this message. For example a service could be: ``SupplierOrderProcessing''.
- Action *
This element identifies a process within the Service. This could be a ``NewOrder'' or Acknowledgment of reliable messaging purpose.
- Messagedata
This element has further child elements: MessageId, Timestamp, RefToMessageId, TimeToLive.
- MessageId
It is obvious that each Message has its own identification for further referencing.
- Timestamp
It is also obviously the Timestamp when the message was created.
- RefToMessageId
If the message is an Acknowledge Message (used for reliable messaging) this element references a previous message by its ID.
- TimeToLive
This element is used for the functionality of reliable messaging and sets a time frame for the delivery of the message.
- QualityOfServiceInfo
This element deals with reliable messaging. The QualityOfServiceInfo element has three child elements: deliverySemantics, messageOrderSemantics and deliveryReceiptRequested. The deliverSemantics has an example value of OnceAndOnlyOnce which indicates the importance of this element. Chapter 3.7.4 has more details of how reliable messaging is achieved within ebXML.
- SequenceNumber (* when used with QualityOfServiceInfo)
This element ensures that the order of messages is recognised.
- Description
This is a simple human readable description of the message and is optional.
Here is a sample Header.
<eb:MessageHeader id=''...'' eb:version=''1.0'' SOAP-ENV:mustUnderstand=''1''>
<eb:From>
<eb:PartyId>uri:example.com</eb:PartyId>
</eb:From>
<eb:To eb:type=''someType''>QRS543</eb:To>
<eb:CPAid>http://www.ebxml.org/cpa/112345<eb:CPAid>
<eb:ConversationId>934523405</eb:ConversationId>
<eb:Service eb:type=''myservicetype''>QuoteToCollect</eb:Service>
<eb:Action>NewPurchaseOrder</eb:Action>
<eb:MessageData>
<eb:MessageId>mid:UUID-2</eb:MessageId>
<eb:Timestamp>2001-12-06ST12:39:05</eb:Timestamp>
<eb:RefToMessageId>mid:UUID-1</eb:RefToMessageId>
</eb:MessageData>
<eb:QualityOfServiceInfo
eb:deliverySemantics=''OnceAndOnlyOnce''
eb:deliveryReceptRequested=''Signed''/>
</eb:MessageHeader>
More elements in the SOAP Header: