<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "../docbook/docbookx.dtd">
<book id='book_WebServices' xmlns:xi='http://www.w3.org/2001/XInclude'>
  <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>Web Services</title>

    <subtitle>Web Services v4.0.5</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>

    <editor>
      <firstname>Jason</firstname>

      <surname>Loeffler</surname>

      <affiliation>
        <orgname>Karmak</orgname>
      </affiliation>
    </editor>

    <othercredit>
      <firstname>Ramesh</firstname>

      <surname>Rangaiah</surname>

      <affiliation>
        <orgname>Navistar</orgname>
      </affiliation>
    </othercredit>

    <othercredit>
      <firstname>Pejavar</firstname>

      <surname>Rao</surname>

      <affiliation>
        <orgname>Navistar</orgname>
      </affiliation>
    </othercredit>

    <othercredit>
        <firstname>Andrew</firstname>
        <surname>Selletta</surname>
        <affiliation>
            <orgname>ADP</orgname>
        </affiliation>
    </othercredit>
    <othercredit>
        <firstname>Hector</firstname>
        <surname>Rivas</surname>
        <affiliation>
            <orgname>PACCAR</orgname>
        </affiliation>
    </othercredit>
    <othercredit>
        <firstname>William</firstname>
        <surname>Fitzpatrick</surname>
        <affiliation>
            <orgname>NADA</orgname>
        </affiliation>
    </othercredit>
    <revhistory>
      <revision>
        <revnumber>3.0s001</revnumber>

        <date>December 2008</date>

        <revdescription>
          <itemizedlist>
            <listitem>
              <para>Enhanced PullMessage with Filter Criteria</para>
            </listitem>
          </itemizedlist>
        </revdescription>
      </revision>

      <revision>
        <revnumber>4.0g002</revnumber>

        <date>May 2009</date>

        <revdescription>
          <itemizedlist>
            <listitem>
              <para>Updated to latest WS Specifications</para>
            </listitem>

            <listitem>
              <para>Changed STAR Transport Namespace</para>
            </listitem>

            <listitem>
              <para>Added STAR Level 1 interoperability rules.</para>
            </listitem>

            <listitem>
              <para>Converted document to standardized look and feel.</para>
            </listitem>
          </itemizedlist>
        </revdescription>
      </revision>

      <revision>
        <date>March 2010</date>

        <revdescription>
          <para><itemizedlist>
              <listitem>
                <para>Added STAR Level 2 Security Chapter</para>
              </listitem>

              <listitem>
                <para>Added STAR Level 2 Security Requirements</para>
              </listitem>
            </itemizedlist></para>
        </revdescription>
      </revision>
            <revision>
        <date>March 2011</date>

        <revdescription>
          <para><itemizedlist>
              <listitem>
                <para>Modified STAR1005 rule</para>
              </listitem>              
            </itemizedlist></para>
        </revdescription>
      </revision>
    </revhistory>
  </bookinfo>

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

  <section>
    <title>Purpose</title>

    <para>The purpose of this document is to provide specifications and
    implementation guidelines for the STAR Web Service components.</para>

    <para>This document is broken into the following sections for easier
    navigation:</para>

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

        <itemizedlist>
          <listitem>
            <para>Introduction - Background and general document
            overview</para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist>

    <itemizedlist>
      <listitem>
        <para>Part I - STAR Level 1</para>

        <itemizedlist>
          <listitem>
            <para>Interface Specifications</para>
          </listitem>

          <listitem>
            <para>Communication Patterns</para>
          </listitem>

          <listitem>
            <para>Reliable Messaging</para>
          </listitem>

          <listitem>
            <para>Error Handling</para>
          </listitem>

          <listitem>
            <para>Security</para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist>

    <itemizedlist>
      <listitem>
        <para>Part II - STAR Level 2 (Still in development)</para>

        <itemizedlist>
          <listitem>
            <para>WS-Addressing</para>
          </listitem>

          <listitem>
            <para>WS-ReliableMessaging</para>
          </listitem>

          <listitem>
            <para>Attachments - MTOM</para>
          </listitem>

          <listitem>
            <para>Security</para>
          </listitem>

          <listitem>
            <para>Applying Policy</para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>Scope</title>

    <para>This document covers the STAR Web Services interfaces specifications
    including the WSDL, message packaging, web methods, and different
    communication patterns. It also covers the STAR Web Services security
    specifications, based on OASIS WS-Security 1.0. This document does not
    address Identity, Authentication, Privacy, Content Integrity,
    Non-Repudiation and Trusted Timestamps. Versioning, Policy and Reliable
    messaging are also covered.</para>

    <para>The following items have been defined as out of scope:</para>

    <itemizedlist>
      <listitem>
        <para>Non-repudiation will be discussed under Auditing in a future
        release of these guidelines.</para>
      </listitem>

      <listitem>
        <para>Authorization, Trust Models and Attack Prevention are out of the
        scope for this release of the STAR Transport Guidelines and may be
        discussed in future releases of this guideline.</para>
      </listitem>

      <listitem>
        <para>Intermediaries, message routing, and other approaches to enhance
        or optimize the communication are also out of the scope of this
        document.</para>
      </listitem>
    </itemizedlist>

    <note>
      <para>This document is still under development. STAR Level 1
      requirements have been added, but additional changes maybe necessary.
      The namespace will not change as additional requirements are added. This
      document is expected to stabalize during the latter half of 2009.</para>
    </note>
  </section>

  <section>
    <title>Audience</title>

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

  <section>
    <title>Background</title>

    <para>Web Services provide a standard means of interoperating between
    different software applications, running on a variety of platforms.
    Interoperability is achieved by using standard communication protocols
    that are platform neutral such as HTTP and XML to transport messages
    through the Internet. SOAP, Simple Object Access Protocol, is the main
    specification that describes how messages should be packaged in XML
    format. SOAP was submitted to the W3C in 2000 by IBM, Microsoft, UserLand,
    and Developmentor. Other specifications work hand-in-hand with SOAP to
    provide complementary features such as WSDL (Web Service Description
    Language) to describe the interfaces and their bindings to communication
    protocols. And, UDDI (Universal Detection Discovery and Integration) to
    provide a registry service for service providers.</para>

    <para>WS-I.org is the organization taking the responsibility of ensuring
    interoperability between the different Web Services implementations. In
    2006, the organization published the WS-I Basic Profile 1.1, and this is
    the version that STAR is basing its web services guidelines on. The Basic
    Profile is based on the SOAP 1.1 specifications and describes SOAP
    bindings for HTTP only at this time. Bindings to other protocols such as
    TCP and SMTP are starting to emerge and might be included in a future
    version of the specifications.</para>
  </section>

  <section>
    <title>Service Provider Requirements</title>

    <para>In order for a service provider to be able to receive and process
    requests and send responses back it must satisfy the following high level
    requirements detailed in other guidelines documents:</para>

    <itemizedlist>
      <listitem>
        <para>Must have a fixed URL or IP address that is publicly accessible
        on the Internet.</para>
      </listitem>

      <listitem>
        <para>Must have the server software and infrastructure required to
        parse and process incoming messages.</para>
      </listitem>

      <listitem>
        <para>Security infrastructure to protect the publicly accessible
        servers as defined by Dealer Infrastructure guidelines or corporate
        security policy.</para>
      </listitem>

      <listitem>
        <para>Must have queuing facility to queue response messages if
        immediate delivery to the client is not possible (either disconnected
        client or a communication problem).</para>
      </listitem>
    </itemizedlist>

    <para>STAR defines eight security requirements:</para>

    <itemizedlist>
      <listitem>
        <para>Business Authentication</para>
      </listitem>

      <listitem>
        <para>Party Authentication</para>
      </listitem>

      <listitem>
        <para>Privacy/Confidentiality</para>
      </listitem>

      <listitem>
        <para>Source and Target Authentication</para>
      </listitem>

      <listitem>
        <para>Source Only Authentication</para>
      </listitem>

      <listitem>
        <para>System Authentication</para>
      </listitem>

      <listitem>
        <para>Unique Party Identification</para>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>Communication Patterns Overview</title>

    <para>This section provides and overview of the different communication
    patterns described in this document. For more detailed description, please
    refer to Communication Patterns chapter in the document.</para>

    <para><emphasis role='bold'>Synchronous vs. Asynchronous</emphasis></para>

    <para>Synchronous communication refers to sending a message to a service
    provider and receiving a response within a short timeout period
    (recommended timeout is 100 seconds) on the same connection. A synchronous
    method invocation of a web service maps to one HTTP request/response cycle
    and it is similar to the way web pages are requested using a
    browser.</para>

    <para>Synchronous method invocations are used when a response needs to be
    received immediately, say, to display it to a user in an interactive
    transaction.</para>

    <para>Asynchronous communication, on the other hand, refers to sending a
    message without waiting for a response. A response is sent in a separate
    communication back to the originator. The response might be generated
    after a few seconds, a few hours, or even a few days depending on the
    business rules.</para>

    <para>Synchronous communication, due to its nature, adds more requirements
    on both the server and the client than asynchronous communication. The
    server MUST process the received message and return a response within the
    preset time window, or return an error message.</para>

    <para><emphasis role='bold'>One-Way vs. Two-Way</emphasis></para>

    <para>In compliance with the WS-I Basic Profile 1.1, STAR currently uses
    HTTP as the underlying transport protocol for Web Services. And, thus,
    follows the same request-based model. In a request-based model, the client
    always initiates the communication and the server always sends the
    responses on the same TCP connection to the IP address from which the
    request originated. This model works well with web services and especially
    with low-end clients that do not have a fixed IP address or the
    infrastructure to support inbound requests.</para>

    <para>In a one-way, request-based communication model, only the service
    provider is required to have a fixed IP address and the necessary hardware
    and software to listen to incoming messages. The client, on the other
    hand, can be very simple and can use any type of Internet connection, even
    those that do not provide a static IP address.</para>

    <para>Due to its low requirements on the client end, the request-based
    model is suitable for dealer-to-OEM communication.</para>

    <para>To achieve a two-way communication model, the original one-way model
    is duplicated in reverse: the client exposes the same set of web services
    and becomes a service provider too. This way, both sides are clients and
    service providers at the same time and they both can initiate requests to
    the other side. Based on business requirements and the agreement between
    the two parties, the client might chose not to implement the full set of
    functionality as the server to keep the implementation simple.</para>
  </section>
</preface>

  <part label='Part I'>
    <title>STAR Level One</title>

    <partintro>
      <para>This section describes the necessary components and pieces that
      all STAR Level 1 compliant implementations must implement.</para>

      <literallayout format='linespecific' class='normal'>
            <xref linkend='Overview'></xref>
            <xref linkend='CommonComponents'></xref>
            <xref linkend='CommunicationPatterns'></xref>
            <xref linkend='Generic'></xref>
            <xref linkend='BODSpecific'></xref>
            <xref linkend='ErrorHandling'></xref>
            <xref linkend='Security'></xref>
        </literallayout>
    </partintro>

    <chapter id='Overview' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/STAR_Web_Services_Overview.xml'>
  <title>STAR Web Services Overview</title>

  <section>
    <title>Background</title>

    <para>The specifications define a set of methods and data types to
    facilitate exchanging synchronous and asynchronous messages using one-way
    or two-way communication models. This section describes these types and
    methods and explains how and where they apply.</para>

    <para>This version of the specifications uses the following XML namespace
    to identify its types, methods and schemas:</para>

    <para><emphasis>http://www.starstandards.org/webservices/2009/transport</emphasis></para>
  </section>

  <section>
    <title>STAR Web Services Types</title>

    <para>STAR supports two styles of WSDL.</para>

    <itemizedlist>
      <listitem>
        <para><emphasis role='bold'>Generic Transport</emphasis> - This
        transport can handle any type of payload. It is up to the implementer
        to determine the type of payload being sent and received and act
        accordingly. One end point is used to process all transport
        requests.</para>
      </listitem>

      <listitem>
        <para><emphasis role='bold'>BOD Specific</emphasis>- This transport
        follows in line with the more traditional web service, as it expects a
        specific type of payload to be sent and a specific type to be
        returned. Multiple end points are needed to handle different types of
        BODS.</para>
      </listitem>
    </itemizedlist>

    <para>The type selected will depend on the requirements of the
    implementer. Some may choose to implement one or the other, and some may
    choose to implement both. A generic outfacing transport and possibly an
    internal BOD Specific transport to handle internal communications.</para>
  </section>

  <section>
    <title>Web Service Interoperability Requirements</title>

    <para>In order to ensure that the BOD Specific Web Service and the Generic
    Transport WSDL can exchange STAR BODs and interoperate, the SOAP Envelope
    and content must adhere to the same structure. The following items
    <emphasis>MUST</emphasis> match exactly:</para>

    <itemizedlist>
      <listitem>
        <para>Element and attribute names in the Soap Envelope
        <emphasis>MUST</emphasis> match.</para>
      </listitem>

      <listitem>
        <para>The structure of the SOAP Message being sent
        <emphasis>MUST</emphasis> match.</para>
      </listitem>

      <listitem>
        <para>The STAR Manifest and STAR Payload <emphasis>MUST</emphasis>
        match.</para>
      </listitem>

      <listitem>
        <para>Where the items appear within the Soap Envelope
        <emphasis>MUST</emphasis> match.</para>
      </listitem>

      <listitem>
        <para>Occurrence constraints <emphasis>MUST</emphasis> match between
        the WSDLs. If something is required in one it must be required in the
        other</para>
      </listitem>

      <listitem>
        <para>If a field is optional in one it <emphasis>MUST</emphasis> be
        optional in the other</para>
      </listitem>
    </itemizedlist>

    <important>
      <title>STAR Level 1 Requirement</title>

      <para><glossterm linkend='STAR1015'>STAR1015:</glossterm> STAR BOD
      Specific and Generic Transports <emphasis>MUST</emphasis> be message
      level interoperable.</para>
    </important>

    <para>As long as the message produced by the WSDL is the same between both
    services, the styles can communicate with each other.To help keep these
    aligned, STAR uses an XSLT Style Sheet to generate the sample STAR
    Transport 2009 and BOD Specific WSDL templates included with the STAR
    Schema Repository. If changes are made to the manifest or payload these
    will automatically appear in both the Generic and the BOD Specific
    WSDLs.</para>

    <para>The WS-I profiles define standards for interoperability that make it
    easier to ensure that web services and clients can work together across
    varied platforms and implementations. STAR web services
    <emphasis>MUST</emphasis> conform to the WS-I Basic Profile 1.1 for
    interoperability and include conformance claims in the WSDL. <xref linkend='Ref_WSConformanceClaim'></xref></para>

    <important>
      <title>STAR Level 1 Requirement</title>

      <para><glossterm linkend='STAR1001'>STAR1001: </glossterm>All web
      services must be compliant to the rules and specifications outlined by
      the <ulink url='http://www.ws-i.org/Profiles/BasicProfile-1.1.html'>WS-I
      Basic Profile</ulink>.</para>

      <para><glossterm lang='' linkend='STAR1002'>STAR1002:</glossterm>
      Appropriate compliance markers are required as specified by the <ulink url='http://www.ws-i.org/Profiles/ConformanceClaims-1.0-2004-11-15.html'>WS-I
      Conformance Claim Attachment Mechanisms</ulink> document.</para>
    </important>
  </section>
</chapter>

    <chapter id='CommonComponents' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Common_Components.xml'>
  <title>Common Components</title>

  <section>
    <title>Overview</title>

    <para>Regardless of whether a Generic Transport or a BOD Specific
    transport is being implemented, the overall message packaging will be the
    same. As was discussed earlier, the two transport mechanisms have to be
    inter operable at the messaging level. The following sections describe the
    message architecture that applies to both transport methods.</para>
  </section>

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

    <para>The STAR Web Services transport was designed to provide a platform
    for secure and reliable delivery of any type of content in a standardized
    manner. The chosen architecture neither precludes nor requires attachments
    outside the body of the SOAP message for transportation of content. The
    chosen packaging methodology is well supported by all major Web Services
    toolkits and infrastructures and meets STAR's transport
    requirements.</para>

    <para>The STAR Payload schema defines a package structure that provides
    additional features such as a standard way of packaging multiple contents
    (STAR BODs, XML documents, binary data, etc) in one payload and a message
    manifest that describes the contents of a message The figure below shows
    the structure of a valid STAR Web Services message</para>

    <para>The first element under the SOAP:Body is the web method name. Three
    methods are defined: <emphasis>ProcessMessage</emphasis>,
    <emphasis>PutMessage</emphasis>, and <emphasis>PullMessage</emphasis>.
    Within the method element is the payload element, the primary element that
    encapsulates all transported payloads. The payload element contains one or
    more content elements, each of which encapsulates one and only one content
    element, such as a STAR BOD. The payload and content elements provide a
    standard format for transporting one or more XML documents inside the SOAP
    Body.</para>

    <figure>
      <title>Message Structure</title>

      <mediaobject>
        <imageobject>
          <imagedata align='center' contentwidth='3.35in' fileref='Images/MessageStructure.png' format='PNG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <figure>
      <title>Manifest</title>

      <mediaobject>
        <imageobject role='fo'>
          <imagedata align='center' contentwidth='6in' fileref='Images/Manifest.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='html'>
          <imagedata align='center' fileref='Images/Manifest.jpg' format='JPG'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>In the SOAP:Header, STAR defines a payloadManifest element, which
    contains one or more manifest elements. Each manifest element corresponds
    to one content element in the SOAP Body and describes its contents. The
    payloadManifest and manifest elements provide a table of contents for the
    message.</para>

    <para>The following a sample shows the structure of the STAR Web Services
    message, including the location of the payloadManifest, and the star
    payload elements.</para>

    <example>
      <title>Sample STAR Web Service Message</title>


    </example>

    <section>
      <title>Notes Regarding Payloads and Attachments</title>

      <para>The decision was made to avoid dependency on Attachments. The
      currently defined interface specification neither requires nor prohibits
      attachments.While the overall message structure may not need to change,
      additional attributes or elements may need to be added to support the
      evolving web services attachments specifications in the future.</para>
    </section>
  </section>

  <section>
    <title>Namespaces</title>

    <para>To avoid repetition and simplify the XML code snippets used in this
    document, the following namespace declarations will be used throughout
    this document:</para>

    <informaltable frame='all'>
      <tgroup cols='3'>
        <thead>
          <row>
            <entry><para>uiPrefix</para></entry>

            <entry><para>Description</para></entry>

            <entry><para>Namespace</para></entry>
          </row>
        </thead>

        <tbody>
          <row>
            <entry><para>wsse</para></entry>

            <entry><para>WS-Security</para></entry>

            <entry><para>
            http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
            </para></entry>
          </row>

          <row>
            <entry><para>wsu</para></entry>

            <entry><para>Utility Elements</para></entry>

            <entry><para>
            http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
            </para></entry>
          </row>

          <row>
            <entry><para>wsdl</para></entry>

            <entry><para>WSDL 1.1</para></entry>

            <entry><para>http://schemas.xmlsoap.org/wsdl/ </para></entry>
          </row>

          <row>
            <entry><para>soapbin</para></entry>

            <entry><para>WSDL SOAP Binding</para></entry>

            <entry><para>http://schemas.xmlsoap.org/wsdl/soap/ </para></entry>
          </row>

          <row>
            <entry><para>httpbin</para></entry>

            <entry><para>WSDL HTTP Binding</para></entry>

            <entry><para>http://schemas.xmlsoap.org/wsdl/http/ </para></entry>
          </row>

          <row>
            <entry><para>mime</para></entry>

            <entry><para>WSDL MIME Binding</para></entry>

            <entry><para>http://schemas.xmlsoap.org/wsdl/mime/ </para></entry>
          </row>

          <row>
            <entry><para>soap</para></entry>

            <entry><para>SOAP 1.1 Envelope</para></entry>

            <entry><para>http://schemas.xmlsoap.org/soap/envelope/
            </para></entry>
          </row>

          <row>
            <entry><para>xsi</para></entry>

            <entry><para>Schema Instance</para></entry>

            <entry><para>http://www.w3.org/2001/XMLSchema-instance
            </para></entry>
          </row>

          <row>
            <entry><para>xs</para></entry>

            <entry><para>XML Schema</para></entry>

            <entry><para>http://www.w3.org/2001/XMLSchema</para></entry>
          </row>

          <row>
            <entry><para>ds</para></entry>

            <entry><para>XML Signature</para></entry>

            <entry><para>http://www.w3.org/2000/09/xmldsig</para></entry>
          </row>

          <row>
            <entry><para>xenc</para></entry>

            <entry><para>XML Encryption</para></entry>

            <entry><para>http://www.w3.org/2001/04/xmlenc</para></entry>
          </row>

          <row>
            <entry><para>starws</para></entry>

            <entry><para>STAR Web Services</para></entry>

            <entry><para>http://www.starstandard.org/webservices/2009/transport</para></entry>
          </row>

          <row>
            <entry><para>oa</para></entry>

            <entry><para>OAGIS</para></entry>

            <entry><para>http://www.openapplications.org/oagis</para></entry>
          </row>

          <row>
            <entry><para>oa9</para></entry>

            <entry><para>OAGIS Version 9</para></entry>

            <entry><para>http://www.openapplications.org/oagis/9</para></entry>
          </row>

          <row>
            <entry><para>starbod</para></entry>

            <entry><para>STAR BODs</para></entry>

            <entry><para>http://www.starstandards.org/STAR</para></entry>
          </row>

          <row>
            <entry><para>star5</para></entry>

            <entry><para>STAR Version 5 BODs</para></entry>

            <entry><para>http://www.starstandard.org/STAR/5</para></entry>
          </row>

          <row>
            <entry><para>tns</para></entry>

            <entry><para>This Name Space</para></entry>

            <entry><para>Various</para></entry>
          </row>

          <row>
            <entry><para>wsp</para></entry>

            <entry><para>WS-Policy</para></entry>

            <entry><para>http://www.w3.org/ns/ws-policy</para></entry>
          </row>

          <row>
            <entry><para>wsa</para></entry>

            <entry><para>WS-Addressing</para></entry>

            <entry><para>http://www.w3.org/2005/08/addressing</para></entry>
          </row>

          <row>
            <entry><para>wsrm</para></entry>

            <entry><para>WS-ReliableMessaging</para></entry>

            <entry><para>http://docs.oasis-open.org/ws-rx/wsrm/200608</para></entry>
          </row>

          <row>
            <entry>wsam</entry>

            <entry>WS-Addressing Metadata</entry>

            <entry>http://www.w3.org/2007/05/addressing/metadata</entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </section>

  <section>
    <title>Web Methods</title>

    <para>Three methods are defined to cover the different types of
    communications supported by the guidelines. ProcessMessage, PutMessage,
    and PullMessage. The following sections describe these methods in more
    detail.</para>

    <section>
      <title>ProcessMessage</title>

      <para>This is the method to use for synchronous communication. It takes
      a payload element as an input, processes it, and returns a result
      payload all within one HTTP cycle. After invoking this method, the
      client keeps the connection open waiting for the response. If a response
      is not received within a predetermined timeout period, the method is
      considered to have failed.</para>

      <para>In certain situations this method might return a SOAP fault
      element instead of a payload element. For example, if the sender could
      not be authenticated or the message is not well formed. Fault Codes are
      described in <xref linkend='ErrorHandling'></xref> for more information.
      Errors related to business rules, on the other hand, MUST NOT be
      returned as SOAP faults, but returned using the suitable BOD.</para>

      <important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1016'>STAR1016:</glossterm> Application
        level error messages <emphasis role='bold'>MUST NOT</emphasis> be
        returned with a SOAP Fault, and <emphasis role='bold'>MUST</emphasis>
        be returned using the appropriate BOD.</para>
      </important>

      <example>
        <title>SOAP Body Message</title>

        <para><emphasis role='bold'>Request:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Body&gt;
   &lt;starws:ProcessMessage&gt; 
      &lt;!--Optional:--&gt;
      &lt;starws:payload&gt; 
         &lt;!--Zero or more repetitions:--&gt;
         &lt;starws:content id="?"&gt; 
           &lt; !--You may enter ANY elements at this point--&gt; 
        &lt;/starws:content&gt;
     &lt;/starws:payload&gt; 
  &lt;/starws:ProcessMessage&gt;
&lt;/soapenv:Body&gt;</programlisting>

        <para><emphasis role='bold'>Response:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Body&gt;
   &lt;starws:ProcessMessageResponse&gt; 
     &lt;!--Optional:--&gt;
     &lt;starws:payload&gt;
       &lt;!--Zero or more repetitions:--&gt;
       &lt;starws:content id="?"&gt; 
          &lt;!--You may enter ANY elements at this point--&gt; 
       &lt;/starws:content&gt;
     &lt;/starws:payload&gt;
   &lt;/starws:ProcessMessageResponse&gt;
&lt;/soapenv:Body&gt;   </programlisting>
      </example>

      <para>The following sequence diagrams show the message exchange
      sequences for different scenarios.</para>

      <figure>
        <title>Process Message</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/ProcessMessage.png' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentdepth='' contentwidth='6in' fileref='Images/ProcessMessage.png' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <figure>
        <title>ProcessMessage with Errors</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/ProcessMessageErrors.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentwidth='6in' fileref='Images/ProcessMessageErrors.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <figure>
        <title>ProcessMessage with Application System Errors</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/ProcessMessageAppErrors.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentdepth='' contentwidth='6in' fileref='Images/ProcessMessageAppErrors.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <para>The sequence diagrams that describe the error process are the same
      whether the PutMessage or PullMessage operation is being implemented
      instead of the ProcessMessage operation. The processes work the same
      whether a generic transport or a BOD specific transport is being
      implemented.</para>
    </section>

    <section>
      <title>PutMessage</title>

      <para>The PutMessage web method is used for asynchronous communication.
      It accepts a payload element as an input parameter, and returns nothing.
      Typically, PutMessage is used for messages that do not generate a
      response or for situations where a response is not returned immediately.
      The response can be retrieved later by calling PullMessage. The input
      payload for PutMessage must contain one or more elements.</para>

      <para>Although PutMessage does not return any value to the caller, it
      can return SOAP faults to indicate that the 'put' process was not
      successful. This typically happens in situations where the message could
      not be parsed or persisted on the server side. For example, if the SOAP
      envelope is corrupted and the server can not extract the payload or the
      sender information then a SOAP fault must be returned on the same
      connection to inform the sender of the error. Note that business level
      errors such as invalid values in a BOD should not be returned as SOAP
      faults, but instead are returned asynchronously (not on the same HTTP
      connection) in a response BOD that describe the error details. SOAP
      faults are reserved for errors that prevent the correct parsing or
      persistence of the message on the server.</para>

      <example>
        <title>SOAP Message</title>

        <para><emphasis role='bold'>Request:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Body&gt;
   &lt;starws:PutMessage&gt;
      &lt;!--Optional:--&gt;
      &lt;starws:payload&gt;
         &lt;!--Zero or more repetitions:--&gt;
         &lt;starws:content id="?"&gt;
             &lt;!--You may enter ANY elements at this point--&gt;
          &lt;/starws:content&gt;
      &lt;/starws:payload&gt;
   &lt;/starws:PutMessage&gt;
&lt;/soapenv:Body&gt;</programlisting>

        <para><emphasis role='bold'>Response:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Body&gt;
  &lt;starws:PutMessageResponse/&gt;
&lt;/soapenv:Body&gt;
</programlisting>
      </example>

      <para>In a one-way communication pattern, the client uses PutMessage to
      send a request to a service provider then sends another request using
      PullMessage (described in the next section) to pull the response. On the
      other hand, in a two-way communication pattern, the request is sent
      using PutMessage, and the response is returned using another PutMessage
      in the reverse direction.</para>

      <figure>
        <title>Successful PutMessage Sequence</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/PutMessage.png' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentdepth='' contentwidth='6in' fileref='Images/PutMessage.png' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>
    </section>

    <section>
      <title>PullMessage</title>

      <para>PullMessage is used to retrieve contents from the service
      provider. The contents can be:</para>

      <para>Responses to previous contents (a BOD for example) submitted using
      PutMessage.</para>

      <para>Responses to previous contents submitted using ProcessMessage but
      could not be delivered back to the requester due to communication or
      other errors.</para>

      <para>Contents that originate from the service provider.</para>

      <para>If the client is also a service provider, as in the two-way
      communication model, PullMessage is not required since both parties can
      communicate back and forth using PutMessage. However, the parties might
      choose to still use PullMessage in certain situations.</para>

      <para>The service provider must keep track of contents that are deemed
      to have been received by the client to avoid resending. The client may
      receive duplicates during error recovery.</para>

      <important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1017'>STAR1017:</glossterm> The service
        provider must keep track of contents that are deemed to have been
        received by the client to avoid resending.</para>

        <para><glossterm linkend='STAR1020'>STAR1020:</glossterm> The client
        must be able to handle duplicate messages from a service
        provider.</para>
      </important>

      <figure>
        <title>PullMessage Structure</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/PullMessage.png' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentdepth='' contentwidth='4.33in' fileref='Images/PullMessage.png' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <para><emphasis role='bold'>Filter Criteria:</emphasis></para>

      <para>Beginning in 2008 the PullMessage service was extended to support
      filtering with the addition of the filter complex type and the maxItems
      attribute. The filter type allows the requesting party to specify
      criteria that the responding party must apply when selecting the BODs to
      be returned in the pull message response. The maxItems attribute can be
      used to limit the number of BODs that will be returned, regardless of
      whether or not they satisfy the filter criteria.</para>

      <para>For example, the filter criteria and maxItems parameters could be
      used to to satisfy the following request:</para>

      <para>"<emphasis role='italic'>Retrieve all AcknowledgePartsOrder BODs
      queued for sending in the last 24 hours.Send a maximum of 20
      BODs</emphasis>"</para>

      <para>A detailed description of the filter component can be found in
      section 4.5.</para>

      <para><emphasis role='bold'>Returns:</emphasis></para>

      <para>This operation returns a payload object that carries one or more
      elements. Or, it returns an empty response with no payload element if
      there are no queued contents to return.</para>

      <example>
        <title>SOAP Message with Filter</title>

        <para><emphasis role='bold'>Request:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tran="http://www.starstandard.org/webservices/2009/transport"&gt;
 &lt;soapenv:Header/&gt;
 &lt;soapenv:Body&gt;
    &lt;tran:PullMessage maxItems="?"&gt;
       &lt;!--Optional:--&gt;
       &lt;tran:filter&gt;
          &lt;!--Optional:--&gt;
          &lt;tran:filterConnection connectionID="?" destroy="?"/&gt;
          &lt;!--Optional:--&gt;
          &lt;tran:receiptIDs&gt;
             &lt;!--1 or more repetitions:--&gt;
             &lt;tran:receiptID&gt;?&lt;/tran:receiptID&gt;
          &lt;/tran:receiptIDs&gt;
           &lt;!--Optional:--&gt;
           &lt;tran:filterCriteria&gt;
              &lt;!--1 or more repetitions:--&gt;
              &lt;tran:criteriaList&gt;
                 &lt;!--1 or more repetitions:--&gt;
                 &lt;tran:criteria&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:verb tran:operation="?"&gt;?&lt;/tran:verb&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:noun tran:operation="?"&gt;&lt;/tran:noun&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:applicationID tran:operation="?"&gt;?&lt;/tran:applicationID&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:partyID tran:operation="?"&gt;?&lt;/tran:partyID&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:startDateTime tran:operation="?"&gt;?&lt;/tran:startDateTime&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:endDateTime tran:operation="?"&gt;?&lt;/tran:endDateTime&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:pullStatus tran:operation="?"&gt;?&lt;/tran:pullStatus&gt;
                    &lt;!--Optional:--&gt;
                    &lt;tran:communicatorID tran:operation="?"&gt;?&lt;/tran:communicatorID&gt;
                    &lt;!--Zero or more repetitions:--&gt;
                    &lt;tran:predefined tran:operation="?"&gt;?&lt;/tran:predefined&gt;
                 &lt;/tran:criteria&gt;
              &lt;/tran:criteriaList&gt;
           &lt;/tran:filterCriteria&gt;
        &lt;/tran:filter&gt;
      &lt;/tran:PullMessage&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</programlisting>

        <para><emphasis role='bold'>Response:</emphasis></para>

        <programlisting xml:space='preserve'>&lt;soapenv:Body&gt;
  &lt;starws:PullMessageResponse&gt;
     &lt;!--Optional:--&gt;
     &lt;starws:payload&gt;
       &lt;!--Zero or more repetitions:--&gt;
       &lt;starws:content id="?"&gt;
           &lt;!--You may enter ANY elements at this point--&gt;
       &lt;/starws:content&gt;
    &lt;/starws:payload&gt;
 &lt;/starws:PullMessageResponse&gt;
&lt;/soapenv:Body&gt;
</programlisting>
      </example>

      <figure>
        <title>Successful PullMessage Operation</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/PullMessageSuccess.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>

          <imageobject role='fo'>
            <imagedata align='center' contentwidth='6in' fileref='Images/PullMessageSuccess.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>
    </section>
  </section>

  <section>
    <title>The payload Manifest SOAP Header</title>

    <para>STAR defines a custom SOAP header to serve as a table of contents
    for the message. The payload manifest contains one manifest element for
    each content element in the SOAP body. The manifest provides an easy and
    fast way to identify the types of data in the message payload without
    parsing the whole message. This is useful for implementations that make
    routing decisions based on the contents of the message. And, it is
    especially useful if the body of the message is encrypted.</para>

    <figure>
      <title>Payload Manifest</title>

      <mediaobject>
        <imageobject role='fo'>
          <imagedata align='center' contentwidth='6in' fileref='Images/PayloadManifest.jpg' format='JPEG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='html'>
          <imagedata fileref='Images/PayloadManifest.jpg'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>The manifest has the following attributes:</para>

    <itemizedlist>
      <listitem>
        <para><emphasis>namespaceURI</emphasis>: (Required) -This attribute
        contains the namespace URI of the XML element in the corresponding
        content in the SOAP body.</para>
      </listitem>

      <listitem>
        <para><emphasis>elemen</emphasis>t: (Required) - This attribute
        contains the local name of the XML element in the corresponding
        <emphasis>content</emphasis> in the SOAP body.</para>
      </listitem>

      <listitem>
        <para><emphasis>contentID</emphasis>: (Required)This attribute should
        be populated with the ID of the corresponding
        <emphasis>content</emphasis> element. This attribute, along with the
        <emphasis>id</emphasis> attribute of the <emphasis>content</emphasis>
        element is used to match the <emphasis>manifest</emphasis> to its
        corresponding content element.</para>
      </listitem>

      <listitem>
        <para><emphasis>version</emphasis> (Optional) - When the payload
        content is a BOD, this attribute contains the version number of the
        noun's schema used to validate the BOD, for example, 3.01. DTS files
        use the interfaceVersion of the file. For BOD content and DTS
        attachments this attribute is required.</para>
      </listitem>
    </itemizedlist>

    <important>
      <title>STAR Level 1 Requirement</title>

      <para><glossterm linkend='STAR1018'>STAR1018:</glossterm> A SOAP Header
      <emphasis role='bold'>MUST</emphasis> contain one <emphasis role='bold'>manifest element</emphasis> for each <emphasis role='bold'>content element</emphasis> in the SOAP body.</para>

      <para><glossterm linkend='STAR1019'>STAR1019:</glossterm> A <emphasis role='bold'>manifest</emphasis> is <emphasis role='bold'>REQUIRED</emphasis> to have <emphasis role='bold'>namespaceURI</emphasis>, <emphasis role='bold'>element</emphasis>, <emphasis role='bold'>contentID</emphasis>, and <emphasis role='bold'>version</emphasis> attributes. Even though version is listed
      as optional it is <emphasis role='bold'>REQUIRED</emphasis> for STAR BOD
      and DTS transports.</para>
    </important>
  </section>
</chapter>

    <chapter id='CommunicationPatterns' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Communication_Patterns.xml'>
  <title>Communication Patterns</title>

  <section>
    <title>One-Way Communication</title>

    <para>In the context of this document, one-way communication refers to the
    communication pattern in which only one of the communicating parties, the
    service provider (a.k.a. the server), has an addressable endpoint and the
    ability to receive and process incoming Web Services messages; and the
    other parties, the service consumer (a.k.a. the client), can send Web
    Services requests and receive their response in one HTTP cycle, but does
    not have an addressable endpoint to receive incoming messages initiated by
    another party. In this communication pattern, messages always originate
    from the client to the server.</para>

    <section>
      <title>One-Way Synchronous Communication</title>

      <para>The client uses ProcessMessage to achieve synchronous
      communication and receive a response immediately as shown in
      ProcessMessage sequence diagram earlier. Upon receiving the request, the
      server starts processing it while holding the connection with the client
      open until a response (or an error) is ready to be returned to the
      client on the open connection.</para>
    </section>

    <section>
      <title>One-Way Asynchronous Communication</title>

      <para>The client can also use PutMessage and PullMessage together to
      achieve asynchronous communication as shown in the figure below. In this
      pattern, the client must send a PullMessage request to receive contents
      queued at the server side. The client can either implement a polling
      service to periodically request contents from the server or send the
      requests only when contents are expected to be available for download,
      for example, through an event notification model, the details of which
      is out of the scope of this document.</para>

      <figure id='one-way_asynchronous_communciation' float='0'>
        <title>One-way Asynchronous Communication</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/onewayasyncomm.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
          <imageobject role='fo'>
            <imagedata align='center' contentwidth='5in' fileref='Images/onewayasyncomm.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>
    </section>
  </section>

  <section>
    <title>Two-Way Communication</title>

    <para>Two-way communication in the context of this document refers to the
    pattern in which both communicating partners have the ability to initiate
    and receive messages at the same time. This type of communication is
    possible if both parties satisfy the service provider requirements
    described in Service Provider Requirements section.</para>

    <section>
      <title>Two-Way Synchronous Communication</title>

      <para>Synchronous communication is done the same way using
      ProcessMessage as it is done in the one-way pattern (see<xref linkend='one-way_asynchronous_communciation'></xref> ). The difference here
      is that both parties can initiate the requests and hold for a response.
      Business requirements and an agreement between the two communicating
      parties determine weather and when synchronous communication is
      appropriate versus asynchronous communication.</para>
    </section>

    <section>
      <title>Two-Way Asynchronous Communication</title>

      <para>Asynchronous communication changes a little bit from the way it is
      done in the one-way communication pattern. In the one-way approach, the
      client sends a request using PutMessage, and then sends another request
      using PullMessage to download the response from the server. In the
      two-way approach, the need for PullMessage diminishes and is replaced
      instead by PutMessage initiated by the server to the client as shown in
      the figure below.</para>

      <figure id='Fig_two-way_asynchronous_communication' float='0'>
        <title>Two-way Asynchronous Communication</title>

        <mediaobject>
          <imageobject role='html'>
            <imagedata align='center' fileref='Images/twowayasyncomm.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
          <imageobject role='fo'>
            <imagedata align='center' contentwidth='5in' fileref='Images/twowayasyncomm.png' format='PNG' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>
    </section>
  </section>
</chapter>

    <chapter id='Generic' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Generic_Web_Services_Specs.xml'>
  <title>Generic Web Services Specifications</title>

  <section>
    <title>Overview</title>

    <para>The specifications define a set of methods and data types to
    facilitate exchanging synchronous and asynchronous messages using one-way
    or two-way communication models. This section describes these types and
    methods and explains how and where they apply.</para>
  </section>

  <section>
    <title>Generic WSDL</title>

    <para>The generic transport is considered to be a loosely typed WSDL,
    meaning that it does not fully describe all types of payloads that can
    occur. It provides meta data about the payload that shows up in the SOAP
    BODY based on information contained in the SOAP Header manifest, and the
    content element in the SOAP BODY. The generic transport does exactly what
    its name implies, allowing the sending and receiving of any type of
    payload in the soap body. You could technically send a BOD, UBL Message,
    DTS Transaction, Text, Binary Encoded, etc.</para>
  </section>

  <section>
    <title>Benefits and Considerations</title>

    <para><emphasis role='bold'>Benefits:</emphasis></para>

    <itemizedlist>
      <listitem>
        <para>Allows for loosely typed, and loosely coupled systems. Transport
        and Application are separate</para>
      </listitem>

      <listitem>
        <para>Changes to the data sent in the payload do not necessarily
        change the WSDL. Meaning the web service does not change because the
        schema changed.</para>
      </listitem>
    </itemizedlist>

    <para><emphasis role='bold'>Considerations:</emphasis></para>

    <itemizedlist>
      <listitem>
        <para>All transport traffic is going through one end point. This could
        potentially have scalability issues depending on the amount of data
        that is coming into the system.</para>
      </listitem>

      <listitem>
        <para>Implementers will need to implement routing and extraction code
        in order to determine what to do with the payload received.</para>
      </listitem>

      <listitem>
        <para>Need to implement logic in order to handle contents that are not
        understood.</para>
      </listitem>

      <listitem>
        <para>Need to negotiate out of band using other services to describe
        what payloads are understood and handled by a particular trading
        partner.</para>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>Pull Web Service Filter Criteria</title>

    <para>As discussed in <xref linkend='CommonComponents'></xref>, the Pull web
    service was enhanced for 2008 with a Filter component. This component
    allows the service requestor to provide optional criteria that the service
    provider will use to restrict the number and types of BODs that will be
    returned in the response message. Additionally, filters can be defined as
    persistent, allowing them to be re-used across multiple Pull
    requests.</para>

    <figure id='PullMessage_Filter_Type'>
      <title>PullMessage Filter Type</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/PullMessageFilterType.png' format='PNG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/PullMessageFilterType.png' format='PNG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>Each service requestor and service provider must implement the code
    that provides support for the filter component. STAR will provide the
    specifications for the filter component, however each implementor will be
    free to choose the method in which they implement the
    functionality.</para>

    <section>
      <title>Filter Elements</title>

      <para>The Filter component consists of the following three
      elements:</para>

      <informaltable frame='all'>
        <tgroup cols='3'>
          <tbody>
            <row>
              <entry><para><emphasis role='bold'>Element</emphasis></para></entry>

              <entry><para><emphasis role='bold'>Occurrence</emphasis></para></entry>

              <entry><para><emphasis role='bold'>Description</emphasis></para></entry>
            </row>

            <row>
              <entry><para>filterConnection</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para>Used to define persistence for the
              filter</para></entry>
            </row>

            <row>
              <entry><para>receiptIDs</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para>Used by service requestor to confirm the receipt of
              each message requested</para></entry>
            </row>

            <row>
              <entry><para>filterCriteria</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para>List of filter criteria to apply to the pull
              request</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para>The complete list of elements within the filter criteria component
      are shown below.</para>

      <informaltable frame='all'>
        <tgroup cols='3'>
          <tbody>
            <row>
              <entry><para><emphasis role='bold'>Item</emphasis></para></entry>

              <entry><para><emphasis role='bold'>Type</emphasis></para></entry>

              <entry><para><emphasis role='bold'>Description</emphasis></para></entry>
            </row>

            <row>
              <entry><para>PullMessage</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para></para></entry>
            </row>

            <row>
              <entry><para>maxItems</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>The maximum number of items to be sent. The service
              may send less than the number requested but should never send
              more than the number requested in any one pulling
              session.</para></entry>
            </row>

            <row>
              <entry><para>filter</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para></para></entry>
            </row>

            <row>
              <entry><para>filterConnection</para></entry>

              <entry><para>Element</para></entry>

              <entry><para></para></entry>
            </row>

            <row>
              <entry><para>connectionID</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>A unique connection id for the filter. Used during
              persistance of a filter.</para></entry>
            </row>

            <row>
              <entry><para>destroy</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>The destroy attribute of FilterConnection will be
              set to true when the client decides to destroy a persisted
              filter before all of its applicable messages have been pulled.
              If and when the client does pull all of the persisted filter's
              applicable messages, then the web service will automatically
              destroy the connection and return an empty pull response. If the
              client does not pull all of a persisted filter's applicable
              messages and does not explicitly destroy the persisted filter by
              setting the destroy attribute to true, then based on an agreed
              upon out-of-band policy, the web service will expire the
              persisted filter after X number of days.</para></entry>
            </row>

            <row>
              <entry><para>recieptIDs</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para></para></entry>
            </row>

            <row>
              <entry><para>receiptID</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>An unbounded list of content ids that have been
              previously received since the last pull request.</para></entry>
            </row>

            <row>
              <entry><para>filterCriteria</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para>A list of filter criterias to be applied to
              pulling.</para></entry>
            </row>

            <row>
              <entry><para>criteriaList</para></entry>

              <entry><para>Complex Type</para></entry>

              <entry><para>Criteria contains a unbounded list of filter
              criteria that can be applied to a queue. If included it is used
              to specify what should be retrieved. More than one criteria can
              be specified. Each criteria is it's own filter.</para></entry>
            </row>

            <row>
              <entry><para>verb</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>The OAGIS or STAR Verb. i.e. Process, Acknowledge,
              Notify, etc</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>noun</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>The OAGIS or STAR Noun for a particular BOD. i.e.
              PartsOrder, CreditApplication, FinancialStatement,
              etc.</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>serviceID</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>identifies the particular service to or from which
              a message is being sent (e.g. Parts:Orders)</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>partyID</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>Assigning Organization Party Id</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>startDateTime</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>Indicates the beginning time/date range of messages
              to be retrieved during this pull session. Based on the time/date
              at which each message was originally queued for
              delivery.</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>endDateTime</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>Indicates the ending time/date range of messages to
              be retrieved during this pull session. Based on the time/date at
              which each message was originally queued for
              delivery.</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>pullStatus</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>The status of an item to be pulled. (i.e. Pulled,
              Ready, etc.)</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>communicatorID</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>Identifer of the party on behalf of which the pull
              call was submitted. This could be the ID of the calling party or
              it may be an alternate party if the pull request is being
              proxied by another service.</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>

            <row>
              <entry><para>predefined</para></entry>

              <entry><para>Element</para></entry>

              <entry><para>These are complex queries or queries that can't be
              represented using the current filter criteria. They may contain
              if then else logic, and are identified by a name. (i.e.
              GetWidgetsGreaterThan10)</para></entry>
            </row>

            <row>
              <entry><para>operation</para></entry>

              <entry><para>Attribute</para></entry>

              <entry><para>Enumerated List: "and", "or", "not"</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
  </section>

  <section>
    <title>Generic WSDL Example</title>

    <para>How is the generic transport implemented by STAR? As has been
    outlined in <xref linkend='CommonComponents'></xref>, the generic transport
    will implement the Manifest, and Content elements in the Soap Header and
    Body respectively.</para>

    <figure id='Generic_Transport'>
      <title>Generic Transport</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/GenericTransport.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/GenericTransport.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>As is depicted in the figure below, the WSDL implements the
    ProcessMessage, PutMessage, and PullMessage methods and operations. The
    following examples will use the ProcessMessage method to indicate the
    structure of the SOAP Body. A sample Generic Transport WSDL can be found
    with the STAR Schema Repository.</para>

    <figure id='Fig_Generic_Payload_Element_Definition'>
      <title>Generic Payload Element Definition</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/GenericPayloadElementDef.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/GenericPayloadElementDef.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>The generic transport will use one common payload element
    definition.This is the Payload type. The payLoad type contains the
    definition for the content elements.</para>

    <figure id='Fig_Generic_Element'>
      <title>Generic Element</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/GenericElement.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/GenericElement.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>The Generic content element refers to a complex Type definition that
    defines an xsd:any as the content for the element. What this says, is that
    any type of XML or Text can be put here. It is not locked to a particular
    type of data to be sent or received. Information about the content is
    located in the Manifest elements and linked by an id. There may be
    unlimited number of content elements sent in the payload, and each links
    back to a particular manifest element.</para>

    <para>The receiving web service would process the Manifest to determine
    what it actually received, and do any appropriate routing or processing of
    the payload contained within it.</para>

    <example>
      <title>Sample Generic Message</title>

      <programlisting xml:space='preserve'>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:starws="http://www.starstandard.org/webservices/2009/transport"&gt;
   &lt;soapenv:Header&gt;
      &lt;starws:payloadManifest&gt;
         &lt;!--Zero or more repetitions:--&gt;
         &lt;starws:manifest contentID="?" namespaceURI="?" element="?" relatedID="?" 
                    version="?"/&gt;
      &lt;/starws:payloadManifest&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;starws:ProcessMessage&gt;
         &lt;starws:payload&gt;
            &lt;!--Zero or more repetitions:--&gt;
            &lt;starws:content id="?"&gt;
               &lt;!--You may enter ANY elements at this point--&gt;
            &lt;/starws:content&gt;
         &lt;/starws:payload&gt;
      &lt;/starws:ProcessMessage&gt;
  &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</programlisting>
    </example>
  </section>
</chapter>

    <chapter id='BODSpecific' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/BOD_Specific_Web_Service_Specs.xml'>
  <title>BOD Specific Web Service Specifications</title>

  <section>
    <title>Overview</title>

    <para>Choosing either a BOD Specific transport or a Generic transport does
    have architectural implications. However, the choice does not have to be
    one or the other, both can be used together. The choice should be based on
    what best fits the overall architectural and system needs for the Web
    Services to be implemented.</para>
  </section>

  <section>
    <title>BOD Specific WSDLS</title>

    <para><emphasis role='bold'>What is a BOD Specific WSDL?</emphasis> A BOD
    Specific WSDL is a version of the STAR Web Services Transport
    specification that expects to send and receive only a specific type of BOD
    in its transaction life cycle. If it receives anything other than what it
    expects, it will send back a SOAP Fault to indicate that the wrong payload
    was sent. According to Russell Butek from IBM, "WSDL is the Web Services
    Description Language. Its charter is to describe an interface to a service
    as completely as possible. When you use xsd:any, you deviate from this
    intent of the WSDL". <xref linkend='Ref_ButekRussell'></xref> In other words, a
    Generic transport does not fully describe a web service; it leaves key
    information about the payload out. This has the advantage of allowing the
    transport to remain generic but shifts the determination of the content
    and what to do with the content received to another portion of the
    system.</para>

    <para>A BOD Specific WSDL will fully describe all aspects of the Web
    Service's capabilities, including the type of payload that can be received
    and the expected responses. BOD specific WSDL is considered to be a
    strongly typed WSDL. More information in regards to strongly typed and
    loosely typed WSDL definitions can be found in the IBM Developerworks
    article, "Loosely typed versus strongly typed Web Services" by Andre
    Tost.</para>
  </section>

  <section>
    <title>Benefits and Considerations</title>

    <para><emphasis role='bold'>Benefits:</emphasis></para>

    <itemizedlist>
      <listitem>
        <para>BOD specific WSDL fully describes the Web Services Interface and
        the type of services it offers. The WSDL is considered to be strongly
        typed.</para>
      </listitem>

      <listitem>
        <para>BOD specific WSDL specifies clearly what is to be sent to the
        service and what is to be returned.</para>
      </listitem>

      <listitem>
        <para>BOD specific WSDL's are more compatible with existing
        development tools that generate code from the WSDL. These tools work
        best when they can describe the full capabilities, and not have to
        leave pieces to be filled in outside of their framework.</para>
      </listitem>

      <listitem>
        <para>Services using BOD Specific WSDL's do not require additional
        processing by the SOAP engine to figure out the type of payload being
        received.</para>
      </listitem>

      <listitem>
        <para>Data Validation of the payload can happen before it reaches the
        application, as it is validated by the type of content the Web Service
        expects to receive.</para>
      </listitem>
    </itemizedlist>

    <para><emphasis role='bold'>Considerations:</emphasis></para>

    <itemizedlist>
      <listitem>
        <para>Changes can create backward compatibility issues. If the
        strongly typed data in the WSDL changes or breaks compatibility, code
        that depends on the WSDL may need to be regenerated.</para>
      </listitem>

      <listitem>
        <para>Strongly typed interfaces require more logic upfront in the
        Transport dealing with the payload and parsing of the information. The
        amount depends on the size and complexity of the payload.</para>
      </listitem>

      <listitem>
        <para>There is a closer tie between the transport and application,
        potentially requiring closer testing between the two.</para>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>BOD Specific WSDL Example</title>

    <para>So how does a BOD Specific WSDL look when implementing the STAR Web
    Services Transport? STAR includes with the XML Schemas for STAR 5 the BOD
    Specific WSDL for all the BODs. These are grouped by the recommended Verb
    and Noun pairing outlined in the Verb Usage Guidelines available on the
    STAR Website. The WSDL files may be found in the following
    directory:</para>

    <figure id='Fig_WSDL_Directory_Structure' float='0'>
      <title>WSDL Directory Structure</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/WSDLDirectoryStructure.png' format='PNG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/WSDLDirectoryStructure.png' format='PNG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>There are roughly about 60 WSDL definition files, and these are
    automatically generated with the base information necessary for minimum
    compliance with the STAR Web Services transport. These WSDL files do not
    implement any of the Security, or Reliable Messaging that may be needed by
    a particular implementation. They are provided as templates for users to
    update for their particular requirements.</para>

    <figure id='Fig_BOD_Specific_Service_and_Operations' float='0'>
      <title>BOD Specific Service and Operations</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/BODSpecificServiceOperations.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/BODSpecificServiceOperations.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>On the surface, there is little difference between the structure of
    the BOD Specific WSDL and a generic transport. You still have operations,
    transport types, bindings, messages, and services. The root soap body
    elements that carry the payload are still the same, and the manifest
    information that is transmitted is the same as well. These all have to be
    the same for both a generic and BOD specific WSDL to be able to
    interoperate with each other.</para>

    <para>Differences start to show once you reach the definition of the
    elements that make up the operation as shown in the figure belowFigure
    19.</para>

    <figure id='Fig_BOD_Specific_Process_Message_Definition' float='0'>
      <title>BOD Specific Process Message Definition</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/BODSpecificMessageDefinition.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/BODSpecificMessageDefinition.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>A BOD specific WSDL will refer to a very strongly typed definition
    for the payload element. This allows the WSDL to fully describe the type
    of content expected to be sent with the type of operation that is being
    invoked. Further, the payload element itself describes the type of BOD to
    be carried and the multiplicity of the content.It also describes where
    attachment data should occur and in what order the payload information
    should be sent.</para>

    <figure id='Fig_BOD_Specific_strongly_typed_payload' float='0'>
      <title>BOD specific strongly typed payload</title>

      <mediaobject>
        <imageobject role='html'>
          <imagedata align='center' fileref='Images/BODSpecificMessageDefinition.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>

        <imageobject role='fo'>
          <imagedata align='center' contentdepth='3in' contentwidth='5in' fileref='Images/BODSpecificStronglyTypedPayload.jpg' format='JPG' scalefit='1'></imagedata>
        </imageobject>
      </mediaobject>
    </figure>

    <para>If schema validation is performed and the information does not
    appear in the order that is specified, a SOAP fault must be returned
    before the information ever reaches the receiving application.</para>
  </section>
</chapter>

    <chapter id='ErrorHandling' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Error_Handling.xml'>
  <title>Error Handling</title>

  <section>
    <title>HTTP Errors, SOAP Faults, and BOD Level Errors</title>

    <para>It is important to use HTTP errors, SOAP Faults, or BOD level errors
    consistently.   However, this section acknowledges implementations may use
    different error mechanisms for the same types of errors.  This section
    defines general guidelines between these error mechanisms and also refers
    to the appropriate STAR documentation with regard to BOD level error
    handling.  </para>

    <section>
      <title>General Principles</title>

      <itemizedlist>
        <listitem>
          <para>Across STAR transports, the mechanism of error reporting
          should be as consistent as possible.  </para>
        </listitem>

        <listitem>
          <para>To align with the above principle, communicate as many errors
          as possible within BODs and minimize the amount of errors
          communicated in a transport specific way (such as SOAP Faults).
           </para>
        </listitem>

        <listitem>
          <para>Other principles specific to BOD level errors are detailed in
          the STAR Confirm BOD Implementation Guidelines.</para>
        </listitem>

        <listitem>
          <para>Implementations MUST NOT communicate errors using mechanisms
          other than those defined by STAR documents, or use error codes not
          defined or approved by STAR.</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Spectrum of Error Types</title>

      <para>The types of errors which can occur when a Web service client
      attempts to communicate with a Web service can be thought of as a
      spectrum.  At one end of the spectrum are the pure transport related
      errors and at the other end are the errors resulting from the business
      processing of the BOD.  The mechanisms used to communicate these errors
      differ.  4.2.2-1 depicts an example specific to the use of Web services
      over HTTP.  Other transport level protocols may have other exceptions.
       Although many types of errors are shown, this list is not intended to
      be all-inclusive.</para>

      <figure id='fig_SpectrumErrorTypes'>
        <title>Spectrum of Error Types by Communication Mechanism</title>

        <mediaobject>
          <imageobject>
            <imagedata align='center' contentwidth='4.5in' fileref='Images/Spectrumoferrorsimage.png' format='PNG' id='fig_SpectrumOfErrors' scalefit='1'></imagedata>
          </imageobject>
        </mediaobject>
      </figure>

      <para>The general guidelines with the approach shown here are the
      following:</para>

      <para>HTTP exceptions are truly transport specific.  SOAP Faults include
      the following types of errors:  </para>

      <itemizedlist>
        <listitem>
          <para>True Web service transport specific errors (e.g., Invalid
          operation and server too busy)</para>
        </listitem>

        <listitem>
          <para>SOAP Faults defined as part of a Web service standard like
          WS-Security implemented by this document (e.g.,
          FailedAuthentication)</para>
        </listitem>

        <listitem>
          <para>SOAP Faults due to manifest and payload inconsistencies</para>
        </listitem>

        <listitem>
          <para>SOAP Faults due to business level errors that could not be
          returned in a BOD.</para>
        </listitem>
      </itemizedlist>

      <para>BOD level errors are preferred over the previous transport
      specific errors; therefore, if the application area of the BOD is
      obtainable and the error is not a transport error, BOD level error
      handling SHOULD be used.  Refer to the STAR Confirm BOD Implementation
      Guidelines for details on BOD level errors.</para>
    </section>

    <section>
      <title>HTTP Errors</title>

      <para>HTTP Errors are those that occur at the transport layer when
      trying to call the web service and the web service client should handle
      them according to WSI basic profile 1.1.</para>

      <para>Web service client should check for the HTTP return code 200 to
      ensure the transaction that was attempted went through ok. If the client
      receives any HTTP return code other than 200, it should be handled
      accordingly. Typical situations an HTTP error could occur are as
      follows:</para>

      <para><emphasis role='bold'>Common STAR HTTP Error
      Codes:</emphasis></para>

      <informaltable>
        <tgroup cols='2'>
          <tbody>
            <row>
              <entry><emphasis role='bold'>Description</emphasis></entry>

              <entry><emphasis role='bold'>Error Code</emphasis></entry>
            </row>

            <row>
              <entry>When the web server where the web service is being hosted
              is down or not available.</entry>

              <entry>404</entry>
            </row>

            <row>
              <entry>When the DNS server is unable to resolve the domain name
              in the Endpoint.</entry>

              <entry>400 or 500</entry>
            </row>

            <row>
              <entry>When the Endpoint of the web service is not
              available.</entry>

              <entry>503</entry>
            </row>

            <row>
              <entry>When the SSL Handshake Failure occurs between the Client
              and the Web Server.</entry>

              <entry>500</entry>
            </row>

            <row>
              <entry>When the Web Service does not recognize the request sent
              by the client.</entry>

              <entry>502</entry>
            </row>

            <row>
              <entry>When the HTTP Request time out occurs. (NOTE: This is not
              the same as the timeout error we see in the SoapFault.)</entry>

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

      <para>For a more details on all type HTTP error codes and details of
      each error code and description please refer to <ulink url='http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html'>RFC2616
      Section 10.</ulink> <xref linkend='Ref_RFC2616'></xref></para>
    </section>
  </section>

  <section>
    <title>SOAP Faults</title>

    <para>SOAP faults are used to indicate error situations that prevent the
    successful delivery of STAR contents for subsequent parsing and
    processing. While this specification does not prevent using SOAP faults to
    communicate business level errors generated by business rules, this
    specification <emphasis role='bold'>RECOMMENDS</emphasis> that these types
    of errors be returned using the proper BOD type such as a ConfirmBOD or
    the corresponding Acknowledge BOD.</para>

    <para>If you send a message that was not successful you may get back a
    response containing a SOAP fault element which gives you status
    information, error information, or both. A SOAP Fault is similar to an
    Exception object in common development platforms in that it conveys
    information about a problem that prevents further processing. Some
    STAR-specific SOAP fault codes have been defined for common faults. All
    STAR implementations must understand these faults and handle them
    accordingly. Standard SOAP faults should be preferred over custom fault
    codes, such as when WS-Security or the WS-I Basic Profile define specific
    faults to be used. Below is a list of common faults that have been defined
    by STAR. When used, the fault code must be prefixed by “STAR:” and appear
    as in STAR:Invalid Structure. </para>

    <para>Note: When sending a SOAP Fault the HTTP Status code needs to be set
    to 500, according to the WS-I Basic Profile. </para>

    <para><table>
        <title>STAR Standard Soap Faults</title>

        <tgroup cols='2'>
          <thead>
            <row>
              <entry>Fault Code</entry>

              <entry>Description</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry>Duplicate Document </entry>

              <entry>This code refers to a document that already exists. This
              may happen for a BOD such as ProcessPartsOrder where the
              document identifiers to another existing parts order from the
              same dealer. </entry>
            </row>

            <row>
              <entry>Not Authorized </entry>

              <entry>This code occurs when the client attempts to perform an
              operation that is not authorized for the given action. This is
              not to be used for Authentication errors. Those should use the
              appropriate WS-Security SOAP Fault. </entry>
            </row>

            <row>
              <entry>Server Error</entry>

              <entry>An error (e.g. database server is down) on the server
              prevented the execution of the BOD. The client will have to
              resend the BOD at a later time. </entry>
            </row>

            <row>
              <entry>BOD Not Supported </entry>

              <entry>The received BOD or BOD version is not supported b the
              receiver. </entry>
            </row>

            <row>
              <entry>Invalid Structure </entry>

              <entry>The structure of the BOD is not valid. For example, the
              BOD failed schema validation. </entry>
            </row>

            <row>
              <entry>Invalid BODID </entry>

              <entry>A BODID was missing or is Invalid. </entry>
            </row>

            <row>
              <entry>Time Exceeded </entry>

              <entry>The processing time will exceed the real time transaction
              allowed time. Must resend with a Put for batch processing, and
              pull to receive the message. </entry>
            </row>
          </tbody>
        </tgroup>
      </table>A SOAP Fault object contains the following elements: </para>

    <itemizedlist>
      <listitem>
        <para>Fault code: Always required. The fault code must be a fully
        qualified name: it must contain a prefix followed by a local name. The
        SOAP specifications define a set of fault code local name values,
        which a developer can extend to cover other problems.</para>
      </listitem>

      <listitem>
        <para>Fault string: Always required. A human-readable explanation of
        the fault.</para>
      </listitem>

      <listitem>
        <para>Fault actor: Required if the SOAP Header object contains one or
        more actor attributes; optional if no actors are specified, meaning
        that the only actor is the ultimate destination. The fault actor,
        which is specified as a URI, identifies who caused the fault. For an
        explanation of what an actor is, see the actor attribute.</para>
      </listitem>

      <listitem>
        <para>Detail object: Optional element. The SOAP Fault object may
        contain a Detail object that gives details about the problem. </para>
      </listitem>
    </itemizedlist>

    <para>Below is an example of a SOAP message carrying a valid Fault
    element:</para>

    <example id='exam_SoapFault'>
      <title>Sample SOAP Fault</title>

      <programlisting>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   &lt;soap:Header&gt;
   &lt;/soap:Header&gt;
   &lt;soap:Body&gt;
     &lt;soap:Fault&gt;
        &lt;faultcode&gt;soap:Server&lt;/faultcode&gt;
        &lt;faultstring&gt;Database server not available.&lt;/faultstring&gt;
        &lt;faultactor&gt;http://localhost/WebServices/STAR/STARTransport.asmx&lt;/faultactor&gt;
     &lt;/soap:Fault&gt;
   &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</programlisting>
    </example>

    <para>SOAP 1.1 defines the following standard fault codes under the SOAP
    namespace ("http://schemas.xmlsoap.org/soap/envelope/"):</para>

    <itemizedlist>
      <listitem>
        <para>Client: This code should be used when an error is found in the
        received message. The error could be anything from a corrupted message
        to a missing required element. This fault code indicates that the
        received message is the cause of the error and that the client is to
        blame.</para>
      </listitem>

      <listitem>
        <para>Server: This fault code indicates that a problem at the server
        prevented the processing of the message. The error could be anything
        from an overloaded server to a failing database.</para>
      </listitem>
    </itemizedlist>

    <para>These fault codes represent classes of errors rather than specific
    errors. SOAP 1.1 allows extending the fault codes using the period
    notation, however this practice is discouraged by the WS-I Basic Profile
    1.1 to avoid the risk of potential name conflicts.</para>

    <para><important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1009'>STAR1009:</glossterm> All STAR Web
        Services are <emphasis role='bold'>REQUIRED</emphasis> to understand
        and handle the STAR Specific SOAP Faults.</para>

        <para><glossterm linkend='STAR1010'>STAR1010:</glossterm> All STAR
        soap fault error codes are <emphasis role='bold'>REQUIRED</emphasis>
        to be be prefixed with STAR: and the appropriate STAR error code. i.e.
        <emphasis role='bold'>STAR:Invalid Structure</emphasis>.</para>

        <para><glossterm linkend='STAR1011'>STAR1011:</glossterm> All STAR
        soap fault error codes are <emphasis role='bold'>REQUIRED</emphasis>
        to appear in the standard SOAP:Fault block.</para>

        <para><glossterm linkend='STAR1012'>STAR1012:</glossterm> SOAP Faults
        are for Critical Processing errors only. Informational or warning
        errors <emphasis role='bold'>SHOULD NOT</emphasis> be sent as a SOAP
        Fault.</para>
      </important>Note that some specifications mentioned in this document
    define their own SOAP faults. For example, WS-Security defines a set of
    fault codes to address security related errors. These fault codes are
    described in the WS-Security section and should be used when
    appropriate.</para>

    <para><important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1014'>STAR1014:</glossterm> WS-Security
        errors must send the appropriate WS-Security SOAP Fault for the
        authorization being used.</para>
      </important></para>

    <section>
      <title>Sample Error Cases</title>

      <para>Below are examples of different error situations and valid
      responses that a service provider can reply with.</para>

      <para></para>

      <informaltable frame='all'>
        <tgroup cols='2'>
          <tbody>
            <row>
              <entry><para><emphasis role='bold'>Error
              Case</emphasis></para></entry>

              <entry><para><emphasis role='bold'>Valid Response (ConfirmBOD or
              SOAP Fault)</emphasis></para></entry>
            </row>

            <row>
              <entry><para>Wrong ProcessMessage namespace</para></entry>

              <entry><para>Fault: soap:Client</para></entry>
            </row>

            <row>
              <entry><para>Wrong BOD namespace</para></entry>

              <entry><para>Fault: soap:Client</para></entry>
            </row>

            <row>
              <entry><para>Misspelled BOD root element</para></entry>

              <entry><para>ConfirmBOD: BodNotSupported</para> <para>Fault:
              soap:Client</para></entry>
            </row>

            <row>
              <entry><para>Invalid or missing &lt;Task&gt;
              element</para></entry>

              <entry><para>Fault: soap:Client</para> <para>Fault:
              wsse:FailedAuthentication</para> <para>ConfirmBOD:
              BodNotSupported</para> <para>ConfirmBOD: FieldMissing</para>
              <para>ConfirmBOD: InvalidBod</para></entry>
            </row>

            <row>
              <entry><para>Missing &lt;ReferenceId&gt;</para></entry>

              <entry><para>Fault: soap:Client</para> <para>ConfirmBOD:
              FieldMissing</para></entry>
            </row>

            <row>
              <entry><para>Missing &lt;DealerNumber&gt;</para></entry>

              <entry><para>Fault: soap:Client</para><para>Fault:
              wsse:FailedAuthentication</para><para>ConfirmBOD:
              FieldMissing</para></entry>
            </row>

            <row>
              <entry><para>Invalid dealer number</para></entry>

              <entry><para>Fault: wsse:FailedAuthentication</para>
              <para>ConfirmBOD: InvalidValue</para></entry>
            </row>

            <row>
              <entry><para>Missing &lt;BODId&gt;</para></entry>

              <entry><para>Fault: soap:Client</para> <para>ConfirmBOD:
              FieldMissing</para></entry>
            </row>

            <row>
              <entry><para>Message too old</para>
              <para>(wsse:Security\wsu:Timestamp\wsu:Expires has
              expired)</para></entry>

              <entry><para>wsu:MessageExpired</para></entry>
            </row>

            <row>
              <entry><para>Missing Application Area</para></entry>

              <entry><para>Fault: soap:Client</para> <para>Fault:
              wsse:FailedAuthentication</para> <para>ConfirmBOD:
              InvalidBod</para></entry>
            </row>

            <row>
              <entry><para>Missing Data Area</para></entry>

              <entry><para>Fault: soap:Client</para> <para>ConfirmBOD:
              InvalidBod</para></entry>
            </row>

            <row>
              <entry><para>Invalid User ID</para> <para>in wsse:Security
              header</para></entry>

              <entry><para>wsse:FailedAuthentication</para></entry>
            </row>

            <row>
              <entry><para>Wrong password</para> <para>in wsse:Security
              header</para></entry>

              <entry><para>wsse:FailedAuthentication</para></entry>
            </row>

            <row>
              <entry><para>Corrupted XML</para></entry>

              <entry><para>HTTP/1.1 400 Bad Request</para> <para>(specified by
              WS-I Basic Profile)</para></entry>
            </row>

            <row>
              <entry><para>Wrong SOAP Action HTTP header</para></entry>

              <entry><para>soap:Client</para></entry>
            </row>

            <row>
              <entry><para>Wrong SOAP Action in HTTP header and
              wsa:Action</para></entry>

              <entry><para>soap:Client</para></entry>
            </row>

            <row>
              <entry><para>Misspelled wsse:Security namespace</para></entry>

              <entry><para>wsse:SecurityTokenUnavailable</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
  </section>

  <section>
    <title>Application Level Errors</title>

    <para>Application level errors are those that occur once the payload has
    made it into the application for processing. The BOD that returns these
    errors could either be a Acknowledgement or a Confirm depending on the
    verb that was used to send the BOD. If a Process verb is used, then an
    Acknowledgement Verb is the appropriate response. Confirm BOD could
    technically be used in almost any situation, but it is an OAGi
    recommendation that application level errors be handled where possible by
    the corresponding response Verb.</para>

    <para>The following messages may occur at a ConfirmBOD or SOAP Fault
    level. This depends on how the implementation is architect-ed on the back
    end system. While the ConfirmBOD can send back Warnings, SOAP Faults are
    restricted to errors that stop processing of the message. Warnings are not
    included in the list for this reason. There are also some concerns about
    warnings on how these should be handled from an interoperability
    standpoint.</para>

    <para>All of the codes listed in the following table are to be treated as
    ERRORS.</para>

    <para><important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1013'>STAR1013:</glossterm> ConfirmBOD
        reason codes that are sent at the Warning or Informational status,
        should not trigger a resending of the BOD.</para>
      </important></para>

    <informaltable>
      <tgroup cols='2'>
        <tbody>
          <row>
            <entry><emphasis role='bold'>Description</emphasis></entry>

            <entry><emphasis role='bold'>Code</emphasis></entry>
          </row>

          <row>
            <entry>A doucment already exists. This may happen for a BOD such
            as ProcessPartsOrder where the document identifiers to another
            existing parts order from the same dealer.</entry>

            <entry>Duplicate Document</entry>
          </row>

          <row>
            <entry>One or more required data elements have invalid
            values.</entry>

            <entry>Invalid Required Value</entry>
          </row>

          <row>
            <entry>The operation that cannot be performed, such as Change or
            Cancel based on the receiver's business rules and the condition of
            the document. For example, the part order has already been shipped
            therefore the order cannot be cancelled.</entry>

            <entry>Cannot Perform</entry>
          </row>

          <row>
            <entry>One or more required fields are missing.</entry>

            <entry>Required Field Missing</entry>
          </row>

          <row>
            <entry>An error (e.g. database server is down) on the server
            prevented the execution of the BOD. The client will have to resend
            the BOD at a later time.</entry>

            <entry>Server Error</entry>
          </row>

          <row>
            <entry>The client attempts to perform an operation that is not
            permitted. An example of when this may occur is if the dealer
            attempts to order a part when their account is placed on hold.
            This is to be used for authorization errors</entry>

            <entry>Not Permitted</entry>
          </row>

          <row>
            <entry>The received BOD or BOD version is not supported by the
            receiver.</entry>

            <entry>BOD Not Supported</entry>
          </row>

          <row>
            <entry>The structure of the BOD is not valid. For example, the BOD
            failed schema validation.</entry>

            <entry>Invalid Structure</entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </section>
</chapter>

    <chapter id='Security' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Security.xml'>
  <title>Security</title>

  <section>
    <title>Overview</title>

    <para>The following sections define the implementation details to meet the
    Star Transport Guidelines security requirements when using Web Services.
     </para>

    <para>The following specifications are used to accomplish secure web
    services communication until further clarifications and standards emerge
    from the Web Services Security technical committee in Oasis:</para>

    <orderedlist>
      <listitem>
        <para>HTTPS: Provides a secure transport channel</para>
      </listitem>

      <listitem>
        <para>Web Services Security: SOAP Messaging Security V1.0: Provides
        the framework for SOAP messaging security.</para>
      </listitem>

      <listitem>
        <para>Web Services Security: Username Token Profile V1.0: Describes
        user authentication tokens.</para>
      </listitem>
    </orderedlist>

    <para>The security methods described in this section can be applied to all
    the web services methods mentioned earlier on both requests and responses.
    Communication partners will need to agree on which security methods to use
    and on which types of communication. The choice will also be affected by
    business rules, performance and information sensitivity. As a base
    standard all STAR endpoints and clients MUST send information encrypted
    using HTTPS and comply with the security requirements outlined by the WS-I
    Basic Security Profile 1.0.</para>

    <para><important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1004'>STAR1004</glossterm> : All
        implementations are REQUIRED to send information over HTTPS.</para>
      </important></para>
  </section>

  <section>
    <title>WS-I Basic Security Profile</title>

    <para>WS-I Basic Security Profile 1.0 consists of a set of non-proprietary
    web services specifications, along with clarifications to and
    amplifications of those specifications which promote
    interoperability.</para>

    <important>
      <title>STAR Level 1 Requirement</title>

      <para><glossterm linkend='STAR1008'>STAR1008</glossterm> : All services
      and clients must be compliant to the general Security requirements
      Outlined by the WS-I Basic Security Profile 1.0 .The optional attributes
      defined in the Profile is also to be relaxed in the STAR
      Implementation.</para>
    </important>

    <para>STAR Level 1 implementations when using Username/Password for
    authentication <emphasis role='bold'>MUST</emphasis> implement the rules
    specified by the WS-I Basic Security Profile.</para>
  </section>

  <section>
    <title>WS-Security SOAP Header</title>

    <para>WS-Security defines the Security SOAP header to carry security
    information in SOAP messages. Information included in this element
    includes, but not limited to, authentication credentials, digital
    signatures, and encryption references.  To specify security information
    for intermediary processing, use the actor element on the Security SOAP
    header.  WS-Security specifies the wsu:Timestamp element as a child of the
    wsse:Security header.</para>

    <example>
      <title>Sample of WS-Security</title>

      <programlisting xml:space='preserve'>&lt;soap:Header&gt;
   ...
   &lt;wsse:Security&gt;
      &lt;wsu:Timestamp&gt;
         &lt;wsu:Created&gt;2003-06-04T03:48:32Z&lt;/wsu:Created&gt;
         &lt;wsu:Expires&gt;2003-06-04T03:53:32Z&lt;/wsu:Expires&gt;
      &lt;/wsu:Timestamp&gt;
      ...
   &lt;/wsse:Security&gt;
   ...
&lt;/soap:Header&gt;</programlisting>
    </example>
  </section>

  <section>
    <title>Authentication</title>

    <para>The STAR Transport Group has selected Username/Password as the base
    method of authentication. The ability to authenticate via username and
    password is a base standard that all services must implement for the sake
    of interoperability.</para>

    <para><important>
        <title>STAR Level 1 Requirement</title>

        <para><glossterm linkend='STAR1003'>STAR1003</glossterm> : All
        implementations are required to support Username/Password for
        authentication.</para>
      </important></para>

    <section>
      <title>Username and Password</title>

      <para>WS-Security defines a UsernameToken element to be used to pass the
      username and password. Below is the XML syntax of this element.</para>

      <example>
        <title>WS-Security Username and Passoword</title>

        <programlisting xml:space='preserve'>&lt;wsse:UsernameToken wsu:Id="..."&gt;
   &lt;wsse:Username&gt;...&lt;/wsse:Username&gt;
   &lt;wsse:Password Type="..."&gt;...&lt;/wsse:Password&gt;
   &lt;wsse:Nonce&gt;...&lt;/wsse:Nonce&gt;
   &lt;wsu:Created&gt;...&lt;/wsu:Created&gt;
&lt;/wsse:UsernameToken&gt;</programlisting>
      </example>

      <para>Two methods to include the password are supported:</para>

      <orderedlist>
        <listitem>
          <para>Plain Text, in which the password is passed in clear
          text</para>
        </listitem>

        <listitem>
          <para>Hashed, in which the password is not transmitted, but instead,
          a one-way hash is generated from the password and used for
          authentication</para>
        </listitem>
      </orderedlist>

      <para>If a clear text password is used then it is required that the
      appropriate transport level encryption is used, such as HTTPS.  All
      passwords must be stored or persisted in an encrypted format.</para>
    </section>

    <section>
      <title>The Username element</title>

      <para>The &lt;wsse:Username&gt; element carries the client identifier.
      For example, if the client is a dealer and the service provider is an
      OEM, the Username element will be the dealer’s identifier. Different
      service providers require different types of identifications to identify
      their clients. Therefore, the syntax of this element is flexible and
      will be agreed upon between the two communication partners.</para>

      <example>
        <title>Username Element</title>

        <programlisting xml:space='preserve'>&lt;wsse:Username&gt;JohnDoe&lt;/wsse:Username&gt;</programlisting>
      </example>

      <para>Below are other possible examples on using the username
      field:</para>

      <example>
        <title>Dealer Number</title>

        <programlisting xml:space='preserve'>&lt;wsse:Username&gt;123456&lt;/wsse:Username&gt;</programlisting>
      </example>

      <example>
        <title>Unique ID that Identifies Dealer</title>

        <programlisting xml:space='preserve'>&lt;wsse:Username&gt;JohnDoe&lt;/wsse:Username&gt;</programlisting>
      </example>

      <example>
        <title>Combination Dealer Number and ID</title>

        <programlisting xml:space='preserve'>&lt;wsse:Username&gt;123456\JohnDoe&lt;/wsse:Username&gt;</programlisting>
      </example>
    </section>

    <section>
      <title>Plain Text Password</title>

      <para>A password can be sent in clear text if a secure communication
      channel, such as HTTPS, is available between the sender and the
      receiver.</para>

      <example>
        <title>Plain Text Password</title>

        <programlisting xml:space='preserve'>&lt;wsse:Security soap:mustUnderstand="1"&gt;
   &lt;wsu:Timestamp&gt;
      &lt;wsu:Created&gt;2003-06-04T03:48:32Z&lt;/wsu:Created&gt;
      &lt;wsu:Expires&gt;2003-06-04T03:53:32Z&lt;/wsu:Expires&gt;
   &lt;/wsu:Timestamp&gt;
   &lt;wsse:UsernameToken&gt;
      &lt;wsse:Username&gt;JohnDoe&lt;/wsse:UserName&gt;
      &lt;wsse:Password
    Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&gt;Password&lt;/wsse:Password&gt;
   &lt;/wsse:UsernameToken&gt;
&lt;/wsse:Security&gt;</programlisting>
      </example>
    </section>

    <section>
      <title>Password Digest  </title>

      <para>When a secure channel is not available, or when the message goes
      through intermediaries, a password digest can be used to avoid revealing
      the password. WS-Security defines fields and algorithms to carry
      authentication information securely. The specifications use a one-way
      hashing algorithm, SHA1, to encrypt the combination of the password, a
      time stamp, the creation date/time, and a nonce (randomly generated
      string) to generate a digest.  The resulting digest is base 64 encoded
      SHA1 hash value that is carried in the UsernameToken and verified on the
      server side.</para>

      <para>Below is an example of a UsernameToken carrying a password
      digest:</para>

      <example>
        <title>Password Digest</title>

        <programlisting xml:space='preserve'>&lt;wsse:Security soap:mustUnderstand="1" &gt;
   &lt;wsu:Timestamp&gt;
      &lt;wsu:Created&gt;2003-06-04T03:48:32Z&lt;/wsu:Created&gt;
      &lt;wsu:Expires&gt;2003-06-04T03:53:32Z&lt;/wsu:Expires&gt;
   &lt;/wsu:Timestamp&gt;
   &lt;wsse:UsernameToken wsu:Id="SecurityToken-8a45f51b-fe46-4715-bdae-e596c36ad6be"&gt;
      &lt;wsse:Username&gt;JohnDoe&lt;/wsse:Username&gt;
      &lt;wsse:Password
        Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"&gt;
         RvaxAmb2KhEQpFFJE+YXcyRy6E8==
      &lt;/wsse:Password&gt;
      &lt;wsse:Nonce&gt;X6y15GC/WLYP8XY/YR3iIQ==&lt;/wsse:Nonce&gt;
      &lt;wsu:Created&gt;2003-06-04T03:48:32Z&lt;/wsu:Created&gt;
   &lt;/wsse:UsernameToken&gt;
&lt;/wsse:Security&gt;         </programlisting>
      </example>

      <para>The advantages of the digest method over the clear text method
      are:</para>

      <orderedlist>
        <listitem>
          <para>Passwords are not transmitted over the wire</para>
        </listitem>

        <listitem>
          <para>Since the Created element is included in the generation of the
          digest, the message recipient can reduce the risk of replay attacks
          by inspecting this element and rejecting messages that are older
          than a set time window.</para>
        </listitem>

        <listitem>
          <para>To further reduce the risk of replay attacks the recipient can
          reject all messages that come with duplicate nonce values since
          nonces are generated to be unique. To accomplish this functionality,
          the server needs to store the nonce values of incoming messages for
          a period of time greater or equal to the expiration duration of the
          message, and compare the nonces of incoming messages to the stored
          ones.</para>
        </listitem>
      </orderedlist>

      <para>There are situations in which a password digest cannot be used,
      such as when the password is not available to both: the client and the
      server (when using LDAP binding, for example).</para>
    </section>
  </section>

  <section>
    <title>Security Error Handling</title>

    <para>The WS-Security specifications define a set of SOAP Fault codes to
    describe different error situations that may occur during the parsing of
    the security headers and authenticating or authorizing the requests.
    Sending a SOAP Fault back is not required because this could be used as
    part of a denial of service or cryptographic attack. However, if an error
    is sent back, it MUST use the SOAP Faults defined in the WS-Security
    specifications.</para>

    <para>Here is a list of the fault codes as defined in WS-Security
    1.0:</para>

    <informaltable frame='all'>
      <tgroup cols='2'>
        <tbody>
          <row>
            <entry><para>Fault Code</para></entry>

            <entry><para>Description (Fault String)</para></entry>
          </row>

          <row>
            <entry><para>wsse:UnsupportedSecurityToken</para></entry>

            <entry><para>An unsupported token was provided</para></entry>
          </row>

          <row>
            <entry><para>wsse:UnsupportedAlgorithm</para></entry>

            <entry><para>An unsupported signature or encryption algorithm was
            used</para></entry>
          </row>

          <row>
            <entry><para>wsse:InvalidSecurity</para></entry>

            <entry><para>An error was discovered processing the
            &lt;wsse:Security&gt; header.</para></entry>
          </row>

          <row>
            <entry><para>wsse:InvalidSecurityToken</para></entry>

            <entry><para>An invalid security token was provided</para></entry>
          </row>

          <row>
            <entry><para>wsse:FailedAuthentication</para></entry>

            <entry><para>The security token could not be authenticated or
            authorized</para></entry>
          </row>

          <row>
            <entry><para>wsse:FailedCheck</para></entry>

            <entry><para>The signature or decryption was
            invalid</para></entry>
          </row>

          <row>
            <entry><para>wsse:SecurityTokenUnavailable</para></entry>

            <entry><para>Referenced security token could not be
            retrieved</para></entry>
          </row>

          <row>
            <entry><para>wsu:MessageExpired</para></entry>

            <entry><para>Security semantics are expired.</para></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </section>
</chapter>
  </part>

  <part label='Part II'>
    <title>STAR Level Two</title>

    <partintro>
      <para>This section describes the necessary components and pieces that
      all STAR Level 2 compliant implementations must implement.</para>

      <literallayout format='linespecific' class='normal'>
            <xref linkend='Security_Level2'></xref>
            <xref linkend='ReliableMessaging'></xref>
            <xref linkend='Attachments'></xref>
        </literallayout>
    </partintro>

    <chapter id='Security_Level2' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/SecurityTwo.xml'>
  <title>Enhanced Security</title>

  <section>
    <title>Overview</title>

    <para>The following sections define the implementation details to meet the
    STAR Transport Guidelines security requirements when using Web Services
    for STAR Level 2 requirements.  All security requirements from STAR Level
    1 still apply to STAR Level 2.</para>

    <para>The following specifications are used to accomplish secure web
    services communication until further clarifications and standards emerge
    from the Web Services Security technical committee in Oasis:</para>

    <orderedlist>
      <listitem>
        <para>HTTPS: Provides a secure transport channel</para>
      </listitem>

      <listitem>
        <para>Web Services Security: SOAP Messaging Security V1.0: Provides
        the framework for SOAP messaging security.</para>
      </listitem>

      <listitem>
        <para>Web Services Security: X.509 Token Profile V1.0: Describes the
        use of digital certificates.</para>
      </listitem>
    </orderedlist>

    <para>The security methods described in this section must be applied to
    all the web services methods mentioned earlier on both requests and
    responses.</para>

    <para><note>
        <para>STAR Level 2 implementations must still implement all
        requirements from STAR Level 1 in regards to security. STAR Level 2
        requirements are enhancements to STAR Level 1. Implementations must
        fall back gracefully to STAR Level 1 if the trading partner can not
        support the STAR Level 2 requirements.</para>
      </note></para>
  </section>

  <section>
    <title>WS-I Conformance Claim</title>

    <para>In order to help inform clients and trading partners consuming a
    STAR Level 2 service using Digital Certificates for authentication, it is
    recommended that STAR implementations state their conformance to the WS-I
    Basic Security Profile.</para>

    <example>
      <title>WS-I Basic Security Profile Conformance Claim</title>

      <programlisting>&lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"
  xmlns:tns="http://example.org/myservice"
  xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap"
  xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
  targetNamespace="http://example.org/myservice"&gt;
  &lt;wsdl:portType name="MyPortType"&gt;
      ...
  &lt;/wsdl:portType&gt;
  &lt;wsdl:binding name="MyBinding" portType="MyPortType" &gt;
      ...
  &lt;/wsdl:binding&gt;
  &lt;wsdl:service name="MyService" &gt;
    &lt;wsdl:port name="MyPort" binding="tns:MyBinding" &gt;
      &lt;wsdl:documentation&gt;
        &lt;wsi:Claim
         conformsTo=”http://ws-i.org/profiles/basic-security/1.0/x.509-certificate-token” /&gt;
      &lt;/wsdl:documentation&gt;
      &lt;soapbind:address 
       location="http://example.org/myservice/myport" /&gt;
    &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
&lt;/wsdl:definitions&gt;</programlisting>
    </example>

    <para>By including the conformance claim within the WSDL for a service,
    clients of the service are made aware of the endpoint's conformance to the
    specified target. Clients can then test to make sure that their
    implementations are conformant as well as verify that the web service is
    indeed conformant to the specified profile/target.</para>

    <section>
      <title>WS-I Basic Security Profile</title>

      <para>WS-I Basic Security Profile 1.0 consists of a set of
      non-proprietary web services specifications, along with clarifications
      to and amplifications of those specifications which promote
      interoperability.</para>

      <para>STAR Level 2 implementations when using Digital Certificates for
      authentication <emphasis role='bold'>MUST</emphasis> implement the rules
      specified by the WS-I Basic Security Profile. In particular
      implementations must be conformant to section 12.</para>

      <formalpara>
        <title>Conformance Targets</title>

        <para>Conformance targets identify what artifacts (e.g., SOAP message,
        WSDL description) or parties (e.g., SOAP processor, end user)
        requirements apply to . This allows for the definition of conformance
        in different contexts, to assure unambiguous interpretation of the
        applicability of requirements, and to allow conformance testing of
        artifacts (e.g., SOAP messages and WSDL descriptions) and the behavior
        of various parties to a Web service (e.g., clients and service
        instances). STAR implementations or derivation of STAR transport web
        services will align to one of the conformance targets as mentioned in
        the <ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#conformance_targets'>Basic
        Security Profile 1.0</ulink>.</para>
      </formalpara>

      <para><important>
          <title>STAR Level Two Requirement</title>

          <para><glossterm linkend='STAR2002'>STAR2002</glossterm>:
          Implementations must conform to section 12, "<ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#x509token'>X.509
          Certificate Token</ulink>" of the <ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html'>WS-I
          Basic Security Profile 1.0</ulink>.</para>
        </important></para>

      <para>The WS-I Basic Security Profile indicates that the
      BinarySecurityToken Value Type attribute be <emphasis>http://
      docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</emphasis>.
      If referencing a certificate path, the BinarySecurityToken should be one
      of:</para>

      <itemizedlist>
        <listitem>
          <para>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509PKIPathv1</para>
        </listitem>

        <listitem>
          <para>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#PKCS7</para>
        </listitem>
      </itemizedlist>

      <para>The profile indicates that X509PKIPathv1 is recommended for
      efficiency.</para>
    </section>
  </section>

  <section>
    <title>Digital Certificates</title>

    <para>Digital certificates can be used for a number of purposes, including
    digital signatures, data encryption, or server and client authentication.
    Certificates are typically used to establish or verify the identity of one
    or both parties in an electronic conversation. For those that need a
    higher level of security than is provided by the STAR Level 1 requirement
    of username/password authentication, STAR requires the use of Digital
    Certificates for authentication.<important>
        <title>STAR Level Two Requirement</title>

        <para><glossterm linkend='STAR2001'>STAR2001</glossterm>: Level 2
        implementations must use X509 certificates.</para>
      </important></para>

    <section>
      <title>Certificate Sources</title>

      <para>Digital certificates can be used for a number of purposes,
      including digital signatures, data encryption, or server and client
      authentication. Certificates are typically used to establish or verify
      the identity of one or both parties in an electronic
      conversation.</para>

      <section>
        <title>Certificate Authorities</title>

        <para>In order for certificates to be useful, each party must be able
        to determine that the certificate they receive from the other party is
        genuine and that it has not been forged or tampered with. The PKI
        infrastructure provides this through the use of the Certificate
        Authority (CA). A CA is a trusted party that issues certificates on
        behalf of the parties that they represent. A certificate issued by a
        CA will contain the CA's "digital signature" to verify that the
        certificate is authentic. The party receiving the certificate can
        compare the CA signature to a copy that it maintains in its local
        certificate store to verify its authenticity.</para>
      </section>

      <section>
        <title>Third-Party Signed Certificates</title>

        <para>Verisign, Entrust, and Thawte are all well-known CAs.  A
        certificate provided by a well-known CA will contain its root
        certificate, and possibly an intermediate certificate. The example
        below is a certificate that was signed by Verisign.  If the CA is
        trusted by an organization that is confident of its identity, its
        public root certificate and any intermediate certificates can be added
        to a trusted root keystore. Applications that use the keystore should
        accept any certificates that contain a valid signature from the
        trusted CA, with the exception of those certificates that the CA may
        distribute in a Certificate Revocation List (CRL). Third-Party
        certificates are most commonly used as server side SSL certificates,
        however they can be used for client certificates as well.</para>

        <para>All modern web browsers come pre-loaded with the root
        certificates for the well-known CAs in their trusted certificate
        keystore. If you are building a custom solution that does not require
        a web browser, you can either clone the keystore that ships with any
        browser or manually import the certificates into your trusted
        keystore.</para>

        <para>While the well-known CAs can be a reliable certificate source,
        they can also become expensive. Certificates from one of the
        well-known CAs must be purchased, typically on an annual basis. If you
        plan to generate many certificates then this method could become
        cost-prohibitive.</para>

        <para><figure id='SecurityL2_ThirdPartyCA'>
            <title>Example of Certificate Signed by Third Party CA</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref='Images/ThirdPartyCA.jpg'></imagedata>
              </imageobject>
            </mediaobject>
          </figure></para>
      </section>

      <section>
        <title>Private CA-Signed Certificates</title>

        <para>The PKI infrastructure allows any organization to create its own
        private CA for signing its own certificates. Certificates signed by a
        private CA will look similar to those signed by a well-known CA in
        that the root certificate within the chain will belong to the CA.
        <xref linkend='SecurityL2_PrivateCA'></xref> is an example of a certificate
        signed by a private CA.</para>

        <para><figure id='SecurityL2_PrivateCA'>
            <title>Example of Certificate Signed by Private CA</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref='Images/SignedPrivateCA.jpg' id='SecurityL2_ThirdPartyCA'></imagedata>
              </imageobject>
            </mediaobject>
          </figure></para>

        <para>The benefit of using a private CA is that the organization does
        not have to purchase its certificates. The drawback to using a private
        CA is that the CA’s root certificate will not come pre-loaded with any
        of the commercially shipped keystores. The owner of the CA will
        typically perform an out-of-band communication with its business
        partners to verify its identity. The CA owner will then provide each
        of its business partners with a copy of its public root certificate.
        The business partners can then import the root certificate into their
        local trusted certificate keystore. Any certificates signed by the CA
        can then be validated against the root certificate in their trusted
        keystore.  </para>

        <para>While private CAs may not provide the industry-wide validation
        that well-known CAs offer, they can still offer a safe and reliable
        solution for using certificates.</para>
      </section>

      <section>
        <title>Self-Signed Certificates</title>

        <para>The third method of generating a certificate is to use a
        self-signed certificate. A self-signed certificate is exactly what the
        name implies; a certificate signed only by the creator of the
        certificate. It cannot be traced back to a signing authority and,
        therefore, its authenticity cannot be verified. <xref linkend='SecurityL2_SelfSigned1'></xref> and <xref linkend='SecurityL2_SelfSigned2'></xref> show an example of a self-signed
        certificate.</para>

        <para><figure id='SecurityL2_SelfSigned1'>
            <title>Example of Self-Signed Certificate</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref='Images/SelfSigned1.jpg'></imagedata>
              </imageobject>
            </mediaobject>
          </figure> <figure id='SecurityL2_SelfSigned2'>
            <title>Example of Self-Signed Certificate Imported</title>

            <mediaobject>
              <imageobject>
                <imagedata fileref='Images/SelfSigned2.jpg'></imagedata>
              </imageobject>
            </mediaobject>
          </figure></para>

        <para>Self-signed certificates are typically used for development
        purposes as they are easier to create than CA-issued certificates,
        however your business partners must load the public key for each of
        your self-signed certificates into their trusted keystore to prevent
        their applications from throwing errors or warnings. With CA-signed
        certificates, your business partners only need to load the root
        certificate for the CA into their keystore and all certificates
        generated by the CA will be validated.</para>

        <para>When self-signed certificates are used as server SSL
        certificates it may present some issues for your business partners. If
        they are using an SSL appliance their network security group may not
        be comfortable installing a self-signed certificate into the
        appliance’s keystore. This could cause the appliance to reject the SSL
        sessions.</para>

        <para>Self-signed certificates are commonly used for digital
        signatures or data encryption. Each party will generate a signing or
        encryption certificate and perform an out-of-band exchange of their
        public keys using a trusted method to ensure that the source of the
        certificate is known.</para>
      </section>

      <section>
        <title>Summary</title>

        <orderedlist>
          <listitem>
            <para>Third-party certificates signed by a well-known CA can
            always be validated, however they must be purchased, typically on
            an annual basis</para>
          </listitem>

          <listitem>
            <para>Private CA-signed certificates provide traceability without
            the cost of third-party certificates, however the root certificate
            for the CA must be provided to each of your business
            partners</para>
          </listitem>

          <listitem>
            <para>Self-signed certificates are the simplest to create, making
            them ideal for development purposes. They are also commonly used
            for signing or payload encryption.  They provide no traceability
            to a trusted CA, however and they may cause issues with SSL
            appliances if used as server SSL certificates.</para>
          </listitem>

          <listitem>
            <para>Securing Web Servers and XML Data with SSL. <biblioref linkend='Ref_Securing_WebServers'></biblioref></para>
          </listitem>
        </orderedlist>
      </section>
    </section>
  </section>

  <section>
    <title>Attachment Security</title>

    <para>This section provides guidance for protecting attachments when they
    are used with SOAP Messages. Note that STAR Conformance all features
    described in the Basic Security Profile 1.0, including support for
    attachments and security for attachments in any form by any instance is
    not required. It is addressed as part of STAR Transport Large File
    handling mechanism.</para>
  </section>
</chapter>
    <chapter id='ReliableMessaging' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/ReliableMessaging.xml'>
  <title>Reliable Messaging</title>

  <section>
    <title>Overview</title>

    <para>Reliable Messaging can be critical to asynchronous Web Services
    communication and is <emphasis role='bold'>REQUIRED</emphasis> as part of
    the STAR Level 2 Rules. The STAR Web Services specification is based upon
    the OASIS WS-ReliableMessaging specification v1.1 . This specification
    provides the foundations for providing enhanced Web Service communication
    with the following capabilities to assist in guaranteeing delivery:
    Delivery assurances, Delivery Notification, Conversational integrity, and
    Failure notification. WS-ReliableMessaging supports all of the STAR
    Delivery Assurance profiles.</para>

    <para>WS-ReliableMessaging has close ties to the WS-Policy framework and
    recommends the use of WS-Security specifications. WS-Policy can be used
    with reliable messaging but is currently not a requirement.</para>

    <para>WS-Reliable Messaging Version 1.1 was formally adopted by OASIS in
    June of 2007. Currently, the WS-I Reliable and Secure Profile, is in draft
    status, and part of the work is based on the new WS-ReliableMessaging 1.2
    specification. Some of the Rules for interoperability are based off of
    profiles from WS-I Reliable and Secure profile. As this profile is
    updated, STAR will update these requirements. Due to differences in the
    versions of Reliable Messaging supported by the profile, STAR has modified
    the rules slighty.</para>

    <para>For more information on what Reliable Messaging is, and what is is
    used for, the InfoQ article by Paul Freemantle, "An Introduction to Web
    Services Reliable Messaging" <xref linkend='Ref_Freemantle'></xref> is a good
    starting point. Freemantle covers the basics of WS-ReliableMessaging 1.1,
    and also reviews the changes that have occured since WS-ReliableMessaging
    1.0 was introduced. Several examples in this chapter are based on his
    article.</para>

    <section>
      <title>Terms and Definitions</title>

      <para>As with any specification, there are terms and definitions that
      should be established. The following terms and definitions are use
      throughout this chapter.</para>

      <itemizedlist>
        <listitem>
          <para><emphasis role='bold'>Endpoint</emphasis> - An entity,
          processor, or resource that can be referenced where Web service
          messages are originated or targeted.</para>
        </listitem>

        <listitem>
          <para><emphasis role='bold'>Initial Sender</emphasis> - The endpoint
          which sends a message.</para>
        </listitem>

        <listitem>
          <para><emphasis role='bold'>Ultimate Receiver</emphasis> - The
          endpoint to which a message is delivered.</para>
        </listitem>

        <listitem>
          <para><emphasis role='bold'>Delivery Assurance</emphasis> - The
          guarantee that the messaging infrastructure provides on the delivery
          of a message.</para>
        </listitem>

        <listitem>
          <para><emphasis role='bold'>Source</emphasis> - The endpoint that
          transmits the message.</para>
        </listitem>

        <listitem>
          <para><emphasis role='bold'>Destination</emphasis> - The endpoint
          that receives the message.</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Reliable Messaging Namespaces</title>

      <informaltable frame='all'>
        <tgroup cols='2'>
          <tbody>
            <row>
              <entry><para><emphasis>Prefix</emphasis></para></entry>

              <entry><para><emphasis>Namespace</emphasis></para></entry>
            </row>

            <row>
              <entry><para>soap</para></entry>

              <entry><para>http://schemas.xmlsoap.org/soap/envelope/</para></entry>
            </row>

            <row>
              <entry><para>wsa</para></entry>

              <entry><para>http://www.w3.org/2005/08/addressing</para></entry>
            </row>

            <row>
              <entry>wsam</entry>

              <entry>http://www.w3.org/2007/02/addressing/metadata</entry>
            </row>

            <row>
              <entry><para>xsd</para></entry>

              <entry><para>http://www.w3.org/2001/XMLSchema</para></entry>
            </row>

            <row>
              <entry>wsmc</entry>

              <entry>http://docs.oasis-open.org/ws-rx/wsmc/200702</entry>
            </row>

            <row>
              <entry><para>wsrm</para></entry>

              <entry><para>http://docs.oasis-open.org/ws-rx/wsrm/200702</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
  </section>

  <section>
    <title>Reliable Messaging Construct</title>

    <para>Reliable Messaging is based on a conversation between a client and
    server. There are many different ways this convesation can take place and
    all Reliable Messaging frameworks that are being used for STAR
    implementations should support all of these profiles.</para>

    <para><note>
        <title>Reliable Messaging 1.0 Difference</title>

        <para>In Reliable Messaging 1.0 these profiles were built into the
        protocol. In Reliable Messaging 1.1, these are not sent across the
        wire, but are configured using policy profiles. It is the
        responsibility of the framework to guarantee the correct reliablity is
        being used.</para>
      </note></para>

    <informaltable frame='all'>
      <tgroup cols='2'>
        <tbody>
          <row>
            <entry><para><emphasis>QName</emphasis></para></entry>

            <entry><para><emphasis>Delivery
            Assurance</emphasis></para></entry>
          </row>

          <row>
            <entry><para>AtMostOnce</para></entry>

            <entry><para>The messages in the sequence will be delivered to the
            application without duplication. If a message was to be
            accidentally delivered more than one time, this ensures that all
            additional instances of the message are thrown away. It is
            possible that messages may not be delivered</para></entry>
          </row>

          <row>
            <entry><para>AtLeastOnce</para></entry>

            <entry><para>The messages in the sequence are assured to be
            delivered to the application at least once. If a message is
            delivered more than once, it is not thrown away and is accepted.
            This could result in a duplicate message. If a message cannot be
            delivered an error message would be raised.</para></entry>
          </row>

          <row>
            <entry><para>ExactlyOnce</para></entry>

            <entry><para>The messages in the sequence are assured to be
            delivered exactly once. This assertion is equivalent to AtMostOnce
            and AtLeastOnce. In this case the message is guaranteed to be
            delivered or an error is raised and any messages that arrive more
            than one time are thrown away.</para></entry>
          </row>

          <row>
            <entry><para>InOrder</para></entry>

            <entry><para>The messages in the sequence are assured to be
            delivered to the application in the order they were sent. This is
            important when multiple messages make up a sequence and the order
            in which they arrive and or are processed is critical. When this
            assertion is set, this will ensure that the receiving application
            will be delivered the messages in the correct order. All messages
            that are sent within a sequence have a message number, to keep
            track of the ordering.</para></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>

    <section>
      <title>Message Sequencing</title>

      <para>Reliable Messaging is based on a Sequence of events. The various
      profiles of Reliable Messaging listed below will help determine what the
      sequence will look like. Sometimes just the client will send a sequence,
      and other times both client and server may send independent sequence
      numbers. It is up to the framework implementing Reliable Messaging to
      keep track of the sequences and acknowledgements where necessary. A
      general conversation is depicted in <xref linkend='Fig_ReliableMessaging'></xref>.</para>

      <para><figure id='Fig_ReliableMessaging'>
          <title>Reliable Messaging Conversation Sequence</title>

          <mediaobject>
            <imageobject>
              <imagedata align='center' fileref='Images/ReliableMessaging.png' format='PNG' scalefit='1'></imagedata>
            </imageobject>
          </mediaobject>
        </figure></para>

      <para>Trading partners may use WS-Policy to estabilish the Assurance
      Profiles for the Reliable Messaging conversation. In regards to how the
      messages may look when transmitted, Paul Freemantle's article provides
      several useful examples.</para>

      <para><example>
          <title>Reliable Messaging Create Sequence</title>

          <para><programlisting>&lt;soap:body&gt;
  &lt;wsrm:createsequence&gt;
    &lt;wsrm:acksto&gt;
      &lt;wsa:address&gt;http://Business456.com/serviceA/789&lt;/wsa:address&gt;
    &lt;/wsrm:acksto&gt;   
  &lt;/wsrm:createsequence&gt;
&lt;/soap:body&gt;</programlisting></para>
        </example>A Reliable Messaging conversation will always start with a
      <emphasis role='bold'>CreateSequence</emphasis> and may be terminated
      with a <emphasis role='bold'>TerminateSequence</emphasis> message. If a
      <emphasis role='bold'>TerminateSequence</emphasis> is not sent, a
      framework may use a predefined timeout to automatically terminate the
      sequence. In between there can be zero-or-many acknowledgements that
      appear in the soap:header. These acknowledgements are in response to the
      message sequences that have been received.</para>

      <para><example>
          <title>Reliable Messaging Header Acknowledgements</title>

          <para><programlisting>&lt;soap:header&gt;
  &lt;wsrm:sequenceacknowledgement&gt;
    &lt;wsrm:identifier&gt;http://Business456.com/RM/ABC&lt;/wsrm:identifier&gt;
    &lt;wsrm:acknowledgementrange lower="1" upper="1" /&gt;
    &lt;wsrm:acknowledgementrange lower="3" upper="3" /&gt;    
  &lt;/wsrm:sequenceacknowledgement&gt;
&lt;/soap:header&gt;</programlisting>Each of the above acknowledgement refers
          to a Sequence Message number that was sent during a
          conversation.</para>
        </example><example>
          <title>Reliable Messaging Header Message Sequence Number</title>

          <para><programlisting>&lt;soap:header&gt;
  &lt;wsrm:sequence&gt;
    &lt;wsrm:identifier&gt;http://Business456.com/RM/ABC&lt;/wsrm:identifier&gt;
    &lt;wsrm:messagenumber&gt;1&lt;/wsrm:messagenumber&gt;
  &lt;/wsrm:sequence&gt;
&lt;/soap:header&gt; </programlisting>The message numbers are usually
          incremented by one for each of the messages sent. Once the client
          wants to terminate the conversation with the server, and has sent
          all of it's sequences, it will send a <emphasis role='bold'>TerminateSequence</emphasis> message. Once a
          conversation has been terminated, no more acknowdlegments can occur
          for that converstation.</para>
        </example></para>
    </section>

    <section>
      <title>WS-MakeConnection and Non-Addressable End Points</title>

      <para>Reliable Messaging 1.1 has the ability to establish a reliable
      delivery system with a server that may not be addressable all the time.
      During a conversation, a server may set an alternative method to
      retrieve the rest of the messages. If the conversation is broken, or
      lost in the middle, the client may try to re-establish the conversation
      using the MakeConnection protocol. The client will "poll" periodically,
      to try and establish a connection at the Address specified by the
      makeconnection element. Once connection is estabilished it will send the
      request for the message that it needs to receive, and the server will
      respond back with the message and an indicator if there are any more
      messages waiting to be sent. <xref linkend='Ref_WS_MC'></xref></para>

      <para>This allows for a server to be off line and for the conversation
      to be re-established. Some dealerships are still using dial up
      connections and limited broadband connections that may not always be
      connected. WS-MakeConnection is the recommended way to continue this
      conversation and deliver the messages.</para>

      <para>MakeConnection may also be used in those situations where a long
      running process may occur. For example, a client sends a
      ProcessPartsOrder BOD to a server. Depending on the size and complexity
      of the PartsOrder BOD it may take a while to process. The server will
      drop the connection, and the client can try to establish a connection
      through MakeConnection. If the a response is waiting for the client, it
      will be sent, otherwise, the server will drop the connection. Eventually
      the process finishes and the next time the client connects, the message
      is sent. There may be multiple responses waiting for the client, if so,
      the server will let the client know about the other messages waiting to
      be delivered. MakeConnection enables a reliable way of working
      asynchronously.</para>
    </section>

    <section>
      <title>WS-ReliableMessaging Standardized Error Handling and
      Monitoring</title>

      <para>WS-ReliableMessage defines general error handling at the SOAP
      level via SOAP Faults. In the context of STAR Reliable Messaging,
      WS-ReliableMessaging provides support for Retry (Retransmission),
      Recovery, TimeOut and Duplicate Detection.</para>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2010'>STAR 2010</glossterm>: Error
          handling is <emphasis role='bold'>REQUIRED</emphasis> to follow the
          recommendations of the WS-I Reliable and Secure Profile in regards
          to handling of errors.</para>
        </important></para>

      <para><emphasis role='bold'>Retry</emphasis></para>

      <para>WS-ReliableMessaging supports retransmission of unacknowledged
      messages. As described above, At-Least-Once and Once-Ane-Only-Once /
      Exactly-Once require the ability to resend messages.
      WS-ReliableMessaging allows for sending implementations to retransmit
      messages if an acknowledgement is not received within an agreed upon
      RetransmissionInterval. The retransmitted message is intended to be
      exactly the same as the original message and at the very least it must
      have the exact same Sequence Identifier and MesageNumber.</para>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2004'>STAR 2004</glossterm>: If a
          message was not able to be sent it <emphasis role='bold'>MUST</emphasis> be retried at least three times.</para>
        </important></para>

      <para><emphasis role='bold'>Recovery Processes / Message
      Store</emphasis></para>

      <para>WS-ReliableMessaging does not directly require persistence of
      messages or specify recovery procedures. STAR requires messages to be
      persisted to non-volatile storage to be able to function through
      component, system or network failures and to be able to support
      duplicate elimination, lookup of messages by Sequence Identifier and
      Message ID and the ability to retransmit messages.</para>

      <para><emphasis role='bold'>Time-Out</emphasis></para>

      <para>WS-ReliableMessaging supports the Time-Out feature through a
      senders ability to specify a Inactivity Time-out and/or
      BaseRetransmissionInterval policy. The receivers also can specify an
      AcknolwedgmentInterval through the use of Policy on return messages or
      through shared policies.</para>

      <para><emphasis role='bold'>Duplicate Detection</emphasis></para>

      <para>WS-ReliableMessaging specifies that to support At-Most-Once and
      Exactly-Once Delivery Assurance Profiles, receivers MUST enable message
      receipt without duplication. Implementation details are not given, but
      at the very least, a receiver MUST prevent duplicates where Sequence
      Identifier and MessageNumber are repeated.</para>
    </section>
  </section>

  <section>
    <title>Meeting STAR Guidelines Requirements</title>

    <para>The STAR Transport Guidelines establish the overall requirements for
    Reliable Messaging. To meet these requirements and to ensure that the
    terminology that is applied correctly maps to comparable Web Services
    features, follow the specifications below.</para>

    <section>
      <title>Message Assurance Profiles</title>

      <para><emphasis role='bold'>Best-Effort</emphasis></para>

      <para>To enable Best-Effort, a message is sent without using any of the
      WS-ReliableMessaging features:</para>

      <itemizedlist>
        <listitem>
          <para>Parties have no WS-Policies related to reliable messaging for
          the messages</para>
        </listitem>

        <listitem>
          <para>No WS-ReliableMessaging headers are present in the
          messages</para>
        </listitem>

        <listitem>
          <para>Only applies to messages without reliability
          requirements</para>
        </listitem>
      </itemizedlist>

      <para>Best-Effort is the implementation supported by the STAR Level 1
      interoperability rules. A STAR Level 2 implementation must support STAR
      Level 1.</para>

      <para><emphasis role='bold'>At-Least-Once</emphasis></para>

      <para>To enable At-Least-Once with WS-ReliableMessaging:</para>

      <itemizedlist>
        <listitem>
          <para>Reliable messaging requirements SHOULD be specified with
          WS-Policy on the message.</para>
        </listitem>
      </itemizedlist>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2003'>STAR 2003</glossterm>:
          "At-Least-Once" requires the sending party to uniquely identify a
          message and the receiving party to acknowledge the receipt of the
          message, giving the sender an auditable record stating that the
          message has been received. If the sender does not receive an
          acknowledgment of receipt in a reasonable amount of time (Time-Out),
          it <emphasis role='bold'>MUST</emphasis> retry the message
          send.</para>
        </important></para>

      <para><emphasis role='bold'>At-Most-Once</emphasis></para>

      <para>To enable At-Most-Once with WS-Reliable Messaging</para>

      <itemizedlist>
        <listitem>
          <para>Reliable messaging requirements SHOULD be specified with
          WS-Policy.</para>
        </listitem>

        <listitem>
          <para>A durable policy store is required, in memory storage is not
          sufficient for detecting duplicate messages.</para>
        </listitem>
      </itemizedlist>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2005'>STAR 2005</glossterm>:
          "At-Most-Once" requires a sending party to uniquely identify
          messages, to retry failed messages and requires the receiving party
          to identify and ignore any duplicate messages. In order to know
          which messages to ignore, it is <emphasis role='bold'>REQUIRED</emphasis> that the receiving party persist
          received messages in a durable store.</para>
        </important></para>

      <para><emphasis role='bold'>Once-And-Only-Once / Exactly
      Once</emphasis></para>

      <para>To enable Once-And-Only-Once / Exactly Once with WS-Reliable
      Messaging</para>

      <itemizedlist>
        <listitem>
          <para>Reliable messaging requirements should be specified with
          WS-Policy.</para>
        </listitem>

        <listitem>
          <para>A durable policy store is required, in memory storage is not
          sufficient for detecting duplicate messages.</para>
        </listitem>
      </itemizedlist>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2006'>STAR 2006</glossterm>:
          "Once-And-Only-Once / Exactly-Once" requires the sender to uniquely
          identify each message and to retry any message that the receiver
          fails to acknowledge. The receiver must acknowledge receipt of
          messages and ignore duplicate messages. It is <emphasis role='bold'>REQUIRED</emphasis> that the receiver persist messages
          in a durable store to enable duplicate elimination.</para>
        </important></para>
    </section>

    <section>
      <title>WS-ReliableMessaging Delivery Assurance Features</title>

      <para><emphasis role='bold'>Message Routing</emphasis></para>

      <para>Message Routing in WS-ReliableMessaging is accomplished through a
      combination of the underlying Transfer protocol and WS-Addressing data
      elements in the messages themselves. Full behavior is detailed under the
      WS-Addressing section.</para>

      <para><note>
          <para>Message Routing</para>

          <para>Most WS-ReliableMessaging v1.1 frameworks have configuration
          options on how message routing should be handled. In some cases they
          may also use the WS-MakeConnection specification to handle those
          situations where an end-point is not always addressable.</para>
        </note></para>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2007'>STAR 2007:</glossterm> For
          indicating Routing information, STAR requires the use of
          WS-Addressing or WS-MakeConnection if the end point is not directly
          addressable.</para>
        </important></para>

      <para><emphasis role='bold'>Acknowledgment of Receipt</emphasis></para>

      <para>Receipt of an acknowledgment indicates that an 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><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2008'>STAR 2008</glossterm>:
          Acknowledgement of Receipts <emphasis role='bold'>MUST</emphasis> be
          enabled during the use of At-Most-Once and Once and Only Once
          reliability.</para>
        </important></para>

      <para>WS-ReliableMessaging clearly defines the format and content of
      Acknowledgment messages. Acknowledgment messages may be stand-alone
      messages or could be returned as part of another message.</para>

      <para>A WS-ReliableMessaging SequenceAcknowledgment is an acknowledgment
      of receipt of one or more messages associated with a unique sequence.
      The message contains the exact Sequence Identifier as sent in the
      original messages and one or more AcknowledgmentRange elements, which
      specify exactly which messages, by range of MessageNumbers, have been
      received.</para>

      <para><important>
          <title>STAR Level 2 Requirement</title>

          <para><glossterm linkend='STAR2009'>STAR 2009</glossterm>: STAR
          requires that the messages be sequenced to ensure proper delivery
          and processing of related messages.</para>
        </important></para>
    </section>

    <section>
      <title>WS-ReliableMessaging Message Integrity</title>

      <para><emphasis role='bold'>Content Integrity</emphasis></para>

      <para>WS-ReliableMessaging strongly recommends that messages by secured
      by WS-Security, specifically that Content Integrity be validate by
      applying a digital signature to messages. Full behavior is detailed in
      the Security Section. STAR Level 2 implementations must use Certificate
      based security when using WS-Reliable Messaging.</para>

      <para><emphasis role='bold'>TimeToLive</emphasis></para>

      <para>WS-ReliableMessaging implements TimeToLive like functionality via
      the Sequence Expiration policy assertion or the wsu:expires element on
      the sequence. This is detailed under the WS-Reliable Messaging
      specification.</para>
    </section>
  </section>

  <section>
    <title>STAR Web Service Requirements</title>

    <para>The original STAR Transport Guidelines required that the transports
    provide the ability to deliver messages reliably. However, theory did not
    always lead to reality. The state of the WS-ReliableMessaging frameworks
    at the time did not lead to interoperable or easy to deploy
    implementations. STAR does not specify when or how to use reliable
    messaging, that is up to the trading partners. The STAR Level 2 rules on
    WS-Reliable Messaging only state what needs to be supported to help
    provide the minimum level of interoperability.</para>

    <para></para>
  </section>
</chapter>
    <chapter id='Attachments' xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/Attachments.xml'>
  <title>Attachments</title>

  <para></para>

  <section>
    <title>MTOM/WS-Attachments</title>

    <para>STAR specifies two methods for attachments.</para>

    <itemizedlist>
      <listitem>
        <para>MTOM - Message Transport Optimization Mechanism <xref linkend='Ref_MTOM'></xref></para>
      </listitem>

      <listitem>
        <para>SOAP with Attachments - mime-encoded attachments of binary data.
        <xref linkend='Ref_Attachments'></xref></para>
      </listitem>
    </itemizedlist>

    <para>These methods are compatible with each other as the soap envelope,
    binary data encoding, and HTTP transport are the same. MTOM is supported
    by newer frameworks, and treats the binary data as if they were just part
    of the XML data. SOAP with Attachments is the old specification but is
    still used by many older frameworks. STAR RECOMMENDS that implementations
    use MTOM as it provides a cleaner programmatic interface for working with
    attachments. Since attachments are an advanced concept that not every
    implementation needs, it is considered a STAR Level 2 requirement. Also
    due to the critical nature of most attachments they need to be Reliable
    ans Secure so use of WS-ReliableMessaging is required.</para>

    <para>The STAR attachment element is defined to allow transporting non-XML
    data. All internal attachments are encoded as the xsd:base64 data type.
    External attachments, those that reside on a server, can be communicated
    using the provided URL identifiers.</para>

    <para><note>
        <para>STAR also recommends the use of the Large File BOD to handle
        transmittal of files that may normally be too large to provide as an
        attachment. The Large File BOD allows for the specification of files
        to be transmitted in chunks and then re-assembled once they are
        received.</para>
      </note></para>

    <para>Binary attachments are to use the MTOM standard or the backwards
    compatible SOAP with Attachments specification if MTOM is not supported by
    the tooling framework. The use of DIME attachments is not supported.
    </para>

    <para><important>
        <title>STAR Level 2 Rule</title>

        <para><glossterm linkend='STAR2013'>STAR2013</glossterm>: Attachments
        <emphasis role='bold'>MUST</emphasis> use MTOM attachments or SOAP
        with Attachments. MTOM attachments are <emphasis role='bold'>RECOMMENDED</emphasis> over SOAP with Attachments.</para>

        <para><glossterm linkend='STAR2014'>STAR2014</glossterm>: The use of
        DIME attachments <emphasis role='bold'>MUST NOT</emphasis> be
        used.</para>
      </important></para>

    <para>MTOM allows an efficient way for binary data to be included in a
    SOAP envelope with out the need for encoding that data in an XML wrapper.
    MTOM and SOAP with Attachments make use of the Multipart-Mime encoding
    mechanism of the HTTP transport to send the data. Frameworks that support
    MTOM and SOAP with Attachments then can retrieve the attachments via the
    reference ID.</para>

    <para>For these attachments, this element points to the attachment that
    resides outside the SOAP Envelope.</para>

    <para><note>
        <para>This element is intended primarily to support non-XML data that
        is not part of a BOD; for example, transactions presented in
        comma-separated files. BODs that embed non-XML data, such as an image,
        define their own method of encoding or referencing the binary
        data.</para>
      </note></para>
  </section>

  <section>
    <title>Attachment Element</title>

    <para>The attachment element is an optional element that may appear in the
    SOAP BODY payload's content section. Implementations may NOT place this
    attachment elsewhere in the SOAP BODY. The use of the element is to enable
    the transportation of non-xml formatted data, without the need to encode
    it into an XML compatible format.</para>

    <para>Below is an example of a ProcessMessage request carrying a binary
    image using the attachment element:</para>

    <para><example>
        <title>Sample Message with Attachment</title>

        <para><programlisting>&lt;attachment xmlns="http://www.starstandards.org/webservices/2009/transport"&gt;
  &lt;id&gt;token&lt;/id&gt; <emphasis role='bold'>(optional)</emphasis>
  &lt;fileName&gt;fileName&lt;/fileName&gt; <emphasis role='bold'>(optional)</emphasis>
  &lt;attachmentData&gt;#@#$@$@@FADA#$ADFAAFSERWADFVadadfarW&lt;/attachmentData&gt; <emphasis role='bold'>(optional)</emphasis>
  &lt;mimeCode&gt;mimeCode&lt;/mimeCode&gt; <emphasis role='bold'>(required)</emphasis>
  &lt;uriReference&gt;http://tempuri.org&lt;/uriReference&gt; <emphasis role='bold'>(optional)</emphasis>
&lt;/attachment&gt;
</programlisting></para>
      </example>The STAR Web Services 4.0 template WSDL provided by STAR
    includes the necessary definition. The attachment element itself may occur
    many times, and is optional.</para>

    <itemizedlist>
      <listitem>
        <para>id - a unique identifier for this attachment. For WS-Attachments
        implementations this can be the Multipart-Mime Content
        identifier.</para>
      </listitem>

      <listitem>
        <para>filename - the name of the file to be created.</para>
      </listitem>

      <listitem>
        <para>attachmentData - binary encoded or MTOM/XOP information. MTOM
        frameworks may replace this with a XOP element that refers to the
        appropriate Muiltipart-Mime Content identifier.</para>
      </listitem>

      <listitem>
        <para>mimeCode - a mime code that describes the type of content being
        attached. i.e. application/text, application/xml, image/png,
        image/jpg</para>
      </listitem>

      <listitem>
        <para>uriReference - a URL where the attachment can be retrieved if it
        is stored on a server.</para>
      </listitem>
    </itemizedlist>

    <section>
      <title>MTOM Attachments</title>

      <para>The STAR WSDL includes the necessary information to enable
      frameworks to understand and create the necessary code for MTOM based
      attachments. This is accomplished by specifying at the XML Schema level
      the use of the
      <emphasis>xmime:expectedContentTypes="application/octet-stream"</emphasis>.</para>

      <para><example>
          <title>WSDL MTOM Encoding</title>

          <para><programlisting>&lt;xsd:element name="attachmentData" type="xsd:base64Binary" xmime:expectedContentTypes="application/octet-stream"&gt;
   &lt;xsd:annotation&gt;
     &lt;xsd:documentation source="http://www.starstandard.org"&gt;Binary data using base64Binary encoding.&lt;/xsd:documentation&gt;
   &lt;/xsd:annotation&gt;
&lt;/xsd:element&gt;</programlisting>Use of the content type
          application/octet-stream allows for the transmittal of any type of
          binary data. Further information on the specific content type can be
          specified using the appropriate mimeCode element for the attachment
          component. A framework that supports MTOM will use the
          xmime:epectedContentType during code generation from the WSDL to
          create the appropriate processing instructions. The following
          example of an MTOM/XOP encoded message comes from the XOP 1.0
          specification. <xref linkend='Ref_XOP'></xref></para>
        </example><example>
          <title>MTOM encoded attachment</title>

          <para><programlisting>MIME-Version: 1.0
Content-Type: Multipart/Related;boundary=MIME_boundary;
    type="application/xop+xml";
    start="&lt;mymessage.xml@example.org&gt;";
    startinfo="application/soap+xml; action=\"ProcessData\""
Content-Description: A SOAP message with my pic and sig in it

--MIME_boundary
Content-Type: application/xop+xml; 
    charset=UTF-8; 
    type="application/soap+xml; action="ProcessData\""
Content-Transfer-Encoding: 8bit
Content-ID: &lt;mymessage.xml@example.org&gt;

&lt;soap:Envelope
    xmlns:soap='http://www.w3.org/2003/05/soap-envelope'
    xmlns:xmlmime='http://www.w3.org/2004/11/xmlmime'&gt;
  &lt;soap:Body&gt;
    &lt;m:data xmlns:m='http://example.org/stuff'&gt;
      &lt;m:photo xmlmime:contentType='image/png'&gt;
       &lt;xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' 
          href='cid:http://example.org/me.png'/&gt;
      &lt;/m:photo&gt;
      &lt;m:sig xmlmime:contentType='application/pkcs7-signature'&gt;
       &lt;xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' 
          href='cid:http://example.org/my.hsh'/&gt;
      &lt;/m:sig&gt;
    &lt;/m:data&gt;
  &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;

--MIME_boundary
Content-Type: image/png
Content-Transfer-Encoding: binary
Content-ID: &lt;http://example.org/me.png&gt;

// binary octets for png

--MIME_boundary
Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: binary
Content-ID: &lt;http://example.org/my.hsh&gt;

// binary octets for signature

--MIME_boundary--</programlisting>A STAR attachments element that was
          processed by MTOM with a XOP include would look <xref linkend='ExampleMTOM'></xref>.</para>
        </example><example>
          <title id='ExampleMTOM'>STAR MTOM encoded Attachment Element</title>

          <para><programlisting>&lt;attachment xmlns="http://www.starstandards.org/webservices/2009/transport"&gt;
  &lt;filename&gt;MyAttachment.png&lt;/filename&gt;
  &lt;attachmentData&gt;
     &lt;xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' 
                  href='cid:http://example.org/MyAttachment.png'/&gt;
  &lt;/attachmentData&gt;
  &lt;mimeCode&gt;image/png&lt;/mimeCode&gt;
&lt;/attachment&gt; </programlisting>The <emphasis>xop:Include</emphasis> href
          would refer to the Content-ID where the attached data can be
          retrieved from the Multipart-Mime boundary. The generation of the
          XOP include is handled by the MTOM framework, and is encoded before
          the message is sent over the wire by the framework. It is decoded on
          the receiving end. To the programmer it looks as if it was normal
          XML encoded data that was sent and received.</para>
        </example></para>
    </section>
  </section>
</chapter>
  </part>

  <glossary xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/STARRules.xml'>
  <title>STAR Interoperability Rules</title>
  <glossdiv>
    <title>Level 1</title>
    <glossentry id='STAR1015'>
      <glossterm>STAR1015</glossterm>
      <glossdef>
        <para>STAR BOD Specific and Generic Transports must be message 
        level interoperable.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1001'>
      <glossterm>STAR1001</glossterm>
      <glossdef>
        <para>All web services must be compliant to the rules and 
        specifications outlined by the WS-I Basic Profile.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1002'>
      <glossterm>STAR1002</glossterm>
      <glossdef>
        <para>Appropriate compliance markers are required as specified 
        by the WS-I Conformance Claim Attachment Mechanisms 
        document.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1016'>
      <glossterm>STAR1016</glossterm>
      <glossdef>
        <para>Application level error messages <emphasis role='bold'>
        MUST NOT</emphasis> be returned with a SOAP Fault, and 
        <emphasis role='bold'>MUST</emphasis> be returned using the 
        appropriate BOD.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1017'>
      <glossterm>STAR1017</glossterm>
      <glossdef>
        <para>The service provider must keep track of contents that are 
        deemed to have been received by the client to avoid 
        resending.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1020'>
      <glossterm>STAR1020</glossterm>
      <glossdef>
        <para>The client must be able to handle duplicate messages from 
        a service provider.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1018'>
      <glossterm>STAR1018</glossterm>
      <glossdef>
        <para>A SOAP Header <emphasis role='bold'>MUST</emphasis> 
        contain one <emphasis role='bold'>manifest element</emphasis> 
        for each <emphasis role='bold'>content element</emphasis> in 
        the SOAP body.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1019'>
      <glossterm>STAR1019</glossterm>
      <glossdef>
        <para>A <emphasis role='bold'>manifest</emphasis> is 
        <emphasis role='bold'>REQUIRED</emphasis> to have 
        <emphasis role='bold'>namespaceURI</emphasis>, 
        <emphasis role='bold'>element</emphasis>, <emphasis role='bold'>
        contentID</emphasis>, and <emphasis role='bold'>
        version</emphasis> attributes. Even though version is listed as 
        optional it is <emphasis role='bold'>REQUIRED</emphasis> for 
        STAR BOD and DTS transports.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1009'>
      <glossterm>STAR1009</glossterm>
      <glossdef>
        <para>All STAR Web Services are <emphasis role='bold'>
        REQUIRED</emphasis> to understand and handle the STAR Specific 
        SOAP Faults.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1010'>
      <glossterm>STAR1010</glossterm>
      <glossdef>
        <para>All STAR soap fault error codes are <emphasis role='bold'>
        REQUIRED</emphasis> to be be prefixed with STAR: and the 
        appropriate STAR error code. i.e. STAR:Invalid Structure</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1011'>
      <glossterm>STAR1011</glossterm>
      <glossdef>
        <para>All STAR soap fault error codes are <emphasis role='bold'>
        REQUIRED</emphasis> to appear in the standard SOAP:Fault 
        block.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1012'>
      <glossterm>STAR1012</glossterm>
      <glossdef>
        <para>SOAP Faults are for Critical Processing errors only. 
        Informational or warning errors should not be sent as a SOAP 
        Fault.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1014'>
      <glossterm>STAR1014</glossterm>
      <glossdef>
        <para>WS-Security errors must send the appropriate WS-Security 
        SOAP Fault for the authorization being used.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1013'>
      <glossterm>STAR1013</glossterm>
      <glossdef>
        <para>ConfirmBOD reason codes that are sent at the Warning or 
        Informational status, <emphasis role='bold'>SHOULD 
        NOT</emphasis> trigger a resending of the BOD.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1004'>
      <glossterm>STAR1004</glossterm>
      <glossdef>
        <para>All implementations are <emphasis role='bold'>
        REQUIRED</emphasis> to send information over HTTPS.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1008'>
      <glossterm>STAR1008</glossterm>
      <glossdef>
        <para>All services and clients must be compliant to the general 
        Security requirements Outlined by the WS-I Basic Security 
        Profile 1.0 .The optional attributes defined in the Profile is 
        also to be relaxed in the STAR Implementation.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1003'>
      <glossterm>STAR1003</glossterm>
      <glossdef>
        <para>All implementations are required to support 
        Username/Password for authentication.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR1005'>
      <glossterm>STAR1005</glossterm>
      <glossdef>
        <para>All passwords are required to be sent as plain text or 
        hashed.</para>
      </glossdef>
    </glossentry>
  </glossdiv>
  <glossdiv>
    <title>Level 2</title>
    <glossentry id='STAR2002'>
      <glossterm>STAR2002</glossterm>
      <glossdef>
        <para>Implementations <emphasis role='bold'>MUST</emphasis> 
        conform to section 12, "
        <ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#x509token'>X.509 
        Certificate Token</ulink>" of the 
        <ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html'>
        WS-I Basic Security Profile 1.0</ulink>.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2001'>
      <glossterm>STAR2001</glossterm>
      <glossdef>
        <para>Level 2 implementations <emphasis role='bold'>
        MUST</emphasis> use X509 certificates.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2003'>
      <glossterm>STAR2003</glossterm>
      <glossdef>
        <para>"At-Least-Once" requires the sending party to 
        uniquely identify a message and the receiving party to 
        acknowledge the receipt of the message, giving the sender an 
        auditable record stating that the message has been received. If 
        the sender does not receive an acknowledgment of receipt in a 
        reasonable amount of time (Time-Out), it <emphasis role='bold'>
        MUST</emphasis> retry the message send.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2004'>
      <glossterm>STAR2004</glossterm>
      <glossdef>
        <para>If a message was not able to be sent it 
        <emphasis role='bold'>MUST</emphasis> be retried at least three 
        times.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2005'>
      <glossterm>STAR2005</glossterm>
      <glossdef>
        <para>"At-Most-Once" requires a sending party to 
        uniquely identify messages, to retry failed messages and 
        requires the receiving party to identify and ignore any 
        duplicate messages. In order to know which messages to ignore, 
        it is <emphasis role='bold'>REQUIRED</emphasis> that the 
        receiving party persist received messages in a durable 
        store.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2006'>
      <glossterm>STAR2006</glossterm>
      <glossdef>
        <para>"Once-And-Only-Once / Exactly-Once" requires 
        the sender to uniquely identify each message and to retry any 
        message that the receiver fails to acknowledge. The receiver 
        must acknowledge receipt of messages and ignore duplicate 
        messages. It is <emphasis role='bold'>REQUIRED</emphasis> that 
        the receiver persist messages in a durable store to enable 
        duplicate elimination.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2007'>
      <glossterm>STAR2007</glossterm>
      <glossdef>
        <para>For indicating Routing information, STAR requires the use 
        of WS-Addressing or WS-MakeConnection if the end point is not 
        directly addressable.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2008'>
      <glossterm>STAR2008</glossterm>
      <glossdef>
        <para>Acknowledgement of Receipts <emphasis role='bold'>
        MUST</emphasis> be enabled during the use of At-Most-Once and 
        Once and Only Once reliability.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2009'>
      <glossterm>STAR2009</glossterm>
      <glossdef>
        <para>STAR requires that the messages be sequenced to ensure 
        proper delivery and processing of related messages.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2010'>
      <glossterm>STAR2010</glossterm>
      <glossdef>
        <para>Error handling is <emphasis role='bold'>
        REQUIRED</emphasis> to follow the recommendations of the WS-I 
        Reliable and Secure Profile in regards to handling of 
        errors.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2011'>
      <glossterm>STAR2011</glossterm>
      <glossdef>
        <para>Security in regards to Digital Certificates 
        <emphasis role='bold'>MUST</emphasis> follow the rules outlined 
        by <glossterm linkend='STAR2002'>STAR2002</glossterm> and the 
        WS-I Reliable and Secure Profile.</para>
      </glossdef>
    </glossentry>
    <glossentry id='STAR2012'>
      <glossterm>STAR2012</glossterm>
      <glossdef>
        <para>At-Most-Once or Once-And-Only-Once / Exactly-Once 
        implementations must support the handling of duplicate 
        messages.</para>
      </glossdef>
    </glossentry>
    <glossentry>
      <glossterm>STAR2013</glossterm>
      <glossdef>
        <para>Attachments <emphasis role='bold'>MUST</emphasis> use 
        MTOM attachments or SOAP with Attachments. MTOM attachments are 
        <emphasis role='bold'>RECOMMENDED</emphasis> over SOAP with 
        Attachments.</para>
      </glossdef>
    </glossentry>
    <glossentry>
      <glossterm>STAR2014</glossterm>
      <glossdef>
        <para>The use of DIME attachments <emphasis role='bold'>MUST 
        NOT</emphasis> be used.</para>
      </glossdef>
    </glossentry>
  </glossdiv>
</glossary>
  <appendix xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/STARLevelOneCheckList.xml'>
  <title>STAR Level One Check List</title>

  <para>As specified by the STAR Transport Guidelines, each transport is to
  have a interoperability check list that is voluntarily filled out by the
  implementor. This check list should be sent back to STAR either via
  electronic format or via email submission. The check lists are a way for the
  STAR to guage the level of adoption as well as what portions of the
  specification are being implemented. This information is then used as input
  back to the Architecture Workgroup for further review and action on updates
  to the transport specification.</para>

  <section>
    <title>Check List</title>

    <para>This is the STAR Level 1 interoperability check list. Please fill
    this information out in a spreadsheet, and send back to <ulink url='mailto:info@starstandard.org'>info@starstandard.org</ulink>. If the
    implementation has implemented the rule specified please mark with a
    <emphasis role='bold'>Y</emphasis>. If the implementation has not
    implemented mark with a <emphasis role='bold'>N</emphasis>. If the rule
    doesn't apply to your implementation please mark as <emphasis role='bold'>NA</emphasis>.</para>

    <table>
      <title>STAR Level 1 Check List</title>

      <tgroup cols='3'>
        <tbody>
          <row>
            <entry><emphasis role='bold'>Rule</emphasis></entry>

            <entry><emphasis role='bold'>Description</emphasis></entry>

            <entry><emphasis role='bold'>Implemented (Y, N,
            NA)</emphasis></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1001'>STAR1001</glossterm></entry>

            <entry>All web services must be compliant to the rules and
            specifications outlined by the WS-I Basic Profile</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1002'>STAR1002</glossterm></entry>

            <entry>Appropriate compliance markers are required as specified by
            the WS-I Conformance Claim Attachment Mechanisms document.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1003'>STAR1003</glossterm></entry>

            <entry>All implementations are required to support
            Username/Password for authentication</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1004'>STAR1004</glossterm></entry>

            <entry>All implementations are <emphasis role='bold'>REQUIRED</emphasis> to send information over
            HTTPS</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1005'>STAR1005</glossterm></entry>

            <entry>All passwords are required to be sent as plain text</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1008'>STAR1008</glossterm></entry>

            <entry>All services and clients must be compliant to the general
            Security requirements Outlined by the WS-I Basic Security Profile
            1.0 .The optional attributes defined in the Profile is also to be
            relaxed in the STAR Implementation.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1009'>STAR1009</glossterm></entry>

            <entry>All STAR Web Services are <emphasis role='bold'>REQUIRED</emphasis> to understand and handle the STAR
            Specific SOAP Faults.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1010'>STAR1010</glossterm></entry>

            <entry>All STAR soap fault error codes are <emphasis role='bold'>REQUIRED</emphasis> to be be prefixed with STAR: and
            the appropriate STAR error code. i.e. STAR:Invalid
            Structure</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1011'>STAR1011</glossterm></entry>

            <entry>All STAR soap fault error codes are <emphasis role='bold'>REQUIRED</emphasis> to appear in the standard
            SOAP:Fault block.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1012'>STAR1012</glossterm></entry>

            <entry>SOAP Faults are for Critical Processing errors only.
            Informational or warning errors should not be sent as a SOAP
            Fault.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1013'>STAR1013</glossterm></entry>

            <entry>ConfirmBOD reason codes that are sent at the Warning or
            Informational status, <emphasis role='bold'>SHOULD NOT</emphasis>
            trigger a resending of the BOD.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1014'>STAR1014</glossterm></entry>

            <entry>WS-Security errors must send the appropriate WS-Security
            SOAP Fault for the authorization being used.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1015'>STAR1015</glossterm></entry>

            <entry>STAR BOD Specific and Generic Transports must be message
            level interoperable.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1016'>STAR1016</glossterm></entry>

            <entry>Application level error messages <emphasis role='bold'>MUST
            NOT</emphasis> be returned with a SOAP Fault, and <emphasis role='bold'>MUST</emphasis> be returned using the appropriate
            BOD.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1017'>STAR1017</glossterm></entry>

            <entry>The service provider must keep track of contents that are
            deemed to have been received by the client to avoid
            resending.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1018'>STAR1018</glossterm></entry>

            <entry>A SOAP Header <emphasis role='bold'>MUST</emphasis> contain
            one <emphasis role='bold'>manifest element</emphasis> for each
            <emphasis role='bold'>content element</emphasis> in the SOAP
            body.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1019'>STAR1019</glossterm></entry>

            <entry>A <emphasis role='bold'>manifest</emphasis> is <emphasis role='bold'>REQUIRED</emphasis> to have <emphasis role='bold'>namespaceURI</emphasis>, <emphasis role='bold'>element</emphasis>, <emphasis role='bold'>contentID</emphasis>, and <emphasis role='bold'>version</emphasis> attributes. Even though version is
            listed as optional it is <emphasis role='bold'>REQUIRED</emphasis>
            for STAR BOD and DTS transports.</entry>

            <entry></entry>
          </row>

          <row>
            <entry><glossterm linkend='STAR1020'>STAR1020</glossterm></entry>

            <entry>The client must be able to handle duplicate messages from a
            service provider.</entry>

            <entry></entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </section>
</appendix>
  <bibliography xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/References.xml'>
  <title>Normative References</title>

  <biblioentry id='Ref_WSI_BP11'>
    <abbrev>WS-IBP11</abbrev>
    <publisher>
      <publishername>WS-I</publishername>
    </publisher>

    <title><ulink url='http://www.ws-i.org/Profiles/BasicProfile-1.1.html'>Basic Profile
    Version 1.1</ulink></title>

    <pubdate>10 Apr. 2006</pubdate>

    <date>7 Jul. 2009</date>
  </biblioentry>

  <biblioentry id='Ref_WSI_BSP10'>
    <abbrev>WS-IBSP10</abbrev>
    <publisher>
      <publishername>WS-I</publishername>
    </publisher>

    <title><ulink url='http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html'>Basic
    Security Profile Version 1.0</ulink></title>

    <pubdate>30 Mar. 2007</pubdate>

    <date>21 Jul. 2009</date>
  </biblioentry>

  <biblioentry id='Ref_WS_RM'>
    <abbrev>WS-RM2007</abbrev>
    <publisher>
      <publishername>Organization for the Advancement of Structured
      Information Standards</publishername>
    </publisher>

    <title><ulink url='http://docs.oasis-open.org/ws-rx/wsrm/200702/wsrm-1.1-spec-cs-01.pdf'>Web
    Services Reliable Messaging Version 1.1</ulink></title>

    <titleabbrev>WS-ReliableMessaging</titleabbrev>

    <pubdate>11 Apr. 2007</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WS_RM_Policy'>
    <abbrev>WS-RMP2007</abbrev>
    <publisher>
      <publishername>Organization for the Advancement of Structured
      Information Standards</publishername>
    </publisher>

    <title><ulink url='http://docs.oasis-open.org/ws-rx/wsrmp/200702'>Web Services Reliable Messaging Policy Assertion 1.1</ulink></title>

    <titleabbrev>WS-RM Policy</titleabbrev>

    <pubdate>14 Jun. 2007</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WS_MC'>
    <abbrev>WS-MC2007</abbrev>
    <publisher>
      <publishername>Organization for the Advancement of Structured
      Information Standards</publishername>
    </publisher>

    <title><ulink url='http://docs.oasis-open.org/ws-rx/wsmc/200702/wsmc-1.0-spec-os-01.pdf'>Web Services Make Connection Version 1.0</ulink></title>

    <titleabbrev>WS-MakeConnection</titleabbrev>

    <pubdate>14 Jun. 2007</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WS_Addr'>
    <abbrev>WS-Addr2006</abbrev>
    <publisher>
      <publishername>W3C</publishername>
    </publisher>

    <title><ulink url='http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/'>WS-Addressing Core - 1.0</ulink></title>

    <titleabbrev>WS-Addressing</titleabbrev>

    <pubdate>9 May 2006</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WS_Addr_SOAP'>
    <abbrev>WS-AddrSOAP2006</abbrev>
    <publisher>
      <publishername>W3C</publishername>
    </publisher>

    <title><ulink url='http://www.w3.org/TR/2006/REC-ws-addr-soap-20060509/'>WS-Addressing SOAP Binding</ulink></title>

    <titleabbrev>WS-Addressing SOAP</titleabbrev>

    <pubdate>9 May 2006</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WS_Addr_MetaData'>
    <abbrev>WS-AddrMetaData2007</abbrev>
    <publisher>
      <publishername>W3C</publishername>
    </publisher>

    <title><ulink url='http://www.w3.org/TR/2007/REC-ws-addr-metadata-20070904/'>WS-Addressing 1.0 - MetaData</ulink></title>

    <titleabbrev>WS-Addressing MetaData</titleabbrev>

    <pubdate>4 Sep. 2007</pubdate>

    <date>28 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_RFC2616'>
    <abbrev>RFC2616.10</abbrev>
    <publisher>
      <publishername>W3C</publishername>
    </publisher>

    <title><ulink url='http://www.w3.org/Protocols/rfc2616/rfc2616.html'>Hypertext Transfer Protocol</ulink></title>

    <titleabbrev>HTTP/1.1</titleabbrev>

    <pubdate>Jun. 1999</pubdate>

    <date>29 Oct. 2009</date>
  </biblioentry>
  <biblioentry id='Ref_WSConformanceClaim'>
    <abbrev>ConformanceClaim</abbrev>
    <publisher>
      <publishername>WS-I</publishername>
    </publisher>

    <title><ulink url='http://www.ws-i.org/Profiles/ConformanceClaims-1.0-2004-11-15.html'>WS-I Conformance Claim Attachment</ulink></title>

    <pubdate>15 Nov. 2004</pubdate>

    <date>29 Oct. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_ContentTypes'>
    <abbrev>ContentTypes</abbrev>
    <publisher>
        <publishername>W3C</publishername>
    </publisher>
    <title><ulink url='http://www.w3.org/TR/2005/NOTE-xml-media-types-20050502/'>Describing Media Content of Binary Data in XML</ulink></title>
    <pubdate>2 May. 2005</pubdate>
    <date>8 Dec. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_MTOM'>
    <abbrev>MTOM</abbrev>
    <publisher>
        <publishername>W3C</publishername>
    </publisher>
    <title><ulink url='http://www.w3.org/TR/soap12-mtom/'>SOAP Message Transmission Optimization Mechanism</ulink></title>
    <pubdate>25 Jan. 2005</pubdate>
    <date>8 Dec. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_MTOM11'>
    <abbrev>MTOM1.1</abbrev>
    <publisher>
        <publishername>W3C</publishername>
    </publisher>
    <title><ulink url='http://www.w3.org/Submission/soap11mtom10/'>SOAP 1.1 Binding for MTOM 1.0</ulink></title>
    <pubdate>05 Apr. 2006</pubdate>
    <date>8 Dec. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_Attachments'>
    <abbrev>SoapAttachments</abbrev>
    <publisher>
        <publishername>W3C</publishername>
    </publisher>
    <title><ulink url='http://www.w3.org/TR/SOAP-attachments'>SOAP with Attachments</ulink></title>
    <pubdate>11 Dec. 2000</pubdate>
    <date>8 Dec. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_XOP'>
    <abbrev>XOP</abbrev>
    <publisher>
        <publishername>W3C</publishername>
    </publisher>
    <title><ulink url='http://www.w3.org/TR/xop10/'>XML-Binary Optimized Packaging</ulink></title>
    <pubdate>25 Jan. 2005</pubdate>
    <date>8 Dec. 2009</date>
  </biblioentry>
  
</bibliography>
  <bibliography xml:base='file:/G:/HudsonBuild/jobs/Transport%20Publish/workspace/transport2011v1/AWGDocBook/WebServiceSpecs/Chapters/ReferencesNonNormative.xml'>
  <title>Non-Normative References</title>

  <biblioentry id='Ref_Securing_WebServers'>
    <abbrev>Fitzpatrick2008</abbrev>
    <authorgroup>
      <author>
        <surname>Fitzpatrick</surname>

        <firstname>William</firstname>
      </author>

      <author>
        <surname>Carver</surname>

        <firstname>David</firstname>
      </author>
    </authorgroup>

    <title><ulink url='http://www.starstandard.org/articles/SecureWebServer/index.html'>Securing
    Web Servers and XML Data with SSL</ulink></title>

    <pubdate>Oct. 2008</pubdate>

    <publisher>
      <publishername>Standards for Technology in Automotive
      Retail</publishername>
    </publisher>

    <date>21 Jul. 2009</date>
  </biblioentry>

  <biblioentry id='Ref_TostAndre'>
    <abbrev>Tost2005</abbrev>
    <authorgroup>
      <author>
        <surname>Tost</surname>
        <firstname>Andre</firstname>
      </author>
    </authorgroup>

    <title><ulink url='http://www.ibm.com/developerworks/webservices/library/ws-loosevstrong.html'>Loosely typed versus
        strongly typed Web Services</ulink></title>

    <pubdate>02 Sep. 2005</pubdate>

    <publisher>
      <publishername>IBM Developer Works</publishername>
    </publisher>

    <date>29 Oct. 2009</date>
  </biblioentry>

  <biblioentry id='Ref_ButekRussell'>
    <abbrev>Butek2005</abbrev>
    <authorgroup>
      <author>
        <surname>Butek</surname>
        <firstname>Russell</firstname>
      </author>
    </authorgroup>

    <title><ulink url='http://www-128.ibm.com/developerworks/xml/library/ws-tip-xsdcaution.html'>Tip: xsd:any: A
        cautionary tale.</ulink></title>

    <pubdate>13 Dec. 2005</pubdate>

    <publisher>
      <publishername>IBM Developer Works</publishername>
    </publisher>

    <date>29 Oct. 2009</date>
  </biblioentry>
  
  <biblioentry id='Ref_Freemantle'>
    <abbrev>Freemantle2006</abbrev>
    <authorgroup>
      <author>
        <surname>Freemantle</surname>
        <firstname>Paul</firstname>
      </author>
    </authorgroup>

    <title><ulink url='http://www.infoq.com/articles/fremantle-wsrm-introduction'>An Introduction to Web Services Reliable Messaging</ulink></title>

    <pubdate>14 Sep. 2006</pubdate>

    <publisher>
      <publishername>Infoq</publishername>
    </publisher>

    <date>12 Nov. 2009</date>
  </biblioentry>
  
</bibliography>
</book>