<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "../docbook/docbookx.dtd">
<book id='Book1'>
  <bookinfo>
    <mediaobject>
      <imageobject>
        <imagedata align='center' contentdepth='2in' contentwidth='4in' fileref='http://www.starstandard.org/uploads/STARLogo.jpg' format='JPG' role='fo' scalefit='1'></imagedata>
      </imageobject>
    </mediaobject>

    <title>ebMS Implementation Guidelines</title>

    <subtitle>eb1.1.0 2011v1</subtitle>

    <volumenum>2011v1</volumenum>

    <copyright>
      <year>2011</year>

      <holder>Standards for Technology in Automotive Retail</holder>
    </copyright>

    <editor>
      <firstname>David</firstname>

      <surname>Carver</surname>

      <affiliation>
        <orgname>STAR</orgname>
      </affiliation>
    </editor>

    <othercredit>
      <firstname>Jason</firstname>

      <surname>Loeffler</surname>

      <affiliation>
        <orgname>Karmak</orgname>
      </affiliation>
    </othercredit>

    <othercredit>
      <firstname>Russell</firstname>

      <surname>Shephard</surname>

      <affiliation>
        <orgname>T-Systems</orgname>
      </affiliation>
    </othercredit>

    <othercredit>
      <firstname>David</firstname>

      <surname>Carver</surname>

      <affiliation>
        <orgname>STAR</orgname>
      </affiliation>
    </othercredit>
  </bookinfo>

  <preface xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/ebMS/Chapters/Preface.xml'>
  <title>Preface</title>

  <section>
    <title>Purpose</title>

    <para>The purpose of this document is to provide guidelines and best
    practices for implementing the ebXML protocol specifications when
    exchanging ebXML messages containing STAR XML BODs.</para>

    <para>This document is broken into sections for easier navigation. The
    following sections are:</para>

    <itemizedlist>
      <listitem>
        <para>Preface – Overview of the specifications and background</para>
      </listitem>

      <listitem>
        <para>Section 1 – Message Handling</para>
      </listitem>

      <listitem>
        <para>Section 2 – Infrastructure</para>
      </listitem>

      <listitem>
        <para>Appendices – Examples</para>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>Summary of Changes from EB3.0G001</title>

    <para>The only change from eb3.0g001 is the version number.</para>
  </section>

  <section>
    <title>Scope</title>

    <para>This document covers the implementation of the electronic business
    Messaging Service (ebMS) 2.0 and electronic business Collaboration
    Protocol Profile and Agreement (ebCPPA) 2.0 protocols for STAR message
    exchange.</para>
  </section>

  <section>
    <title>Audience</title>

    <para>This document is intended for application developers and application
    architects developing STAR ebXML interfaces.</para>
  </section>

  <section>
    <title>Background</title>

    <para>The ebXML specifications contain detailed definitions for the ebXML
    Message Service protocol, Collaboration Protocol Profile (CPP) and
    Collaboration Protocol Agreement (CPA). The specifications do not,
    however, define details for implementing these components.  Specifically,
    they do not explicitly define the formats or acceptable values for many of
    the elements contained in the ebMS message, CPP, or CPA.  Elements such as
    Party Id, Service and Action, and the CPA Id are defined; however the
    proper formats and values for these elements are left up to the
    implementer.</para>

    <para>This document will define the STAR guidelines and best practices for
    implementing the ebXML messaging service and the CPP/CPA. Required and
    recommended formats and acceptable values will be defined for key ebXML
    elements.  These implementation guidelines will ensure consistent usage of
    the ebXML specifications for all STAR members and help to ensure
    interoperability.</para>
  </section>

  <section>
    <title>References</title>

    <para>ebXML is an initiative of OASIS (Organization for the Advancement of
    Structured Information Standards). The OASIS web site, as well as the
    specifications referenced in this document can be found using the
    following URLs.</para>

    <informaltable>
      <tgroup cols='2'>
        <tbody>
          <row>
            <entry>OASIS Web Site:</entry>

            <entry><ulink url='http://www.oasis.org/'>http://www.oasis.org</ulink></entry>
          </row>

          <row>
            <entry>ebMS 2.0 Messaging Service:</entry>

            <entry><ulink url='http://www.ebxml.org/specs/ebMS2.pdf'>http://www.ebxml.org/specs/ebMS2.pdf</ulink></entry>
          </row>

          <row>
            <entry>CPP and CPA Specification v2.0</entry>

            <entry><ulink url='http://www.ebxml.org/specs/ebcpp-2.0.pdf'>http://www.ebxml.org/specs/ebcpp-2.0.pdf</ulink></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </section>
</preface>
  <chapter xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/ebMS/Chapters/ebMSMessaging.xml'>
  <title>ebMS Messaging</title>

  <section>
    <title>ebMS Messaging</title>
    <para></para>

    <section>
      <title>ebMS Message Packaging</title>

      <para>An ebMS Message is a MIME/Multipart message envelope referred to
      as a Message Package. The Message Package is structured in compliance
      with [SOAP] version 1.1 and SOAP Messages with Attachments [SwA]
      specifications.</para>

      <para>There are two or more logical MIME parts within a Message
      Package:</para>

      <orderedlist inheritnum='ignore' continuation='restarts'>
        <listitem>
          <para>The Header Container contains one SOAP version 1.1 compliant
          message that holds the ebMS Header elements. The large majority of
          ebMS Headers are placed in the SOAP Header, if any Manifest or SOAP
          Fault elements occur they are placed in the SOAP Body.</para>
        </listitem>

        <listitem>
          <para>Payload Containers, which contain application level payloads.
          For the STAR XML Infrastructure project, these will consist mostly
          of STAR BODs.</para>
        </listitem>
      </orderedlist>
    </section>

    <section>
      <title>Message Packaging</title>

      <figure float='0'>
        <title>ebMS Message Package</title>

        <mediaobject>
          <imageobject>
            <imagedata contentdepth='6in' fileref='Images/MessageStructure.jpg' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <para>Highlights of this packaging format:</para>

      <itemizedlist>
        <listitem>
          <para>Based on a widely accepted industry de-facto standard SOAP
          v1.1</para>
        </listitem>

        <listitem>
          <para>Transport Metadata such as To/From Parties and MessageIDs can
          be placed in the SOAP Header</para>
        </listitem>

        <listitem>
          <para>Messages can be simple SOAP messages or more complex messages
          with multiple payloads</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Payload Containers</title>

      <para>ebMS version 2.0 and the STAR Transport require that if any
      payloads are present they MUST be contained in a Payload Container and
      MUST be referenced by a Header Manifest element entry. Payloads may be
      composed of any type of data including and not limited to word processor
      files, graphics, sound, EDI, XML or any data that can be digitized. In
      the context of the STAR XML Infrastructure project, the payloads will
      primarily be STAR BODs.</para>
    </section>

    <section>
      <title>STAR ebMS Guidelines Message Elements</title>

      <para>The ebMS Element Summary table (shown below) identifies the
      critical ebMS message elements for STAR ebMS Guideline. These elements
      were identified for the original STAR Message Infrastructure Guidelines
      and have been updated to account for changes between ebMS version 1.0
      and ebMS version 2.0.</para>


      <informaltable frame='all'>
        <tgroup cols='2'>
          <tbody>
            <row>
              <entry nameend='c5' namest='c1'><para>Element / Attribute
              Name</para> <para><emphasis role='bold'>Required</emphasis>    
              <emphasis>Required if  Present</emphasis>     (Optional)  
               [attribute]     default</para></entry>

              <entry><para>Infrastructure</para>
              <para>Sample/Recommendation</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Content-Type</para></entry>

              <entry><para>text/xml</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>    Charset</para></entry>

              <entry><para>UTF-8</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>?xml</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>   
              [<emphasis>version=”1.0”</emphasis>]     </para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>   
              ([encoding])</para></entry>

              <entry><para>UTF-8</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>SOAP-ENV:Header</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis role='bold'>MessageHeader</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>[SOAP:mustUnderstand=”1”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para>([id])</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>From</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c4'><para><emphasis role='bold'>PartyID</emphasis></para></entry>

              <entry><para>Logical identifier</para></entry>
            </row>

            <row>
              <entry><para>[type]</para></entry>

              <entry><para>DUNS, string</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para>(Role)</para></entry>

              <entry><para>Agreed to by both parties, if CPA is used, value
              must match CPA</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>To</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c4'><para><emphasis role='bold'>PartyID</emphasis></para></entry>

              <entry><para>Logical identifier</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c4'><para>[type]</para></entry>

              <entry><para>DUNS, string</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para> Role</para></entry>

              <entry><para>Agreed to by both parties, if CPA is used, value
              must match CPA</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>CPAId</emphasis></para></entry>

              <entry><para>If no CPA exists,</para> <para>   
              FromPartyId-ToPartyId-cpa[-x.x]</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>ConversationId</emphasis></para></entry>

              <entry><para>Timestamp + unique host identifier</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>Service [type]</emphasis></para></entry>

              <entry><para>For BOD Payloads:   STARBOD</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>Service </emphasis></para></entry>

              <entry><para>For BOD Payloads:   </para> <para>  STAR BOD
              Noun</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>Action</emphasis></para></entry>

              <entry><para>For BOD Payloads:</para> <para>   STAR BOD
              Verb</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis role='bold'>MessageData</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para><emphasis role='bold'>MessageId</emphasis></para></entry>

              <entry><para>Service Name concatenated with a period (.)
              followed by the GUID, followed by an at sign (@) followed by the
              company name in domain name format. Must conform to
              [RFC2392]</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para><emphasis role='bold'>Timestamp</emphasis></para></entry>

              <entry><para>UTC with no offsets. Represents the time the
              message was created.</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para>RefToMessageID (Required
              for Error or Acknowledgement or Pong)</para></entry>

              <entry><para>MessageId from earlier message</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c3'><para>TimeToLive</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>MessageOrder</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>AckRequested
              </para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>[SOAP:mustUnderstand=”1”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para>[signed]</para></entry>

              <entry><para>false or true</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para>[SOAP:actor=”urn:oasis:names:tc:ebxml-
              msg:actor:ToPartytMSH”]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Acknowledgement</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>[SOAP:mustUnderstand=”1”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para>[SOAP:actor=”urn:oasis:names:tc:ebxml-
              msg:actor:nextMSH”]</para></entry>

              <entry><para>If present, must match this value</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para>[id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>Timestamp</emphasis></para></entry>

              <entry><para>UTC with no offsets, represents the time the
              Acknowledgment was created</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c2'><para><emphasis>RefToMessageID</emphasis></para></entry>

              <entry><para>MessageID of message being
              acknowledged</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>ErrorList
              Element</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis role='bold'>[SOAP:mustUnderstand=”1”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis role='bold'>[highestSeverity=(Error  I
              Warning)]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis role='bold'>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Error</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[codeContext=”URI”</para>
              <para> (default=” <ulink url='http://www.ebxml.org/messageServiceErrors'>http://www.ebxml.org/messageServiceErrors</ulink>
              ”) </para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>errorCode=(ValueNotRecognized  I NotSupported
               I Inconsistent  I OtherXml  I </para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>      DeliveryFailure  I
              TimeToLiveExpired  I SecurityFailure  I MimeProblem I  </para>
              <para>     Unknown )</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>severity=(Warning I
              Error)</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>location (Xpointer I
              CID)</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>xml:lang=”en-US”</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>ds:Signature</para></entry>

              <entry><para>Must confirm to the [XMLDSIG]
              specification.</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis role='bold'>SOAP-ENV:Body</emphasis></para></entry>

              <entry><para>Every direct child of SOAP-ENV:Body has an
              automatic attribute of SOAP-ENV:mustUnderstand=”1”. (see SOAP
              1.1 sect 4.3.1)</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Manifest</para></entry>

              <entry><para>Required if one or more payloads (i.e. ebXML
              wrapped BOD) are present</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Reference</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[xlink:href]</emphasis></para></entry>

              <entry><para>URI of the payload object
              referenced.</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[xlink:type=”simple”]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Schema</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[location]</emphasis></para></entry>

              <entry><para>/STAR/Rev1.2/BODs/Standalone/ProcessPartsOrder.xsd</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[version]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>Description</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>xml:lang=”en-US”</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>StatusRequest</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[id]</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>RefToMessageId</emphasis></para></entry>

              <entry><para>MessageId from earlier message</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>StatusResponse</para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[version=”2.0”]</emphasis></para></entry>

              <entry></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>RefToMessageId</emphasis></para></entry>

              <entry><para>MessageId of the original message  being reported
              on</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>TimeStamp</para></entry>

              <entry><para>The Timestamp of the original message being
              reported on</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para><emphasis>[messageStatus=
              (UnAuthorized | NotRecognized | Received | Processed |
              Forwarded]</emphasis></para></entry>

              <entry><para>MessageId of the original message  being reported
              on</para></entry>
            </row>

            <row>
              <entry nameend='c5' namest='c1'><para>[id]</para></entry>

              <entry></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>

    <section>
      <title>ebMS MessageHeader Elements</title>

      <section>
        <title>From/To PartyId Elements</title>

        <para>Within the ebMS MessageHeader, the REQUIRED From and To elements
        include a PartyId element which identifies the sending or receiving
        party for the message. The PartyId element value is defined by the
        PartyId type attribute. Commonly used types are the Uniform Resource
        Identifier (URI) and the Uniform Resource Name (URN), however a
        generic string type is also allowed providing that it is understood by
        both parties. STAR recommends the use of the following PartyId
        types:</para>

        <itemizedlist>
          <listitem>
            <para>For OEMs and large institutions: The urn:duns type if a DUNS
            number is available</para>
          </listitem>

          <listitem>
            <para>For Automotive Dealers: A string type containing the short
            manufacturer code followed by the dealer number</para>
          </listitem>

          <listitem>
            <para>For Non-Automotive Dealers:  A string type containing unique
            identification information.</para>
          </listitem>
        </itemizedlist>

        <para>Examples:</para>

        <informaltable frame='all'>
          <tgroup cols='1'>
            <tbody>
              <row>
                <entry><para>Example of a Volkswagen OEM:</para>
                <para>&lt;eb:PartyId
                type=”urn:duns”&gt;006972475&lt;/eb:PartyId&gt;</para></entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>

        <para> </para>

        <informaltable frame='all'>
          <tgroup cols='1'>
            <tbody>
              <row>
                <entry><para>Example of a Volkswagen Automotive Dealer:</para>
                <para>&lt;eb:PartyId
                type=”string”&gt;VW400110&lt;/eb:PartyId&gt;</para></entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </section>

      <section>
        <title>CPAId Element</title>

        <para>The CPAId element is a REQUIRED ebXML element. It is a string
        that identifies the parameters governing the exchange of messages
        between the parties. The recipient of a message MUST be able to
        resolve the CPAId to an individual set of parameters, taking into
        account the sender of the message. This does NOT mean that a formal
        CPA conforming to the ebXML CPA specification must be in place for
        ebXML messaging to be used. If no formal CPA exists, the CPAId is
        simply the location of party specific information such as IP addresses
        and dealer Ids. This is a temporary format until party id formats can
        be established in a future versions of this publication.</para>

        <para>For STAR, the CPAId element shall have the following
        format:</para>

        <para>        <emphasis role='bold'>&lt;CPAId&gt;fromPartyId-ToPartyId-cpa&lt;/CPAId&gt;</emphasis></para>

        <para>The CPAId may also optionally contain a version number:</para>

        <para>        <emphasis role='bold'>&lt;CPAId&gt;fromPartyId-ToPartyId-cpa-x.x&lt;/CPAId&gt;</emphasis></para>

        <para>Examples:</para>

        <informaltable frame='all'>
          <tgroup cols='1'>
            <tbody>
              <row>
                <entry><para>&lt;eb:CPAId&gt;VW400110-006942475-cpa&lt;/eb:CPAId&gt;</para>
                <para>&lt;eb:CPAId&gt;VW400110-006942475-cpa-1.0&lt;/eb:CPAId&gt;</para></entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </section>

      <section>
        <title>ConversationId Element</title>

        <para>The REQUIRED ConversationId element is a string identifying the
        set of related messages that make up a conversation between two
        Parties. It MUST be unique within the From and To party pair. The
        Party initiating a conversation determines the value of the
        ConversationId element that SHALL be reflected in all messages
        pertaining to that conversation. The value for ConversationId in the
        STAR XML Infrastructure environment SHOULD be datestamp + timestamp +
        a unique host identifier; UTC format is used for datestamp. For
        example, if two salespeople at the same dealership submit an inquiry
        at the same time (obviously from separate terminals), then the
        algorithm to generate the ConversationId should be such that this
        situation would generate two separate ConversationIds.</para>

        <para>The ConversationId enables the recipient of a message to
        identify the instance of an application or process that generated or
        handled earlier messages within a conversation. It remains constant
        for all messages within a conversation.</para>
      </section>

      <section>
        <title>Service and Action Elements</title>

        <para>The REQUIRED Service and Action elements identify the service
        that acts on the message.</para>

        <para>For STAR XML Infrastructure, the value of the type attribute of
        the Service element for messages that contain a STAR BOD payload MUST
        be “STARBOD” and the value of the Service element MUST be the STAR BOD
        Noun. The value of the Action element MUST be the STAR BOD
        Verb.</para>

        <para>Exceptions to this include ebMS standalone error messages and
        asynchronous acknowledgments, whose Service Action values are defined
        by ebMS version 2.0.</para>

        <para>An example of the Service and Action elements for an STAR BOD
        payload follows:</para>

        <informaltable frame='all'>
          <tgroup cols='1'>
            <tbody>
              <row>
                <entry><para>&lt;eb:Service
                eb:type=”STARBOD”&gt;PartsOrder&lt;/eb:Service&gt;</para>
                <para>&lt;eb:Action&gt;Process&lt;/eb:Action&gt;</para></entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </section>

      <section>
        <title>MessageData Element</title>

        <para>The REQUIRED MessageData element provides a means of uniquely
        identifying an ebMS message.</para>

        <para>MessageId element</para>

        <para>Message IDs MUST be Globally unique and conformant to ebMS
        specifications which require that the value is conformant to
        RFC2392.</para>

        <para>STAR requires three (3) data elements within the Message
        ID:</para>

        <orderedlist inheritnum='ignore' continuation='restarts'>
          <listitem>
            <para>Company Name, in domain name format, for example
            starstandards.org</para>
          </listitem>

          <listitem>
            <para>Service Identifier, the name of the service being
            invoked</para>
          </listitem>

          <listitem>
            <para>A Globally Unique Identifier (GUID), as specified in RFC2822
            section 3.6.4</para>
          </listitem>
        </orderedlist>

        <para>The Service Name should be concatenated with a period (.)
        followed by the GUID, followed by an at sign (@) followed by the
        company name in domain name format.</para>

        <para>Example:</para>

        <informaltable frame='all'>
          <tgroup cols='1'>
            <tbody>
              <row>
                <entry><para>&lt;eb:MessageId&gt;PartsOrder.323210:e5c74:7ffc@starstandards.org&lt;/eb:MessageId&gt;
                </para></entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>

        <para>Timestamp element</para>

        <para>The REQUIRED Timestamp is a value representing the creation time
        of the message header and MUST be in UTC format (Universal Time Code
        as defined by ISO 8601).</para>
      </section>

      <section>
        <title>Digital Signature</title>

        <para>A STAR ebMS Message can be digitally signed to provide security
        countermeasures. Application of Digital Signature is a Recommendation,
        in other words, conformant implementations should be capable of
        processing messages with Digital Signature, but individual
        implementations may choose not to use Digital Signature
        features.</para>
      </section>

      <section>
        <title>Manifest Element</title>

        <para>The Manifest is a composite element that summarizes message
        payloads. A Manifest element MUST be present if one or more Payloads
        exist, and all Payloads MUST be referenced in the Manifest. The
        purpose of the Manifest is:</para>

        <itemizedlist>
          <listitem>
            <para>To make it easier to directly extract a particular
            payload</para>
          </listitem>

          <listitem>
            <para>To allow an application to determine whether it can process
            a payload without having to parse it</para>
          </listitem>
        </itemizedlist>

        <para> </para>

        <para>The structure and content of the Manifest element MUST conform
        to the ebMS version 2.0 specifications.</para>
      </section>

      <section>
        <title>Acknowledgment Element</title>

        <para>The Acknowledgment element is used by the To Party that received
        a message, to let the From Party that sent the message know the
        message was received. The <emphasis>RefToMessageId</emphasis> in a
        message containing an Acknowledgment element identifies the message
        for which the receipt is being generated. The <emphasis role=''>RefToMessageId</emphasis> is the MessageId of the original
        message.</para>
      </section>
    </section>
  </section>
</chapter>
  <chapter xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/ebMS/Chapters/ImplementingCPA.xml'>
  <title>Implementing the CPA</title>

  <sect1>
    <title>Implementing the CPA</title>

    <sect2>
      <title>Overview</title>

      <para>This section describes the implementation of the CPA for STAR
      trading partners. This section is not intended to be a complete
      description of the CPA and its usage. For a detailed description of the
      CPA, please refer to the specifications document referenced in the
      preface of this document.</para>

      <para>The STAR CPA has been designed for maximum flexibility. The
      Collaboration Roles have been designed to allow each party to define its
      own transport, security, and reliable messaging characteristics for each
      transaction type.. Channel, Document Exchange, and Transport definitions
      have also been pre-defined for every combination of transport type and
      message delivery option. The CPA parties need only to refer to the
      appropriate channel ID and DocExchange ID combination in the
      DeliveryChannel definition for each collaboration.</para>

      <para>There are a number of benefits to having such a flexible
      design.</para>

      <orderedlist inheritnum='ignore' continuation='restarts'>
        <listitem>
          <para>BODs or other transactions can be added or removed
          individually, allowing the CPA to reflect only those transactions
          that are actually supported by both parties</para>
        </listitem>

        <listitem>
          <para>Those transactions that require more security or reliable
          messaging properties can have those properties defined without
          impacting the other transactions within the CPA</para>
        </listitem>

        <listitem>
          <para>Transport definitions can be created for each transaction
          type. This will allow each BOD to be routed to a different URL, if
          necessary. This may be needed in large dealer franchises where the
          Service, Parts, and Accounting applications are running on separate
          physical machines or on separate application instances.</para>
        </listitem>
      </orderedlist>
    </sect2>

    <sect2>
      <title>STAR CPA Structure</title>

      <para><xref linkend='fig_STARCPAStructure'></xref> below is a high-level
      depiction of the STAR CPA. It displays the primary CPA elements. Each
      primary element may have one or more child elements. The STAR
      implementation of these elements will be described below. A complete
      sample CPA can be found in Appendix A: Example CPA.</para>

      <para></para>

      <figure id='fig_STARCPAStructure' float='0'>
        <title>STAR CPA Structure</title>

        <mediaobject>
          <imageobject>
            <imagedata contentdepth='' contentwidth='4.75in' depth='' fileref='Images/STARCPAStructure.jpg' revisionflag='off' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <para></para>
    </sect2>

    <sect2>
      <title>PartyInfo Section</title>

      <para>The PartyInfo element is the heart of the CPA. It defines the
      identification and security information for each party, the
      collaborations (BODs) supported by each party and all of the transaction
      characteristics for each collaboration. STAR has defined implementation
      guidelines for several of the child elements within the PartyInfo
      section.</para>

      <sect3>
        <title>CPA ID</title>

        <para>See section 1.6.2 for the naming conventions for the CPA ID
        element.</para>
      </sect3>

      <sect3>
        <title>Party ID</title>

        <para>The naming conventions for the PartyId element are still under
        development by STAR.</para>
      </sect3>

      <sect3>
        <title>Collaboration Roles</title>

        <para>The CollaborationRole elements are the heart of the CPA. They
        are used to define the trading characteristics for each transaction.  
        In the sample CPA shown in Appendix A, each Collaboration Role element
        is associated with a STAR BOD using the ProcessSpecification element.
        The structure of the CollaborationRole element is shown in <xref linkend='fig_CollaborationRoleStructure'></xref>.</para>

        <figure id='fig_CollaborationRoleStructure' float='0'>
          <title>Collaboration Role Structure</title>

          <mediaobject>
            <imageobject>
              <imagedata contentwidth='4.75in' fileref='Images/CollaborationRole.jpg' scalefit='1'></imagedata>
            </imageobject>
          </mediaobject>
        </figure>
      </sect3>

      <sect3>
        <title>Process Specification</title>

        <para>The ProcessSpecification element defines the BOD type. The value
        of the name attribute should match the name attribute in the BPSS
        document for that BOD.</para>

        <para>&lt;tns:ProcessSpecification tns:name="PartsOrder"
        tns:uuid="urn:icann:star.org:bpid:3A4$2.0" tns:version="2.0"
        xlink:href="http://www.vwoa.com/po_processing/"
        xlink:type="simple"/&gt;</para>
      </sect3>

      <sect3>
        <title>Role</title>

        <para>The role names are defined using the Role element. Again, the
        Role names should match those in the BPSS document for the BOD.
        Currently STAR has defined the role names “Initiator” and “Responder”
        for all BOD types.</para>

        <para>&lt;&lt;tns:Role tns:name="Initiator"
        xlink:href="http://www.starstandard.org/processes/3A4.xml#Initiator"
        xlink:type="simple"/&gt;</para>

        <para>The CPA was designed with two CollaborationRole elements per BOD
        to allow different messaging and transport parameters to be defined
        depending on whether the party is acting as the Initiator or the
        Responder for a transaction.</para>
      </sect3>

      <sect3>
        <title>Service Binding</title>

        <para>The ServiceBinding element defines the Service and Action
        elements that appear in the ebMS message header</para>
      </sect3>

      <sect3>
        <title>Service Element</title>

        <para>The Service Element is defined using the BOD Noun value. For
        example, the ServiceElement for a PartsOrder collaboration role would
        be “PartsOrder”.</para>

        <para>&lt;tns:ServiceBinding&gt;</para>

        <para>        &lt;tns:Service
        tns:type="string"&gt;PartsOrder&lt;/tns:Service&gt;</para>
      </sect3>

      <sect3>
        <title>CanSend and CanReceive Elements</title>

        <para>The CanSend and CanReceive elements define the ebXML actions
        associated with each collaboration. The ebXML action element
        corresponds to the STAR BOD verb that will be supported by each party.
        The ThisPartyActionBinding element within the CanSend or CanReceive
        element is used to indicate the supported action. The
        OtherPartyActionBinding element is a reference to the ID of the other
        party’s corresponding CanReceive element.</para>

        <para>For example, if Party A is an OEM acting as the “Responder” and
        we are defining the collaboration for the PartsOrder BOD, the OEM
        would be capable of sending an “Acknowledge” verb and receiving a
        “Process” verb. The CanSend element would contain “Acknowledge” in the
        ThisPartyActionBinding element and the ID of Party 2’s corresponding
        CanReceive element in the OtherPartyActionBinding element. The
        CanReceive element would contain “Process” in the
        ThisPartyActionBinding element and the ID of Party 2’s corresponding
        CanSend element.</para>

        <para>CanSend element for Responder collaboration role</para>

        <para>&lt;tns:CanSend&gt;</para>

        <para>        &lt;tns:ThisPartyActionBinding tns:action="Acknowledge"
        tns:id="SendPOAck" tns:packageId="DefaultComposite"&gt;</para>

        <para></para>

        <para></para>

        <para></para>

        <para>       
        &lt;tns:OtherPartyActionBinding&gt;Party2_ReceiveAckPO&lt;/tns:OtherPartyActionBinding&gt;</para>

        <para>CanReceive element for Responder collaboration role</para>

        <para>&lt;tns:CanReceive&gt;</para>

        <para>        &lt;tns:ThisPartyActionBinding tns:action="Process"
        tns:id="ReceivePO" tns:packageId="DefaultPackage"&gt;</para>

        <para></para>

        <para></para>

        <para></para>

        <para>       
        &lt;tns:OtherPartyActionBinding&gt;Dealer_SendPO&lt;/tns:OtherPartyActionBinding&gt;</para>
      </sect3>

      <sect3>
        <title>Business Transaction Characteristics</title>

        <para>The attributes contained in the
        BusinessTransactionCharacteristics element will be negotiated and
        defined by each party according to their individual
        requirements.</para>
      </sect3>

      <sect3>
        <title>Channel ID</title>

        <para>The ChannelId element contains the identifier for the delivery
        channel that will be used to send or receive the BOD defined for a
        particular collaboration. The STAR CPA contains 14 delivery channel
        definitions. Each definition defines a different set of transport and
        message delivery parameters. Each party will determine the appropriate
        delivery channel types for each of the BODs that they support and
        assign the required delivery channel using the ChannelId
        element.</para>
      </sect3>

      <sect3>
        <title>Certificate Info</title>

        <para>The certificate section of the STAR CPA is defined using the
        standard constructs as defined in the ebCPPA 2.0 specifications
        document.</para>
      </sect3>

      <sect3>
        <title>Delivery Channel Definitions</title>

        <para>As stated above, the STAR CPA contains 14 pre-defined channel
        types that can be used to define the delivery parameters for any
        collaboration activity by inserting the appropriate ID into the
        ChannelID element.</para>
      </sect3>

      <sect3>
        <title>Document Exchange Definitions</title>

        <para>The STAR CPA contains 3 pre-defined DocExchange elements, each
        of which defines a different set of encryption and non-repudiation
        settings. A DocExchange ID is associated with Delivery Channel type
        definition.</para>
      </sect3>

      <sect3>
        <title>Transport Definitions</title>

        <para>The STAR CPA contains a single transport definition for a
        standard HTTP connection. Additional transport definitions may defined
        to support SSL or SMTP transports as needed.</para>
      </sect3>
    </sect2>
  </sect1>
</chapter>
  <chapter xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/ebMS/Chapters/ReliableMessaging.xml'>
  <title>Implementing ebMS Reliable Messaging</title>

  <sect1>
    <title>Implementing ebMS Reliable Messaging</title>

    <sect2>
      <title> ebMS Delivery Assurance Profiles</title>

      <para>This section describes how to implement the Delivery Assurance
      profiles with ebMS version 2.0 and CPPA version 2.0.</para>

      <sect3>
        <title>Best-Effort</title>

        <para>To enable Best-Effort an ebMS message is sent without using any
        of the ebMS reliable messaging features, in other words, for the
        sender:</para>

        <itemizedlist>
          <listitem>
            <para>NO Acknowledgment is requested (AckRequested element is not
            present)</para>
          </listitem>

          <listitem>
            <para>NO Duplicate Elimination is requested (DuplicateElimination
            element is not present)</para>
          </listitem>

          <listitem>
            <para>NO TimeToLive is specified (TimeToLive element is not
            present)</para>
          </listitem>

          <listitem>
            <para>Failed messages are not retried</para>
          </listitem>
        </itemizedlist>
      </sect3>

      <sect3>
        <title>At-Least-Once (Message Acknowledgement)</title>

        <para>To enable At-Least-Once an ebMS message sender:</para>

        <itemizedlist>
          <listitem>
            <para>MUST request an Acknowledgment (AckRequested element is
            present)</para>
          </listitem>

          <listitem>
            <para>NO Duplicate Elimination requiested (DuplicateElimination
            element is not present)</para>
          </listitem>

          <listitem>
            <para>SHOULD specify TimeToLive  (TimeToLive element is
            present)</para>
          </listitem>

          <listitem>
            <para>MUST retry failed messages</para>
          </listitem>
        </itemizedlist>
      </sect3>

      <sect3>
        <title>At-Most-Once (NOT recommended by STAR for simplicity)</title>

        <para>To enable At-Most-Once an ebMS message sender:</para>

        <itemizedlist>
          <listitem>
            <para>MUST not request an Acknowledgment (AckRequested element is
            not present)</para>
          </listitem>

          <listitem>
            <para>MUST request Duplicate Elimination (DuplicateElimination
            element is present)</para>
          </listitem>

          <listitem>
            <para>SHOULD specify TimeToLive  (TimeToLive element is
            present)</para>
          </listitem>

          <listitem>
            <para>MAY retry failed messages</para>
          </listitem>

          <listitem>
            <para>Parties MUST agree out-of-band to a value for
            RetryInterval</para>
          </listitem>

          <listitem>
            <para>Parties MUST agree out-of-band to a value for
            NumberOfRetries</para>
          </listitem>
        </itemizedlist>
      </sect3>

      <sect3>
        <title>Once-And-Only-Once / Exactly-Once (Guaranteed Delivery)</title>

        <para>Implementers MUST provide and use the following features:</para>

        <itemizedlist>
          <listitem>
            <para>MUST include an AckRequested element</para>
          </listitem>

          <listitem>
            <para>MUST include a DuplicateElimination element  </para>
          </listitem>

          <listitem>
            <para>MUST include a TimeToLive element and the value of
            TimeToLive must conform to TimeToLive &gt; Timestamp +
            ((NumberOfRetries + 1) * RetryInterval)</para>
          </listitem>

          <listitem>
            <para>Parties MUST agree out-of-band to a value for
            RetryInterval</para>
          </listitem>

          <listitem>
            <para>Parties MUST agree out-of-band to a value for
            NumberOfRetries</para>
          </listitem>
        </itemizedlist>
      </sect3>
    </sect2>

    <sect2>
      <title> ebMS Delivery Assurance Features</title>

      <sect3>
        <title>Message Routing</title>

        <para>Message Routing in ebMS can be accomplished through a
        combination of the underlying Transfer protocol, data elements in the
        messages themselves and out-of-band agreements as determined by ebXML
        CPPA.</para>

        <para>Routing at the Transfer level is defined by HTTP URLs. At the
        message level, parties can key off the ToParty, FromParty, Service,
        Action and CPAID elements. At the CPPA level, “return addresses” can
        be defined. Parties may use a combination of these attributes to route
        messages in a way that makes sense for differing business scenarios or
        system architectures.</para>
      </sect3>

      <sect3>
        <title>Acknowledgment of Receipt</title>

        <para>Receipt of an acknowledgment indicates that the original message
        reached its destination. In other words, an Acknowledgment signifies
        only that a message has been received securely and intact, it is not a
        business level Acknowledgment.</para>

        <para>ebMS clearly defines the format and content of Acknowledgment
        messages.</para>

        <para>Although ebMS Acknowledgment messages are typically stand-alone
        messages, this is not required; an Acknowledgment to a message could
        be returned as part of a synchronous reply, as a stand-alone
        asynchronous message or as a part of a separate business message
        exchange.</para>

        <para>An ebMS Acknowledgment contains a RefToMessageID, which is the
        exact MessageID of the original message, i.e. the message that is
        being acknowledged. This allows the sender of the original message to
        cross-reference the original message and confirm delivery.</para>

        <para>As an option an ebMS Acknowledgment can be signed, which allows
        the sender to validate that the specific intended party received the
        message. Optionally, a signed message can contain a digest of the
        original message, allowing for full Non-repudiation of receipt. In
        other words, the sender knows who received the message and the sender
        can prove that the message was received exactly as sent.</para>
      </sect3>
    </sect2>

    <sect2>
      <title> ebMS Message Integrity</title>

      <sect3>
        <title>Content Integrity</title>

        <para>Content Integrity is provided in ebMS through the use of XML
        Digital Signature. An original message can be signed, allowing the
        receiver to validate that the contents of the message have not been
        altered. In addition, as mentioned above, ebMS Acknowledgements may be
        signed and may include a digest of the original message, allowing for
        Non-repudiation of receipt, in other words the sender can prove that
        the message was received by the intended receiver exactly as
        sent.</para>
      </sect3>

      <sect3>
        <title>TimeToLive</title>

        <para>The ebMS TimeToLive element is a UTC (Universal Time Code).
        TimeToLive is a required message element for Once-And-Only-Once /
        Exactly-Once message delivery. If a receiver determines that the
        TimeToLive has expired, it must return an error and not process the
        message.</para>
      </sect3>

      <sect3>
        <title>Message Sequencing</title>

        <para>ebMS supports the ability to order multiple messages,
        guaranteeing that the messages are processed in order.</para>

        <para>Message Ordering is set using the SequenceNumber element which
        is a positive integer that must be unique within a ConversationID.
        ConversationIDs must be unique within a CPA (Collaborative Partner
        Agreement) ID. Effectively, two parties establish one or more contexts
        for messaging in a Partner Agreement, which may also include such
        Policies as Delivery Assurance levels and security parameters. Within
        this Policy context, unique Conversations are established and
        sequences of messages (message 1, message 2, message 3,) can be
        sent.</para>

        <para>A receiver MUST not process a message until all messages in the
        Conversation with lower sequence numbers have been received and
        processed.</para>

        <para>If a message is received out of sequence, the receiver MUST
        format and send an error message notifying the sender.</para>
      </sect3>

      <sect3>
        <title>ebMS Standardized Error Handling and Monitoring</title>

        <para>ebMS defines error handling at the SOAP level (SOAP Faults) and
        at the ebMS level with an error listing mechanism that provides for
        both errors and warnings.</para>

        <para>In the context of STAR Reliable Messaging, ebMS provides support
        for Retry, Recovery, TimeOut and Duplicate Detection.</para>
      </sect3>

      <sect3>
        <title>Retry</title>

        <para>ebMS supports retransmission of unacknowledged messages. As
        described above, At-Least-Once and Once-And-Only-Once / Exactly-Once
        require the ability to resend messages. ebMS requires sending
        implementations to store outbound messages and resend them if an
        Acknowledgement is not received within an agreed upon TimeOut period.
        The resent message is intended to be exactly the same as the original
        message and at the very least it must have the exact same
        ConversationID and MessageID.</para>
      </sect3>

      <sect3>
        <title>Recovery Processes / Message Store</title>

        <para>To support Retry and Duplicate Elimination, ebMS requires
        senders to store outbound messages and requires receivers to store
        inbound messages in a persistent store. Receivers must maintain
        inbound messages for a period of time agreed upon in a CPA Policy
        element known as PersistDuration. ebMS recommends that the persistent
        stores be durable (maintain information through a system failure) and
        resilient enough to survive the failure of any single software or
        hardware component. In the case of system failure, messages must be
        processed as if the system failure had not occurred.</para>
      </sect3>

      <sect3>
        <title>TimeOut</title>

        <para>ebMS supports TimeOut through an out-of-band agreement based on
        CPPA. Parties use CPPA to agree on values for Retries
        (NumberOfRetries) and RetryInterval. Implementations are expected to
        follow the policy agreements; if a message is sent and not acknowledge
        within the RetryInterval the sender will retry the message Retries
        number of times.</para>
      </sect3>

      <sect3>
        <title>Duplicate Detection</title>

        <para>ebMS Supports Duplicate Detection through a combination of
        policy agreements and data elements in individual messages.</para>

        <para>Parties agree via CPPA whether or not to use
        DuplicateElimination. To support duplicate elimination receivers are
        required to durably store MessageIDs. Individual messages that require
        DuplicateElimination must contain the DuplicateElimination
        element.</para>

        <para>If a receiver determines a message is a duplicate, it must not
        forward the message for processing and it must return to the sender a
        copy of the original acknowledgment that was sent concerning the
        original message.</para>
      </sect3>
    </sect2>

    <sect2>
      <title> ebMS CPA Configuration and Examples</title>

      <para>A CPA (Collaborative Partner Agreement) is an XML document which
      represents an agreement between exactly two parties who will exchange
      ebXML messages. This agreement defines the names of the parties involved
      and the messaging characteristics they will be using. ebXML message
      exchanges can have various reliability and security modes and can be
      synchronous or asynchronous. CPA’s are uniquely identified in messages
      using an element named CPAID.</para>

      <para> </para>

      <para>The CPAID attribute of the CollaborationProtocolAgreement element
      identifies the CPA to the messaging server. It can have any form but the
      recommendation is to concatenate party names in alphabetical order
      separated by a dash. For example "ABMotorCo-DEMotorCo". For
      example:</para>

      <para>&lt;tp:CollaborationProtocolAgreement</para>

      <para>       
      Xmlns:tp=http://www.oasis-open.org/committees/ebXML-cppa/schema/cpp-cpa-2_0.xsd</para>

      <para>       
      xsi:schemaLocation=”http://www.oasis-open.org/committees/ebxml-cppa/schema/cpp-cpa-</para>

      <para>        tp:cpaid=” ABMotorCo-DEMotorCo”
      tp:version=”2_0a”&gt;</para>

      <para>The CPA provides two elements for configuring reliable messaging
      agreements. The ReliableMessaging tag and the MessagingCharacteristics
      tag.</para>

      <para>The ReliableMessaging tag insures message handlers will create and
      manage AckRequest and Acknowlegment tags in the ebMS message. Without
      this tag, by default "Best-Effort" or no reliability is used in the
      message exchange. Thus optional tp:ReliableMessaging element under
      tp:ebXMLSenderBinding and tp:ebXMLReceiverBinding will be required in
      the implementation.</para>

      <para>The ReliableMessaging Tag in the CPA can be configured as
      follows:</para>

      <para>&lt;tp:ReliableMessaging&gt;</para>

      <para>      &lt;tp:Retries&gt;5&lt;/tp:Retries&gt;</para>

      <para>      &lt;tp:RetryInterval&gt;PT2H&lt;/tp:RetryInterval&gt;</para>

      <para>       
      &lt;tp:MessageOrderSemantics&gt;NotGuaranteed&lt;/tp:MessageOrderSemantics&gt;</para>

      <para>&lt;/tp:ReliableMessaging&gt;</para>

      <para>The MessagingCharacteristics in the CPA can be configured as
      follows:</para>

      <para>&lt;tp:MessagingCharacteristics</para>

      <para>        tp:syncReplyMode="none"</para>

      <para>        tp:ackRequested="always"</para>

      <para>        tp:ackSignatureRequested="none"</para>

      <para>        tp:duplicateElimination="always"/&gt;</para>

      <para>    &lt;/tp:DeliveryChannel&gt;</para>

      <sect3>
        <title>ebMS Once-And-Only-Once Sending Message Behavior</title>

        <para>If an MSH is given data by an application needing to be sent
        reliably to the recipient, the MSH MUST do the following:</para>

        <orderedlist inheritnum='ignore' continuation='restarts'>
          <listitem>
            <para>Create a message from components received from the
            application</para>
          </listitem>
        </orderedlist>

        <para>            The message MUST have a globally unique
        MessageID.</para>

        <orderedlist inheritnum='ignore' continuation='restarts'>
          <listitem>
            <para> Insert an AckRequested element</para>
          </listitem>

          <listitem>
            <para>Save the message in persistent storage</para>
          </listitem>

          <listitem>
            <para>Send the message to the recipient</para>
          </listitem>

          <listitem>
            <para>Wait for the return of an Acknowledgment Message
            acknowledging receipt of this specific message and, if it does not
            arrive before RetryInterval has elapsed, the message must be
            resent until an acknowledgment is received or the NumberOfRetries
            has been reached. If a communications protocol error is
            encountered, then take appropriate error handling action.</para>
          </listitem>
        </orderedlist>

        <para>Here is the sample of Reliable Messaging elements in ebMS
        message.</para>

        <para>…</para>

        <para>&lt;eb:MessageHeader&gt;</para>

        <para>        …</para>

        <para>        &lt;eb:MessageData&gt;</para>

        <para>       
        &lt;eb:MessageId&gt;PartsOrder.323210:e5c74:7ffc@sender.com&lt;/eb:MessageId&gt;</para>

        <para>       
        &lt;eb:Timestamp&gt;2003-10-31T12:22:30&lt;/eb:Timestamp&gt;</para>

        <para>       
        &lt;eb:TimeToLive&gt;2003-11-01T12:22:30&lt;/eb:TimeToLive&gt;</para>

        <para>        &lt;/eb:MessageData&gt;</para>

        <para>&lt;/eb:MessageHeader&gt;</para>

        <para>&lt;eb:AckRequested</para>

        <para>        SOAP-ENV:mustUnderstand="1" eb:signed="true"
        eb:version="2.0"/&gt;</para>

        <para>&lt;eb:DuplicateElimination/&gt;</para>

        <para>…</para>
      </sect3>

      <sect3>
        <title>ebMS Once-And-Only-Once Receiving Message Behavior</title>

        <para>If an AckRequested element is present in the received message
        then the receiver should generate an Acknowledgment Message is only
        performed when DuplicateElimination tag is present in the incoming
        message.</para>

        <para>Here is a sample Acknowledgement message that is sent back to
        the party that sent the AckRequested.</para>

        <para>&lt;eb:Acknowledgment SOAP:mustUnderstand="1"
        eb:version="2.0"&gt;</para>

        <para>&lt;eb:Timestamp&gt;2001-03-09T12:22:30&lt;/eb:Timestamp&gt;</para>

        <para>&lt;eb:RefToMessageId&gt;PartsOrder.323210:e5c74:7ffc@sender.com&lt;/eb:RefToMessageId&gt;</para>

        <para>&lt;eb:From&gt;</para>

        <para>       
        &lt;eb:PartyId&gt;uri:www.example.com&lt;/eb:PartyId&gt;</para>

        <para>&lt;/eb:From&gt;</para>

        <para>&lt;/eb:Acknowledgment&gt;</para>
      </sect3>
    </sect2>
  </sect1>
</chapter>
  <chapter xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/ebMS/Chapters/MessageLevelSecurity.xml'>
  <title>Implementing ebMS Message-Level Security</title>

  <sect1>
    <title>Implementing ebMS Message-Level Security</title>

    <sect2>
      <title> Digitally Signing a STAR ebMS Message  </title>

      <para>It is optional for a specific STAR ebMS message exchange to use
      Digital Signature, but if a Digital Signature is applied to a message
      the signature MUST be in full compliance with [XMLDSIG] and [ebMS
      version 2.0].</para>

      <para>ebMS version 2.0 is very specific about how to apply Digital
      Signatures. Though multiple signatures are allowed, only the first
      signature is defined. The first signature is a signature over the SOAP
      Envelope (excluding the Signature elements themselves) and over all
      Attachments. ebMS requires specific algorithms for canonicalization and
      transformation of the SOAP Envelope. In other words, the sender creates
      a digital signature over the SOAP Envelope and all payloads.</para>

      <para>A receiver MAY make use of ebXML CPA to associate a Digital
      Certificate with a sender.</para>
    </sect2>
  </sect1>
</chapter>
              
</book>