﻿<?xml version="1.0" encoding="UTF-8"?>
<!--
  
  OMA Right Object  Acquisition Protocol (ROAP) XML Schema
  version - 1.1
  date    - 24 July 2007
  
  FILE INFORMATION
  
  OMA Permanent Document
  File: OMA-SUP-XSD_DRM_ROAP-V1_1-20070724-C
  Type: Text - Schema Description
  
  Public Reachable Information
  Path: http://www.openmobilealliance.org/tech/profiles
  Name: drm_roap-v1_1.xsd
  
  NORMATIVE INFORMATION
  
  Information about this file can be found in the specification
  
  OMA-SUP-XSD_DRM_ROAP-V1_1-20070621-D.xsd
  
  available at http://www.openmobilealliance.org/
  
  Send comments to technical-comments@mail.openmobilealliance.org
  
  LEGAL DISCLAIMER
  
  Use of this document is subject to all of the terms and conditions
  of the Use Agreement located at
  http://www.openmobilealliance.org/UseAgreement.html
  
  You may use this document or any part of the document for internal
  or educational purposes only, provided you do not modify, edit or
  take out of context the information in this document in any manner.
  Information contained in this document may be used, at your sole
  risk, for any purposes.
  
  You may not use this document in any other manner without the prior
  written permission of the Open Mobile Alliance.  The Open Mobile
  Alliance authorizes you to copy this document, provided that you
  retain all copyright and other proprietary notices contained in the
  original materials on any copies of the materials and that you
  comply strictly with these terms.  This copyright permission does
  not constitute an endorsement of the products or services.  The
  Open Mobile Alliance assumes no responsibility for errors or
  omissions in this document.
  
  Each Open Mobile Alliance member has agreed to use reasonable
  endeavors to inform the Open Mobile Alliance in a timely manner of
  Essential IPR as it becomes aware that the Essential IPR is related
  to the prepared or published specification.  However, the members
  do not have an obligation to conduct IPR searches.  The declared
  Essential IPR is publicly available to members and non-members of
  the Open Mobile Alliance and may be found on the "OMA IPR
  Declarations" list at http://www.openmobilealliance.org/ipr.html.
  The Open Mobile Alliance has not conducted an independent IPR review
  of this document and the information contained herein, and makes no
  representations or warranties regarding third party IPR, including
  without limitation patents, copyrights or trade secret rights.  This
  document may contain inventions for which you must obtain licenses
  from third parties before making, using or selling the inventions.
  Defined terms above are set forth in the schedule to the Open Mobile
  Alliance Application Form.
  
  NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE
  MADE BY THE OPEN MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER
  OR ITS AFFILIATES REGARDING ANY OF THE IPR'S REPRESENTED ON THE "OMA
  IPR DECLARATIONS" LIST, INCLUDING, BUT NOT LIMITED TO THE ACCURACY,
  COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR
  NOT SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.
  
  THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY
  DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR
  EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF
  DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.
  
  Copyright 2007 Open Mobile Alliance Ltd.  All Rights Reserved.
  Used with the permission of the Open Mobile Alliance Ltd. under the
  terms set forth above.
  
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:roap="urn:oma:bac:dldrm:roap-1.0"
  xmlns:o-ex="http://odrl.net/1.1/ODRL-EX"
  xmlns:o-dd="http://odrl.net/1.1/ODRL-DD"
  xmlns:oma-dd="http://www.openmobilealliance.com/oma-dd"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
  targetNamespace="urn:oma:bac:dldrm:roap-1.0"
  elementFormDefault="unqualified" attributeFormDefault="unqualified">
  <!-- Would import the OMA profile of ODRL if such a schema existed -->
  <import namespace="http://odrl.net/1.1/ODRL-EX"
    schemaLocation="http://odrl.net/1.1/ODRL-EX-11.xsd" />
  <import namespace="http://odrl.net/1.1/ODRL-DD"
    schemaLocation="http://odrl.net/1.1/ODRL-DD-11.xsd" />
  <import namespace="http://www.openmobilealliance.com/oma-dd"
    schemaLocation="http://www.openmobilealliance.com/tech/profiles/DRM/OMA-DD.xsd" />
  <import namespace="http://www.w3.org/2000/09/xmldsig#"
    schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />
  <import namespace="http://www.w3.org/2001/04/xmlenc#"
    schemaLocation="http://www.w3.org/TR/xmlenc-core/xenc-schema.xsd" />
  <!-- Basic Types -->
  <complexType name="Request" abstract="true">
    <attribute name="triggerNonce" type="roap:Nonce" />
  </complexType>
  <complexType name="Response" abstract="true">
    <attribute name="status" type="roap:String80" use="required" />
    <attribute name="errorMessage" type="roap:String1024" />
    <attribute name="errorRedirectURL" type="anyURI" />
  </complexType>
  <simpleType name="Version">
    <restriction base="string">
      <pattern value="\d{1,2}\.\d{1,3}" />
    </restriction>
  </simpleType>
  <simpleType name="Status">
    <restriction base="string">
      <enumeration value="Success" />
      <enumeration value="Abort" />
      <enumeration value="NotSupported" />
      <enumeration value="AccessDenied" />
      <enumeration value="NotFound" />
      <enumeration value="MalformedRequest" />
      <enumeration value="UnknownCriticalExtension" />
      <enumeration value="UnsupportedVersion" />
      <enumeration value="UnsupportedAlgorithm" />
      <enumeration value="NoCertificateChain" />
      <enumeration value="InvalidCertificateChain" />
      <enumeration value="TrustedRootCertificateNotPresent" />
      <enumeration value="SignatureError" />
      <enumeration value="DeviceTimeError" />
      <enumeration value="NotRegistered" />
      <enumeration value="InvalidDCFHash" />
      <enumeration value="InvalidDomain" />
      <enumeration value="DomainFull" />
      <enumeration value="DomainAccessDenied" />
      <enumeration value="RightsExpired" />
      <enumeration value="TriggerExpiredOrInvalid" />
      <enumeration value="UnableToDecryptMeteringReport" />
      <enumeration value="UnableToValidateMeteringReportMAC" />
      <enumeration value="MalformedMeteringReport" />
      <enumeration value="UnknownUploadedRO" />
      <enumeration value="InvalidUploadedRO" />
      <!--Start of 2.1 Additions-->
      <!--End of 2.1 Additions-->
    </restriction>
  </simpleType>
  <complexType name="Extensions">
    <sequence maxOccurs="unbounded">
      <element name="extension" type="roap:Extension" />
    </sequence>
  </complexType>
  <complexType name="Extension" abstract="true">
    <attribute name="critical" type="boolean" />
  </complexType>
  <!-- Start of 2.1 Additions; For foward compatibility-->
  <element name="extension" type="roap:Extension" />
  <complexType name="ExtensionContainer">
    <complexContent>
      <extension base="roap:Extension">
        <sequence>
          <any namespace="##any" processContents="lax"
            maxOccurs="unbounded" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP extensions -->
  <!-- No need for OCSPResponses to be sent -->
  <!-- Mainly for use in the 2-pass RO Request protocol -->
  <complexType name="NoOCSPResponse">
    <complexContent>
      <extension base="roap:Extension" />
    </complexContent>
  </complexType>
  <!-- No need for receiving party's certificate chain to be sent -->
  <!-- Mainly for use in the 2-pass RO Request protocol -->
  <complexType name="PeerKeyIdentifier">
    <complexContent>
      <extension base="roap:Extension">
        <sequence minOccurs="0">
          <element name="identifier" type="roap:KeyIdentifier" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- No need for inclusion of OCSP responder certificates -->
  <!-- Mainly for use in the 2-pass RO Request protocol -->
  <complexType name="OCSPResponderKeyIdentifier">
    <complexContent>
      <extension base="roap:Extension">
        <sequence>
          <element name="identifier" type="roap:KeyIdentifier" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- Device Details -->
  <!-- Used in ROAP-RIHello and ROAP-RegistrationRequest messages -->
  <complexType name="DeviceDetails">
    <complexContent>
      <extension base="roap:Extension">
        <sequence minOccurs="0">
          <element name="manufacturer" type="roap:String64" />
          <element name="model" type="roap:String64" />
          <element name="version" type="roap:String64" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- Loyalty program information -->
  <!-- Mainly for use in two-pass RO Request protocol-->
  <complexType name="TransactionIdentifier">
    <complexContent>
      <extension base="roap:Extension">
        <sequence maxOccurs="unbounded">
          <element name="contentID" type="anyURI" />
          <element name="id">
            <simpleType>
              <restriction base="string">
                <length value="16" />
              </restriction>
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- Certificate chain caching capabilities extension -->
  <!-- (Device signals support of the extension, RI signals if it will -->
  <!-- store the device's certificates) -->
  <complexType name="CertificateCaching">
    <complexContent>
      <extension base="roap:Extension" />
    </complexContent>
  </complexType>
  <!-- Support for hash chains in Domains -->
  <complexType name="HashChainSupport">
    <complexContent>
      <extension base="roap:Extension" />
    </complexContent>
  </complexType>
  <!-- Device does not consider itself a member of the domain it is -->
  <!-- leaving -->
  <complexType name="NotDomainMember">
    <complexContent>
      <extension base="roap:Extension" />
    </complexContent>
  </complexType>
  <!-- Domain Name Whitelist Extension for ROAP-RegistrationResponse -->
  <!-- RI can specify up to 5 domain names for silent/preview rights security -->
  <complexType name="DomainNameWhiteList">
    <complexContent>
      <extension base="roap:Extension">
        <sequence maxOccurs="5">
          <element name="dn" type="roap:String80" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--Start of 2.1 Additions-->
  <!--ConfirmROInstallation Extension for ROAP-ROResponse message-->
  <complexType name="ConfirmROInstallation">
    <complexContent>
      <extension base="roap:Extension">
        <attribute name="sessionId" type="roap:String64" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <!--PostResponseURL Extension for ROAP-MeteringReportResponse message-->
  <complexType name="PostResponseURL">
    <complexContent>
      <extension base="roap:Extension">
        <sequence>
          <element name="prURL" type="anyURI" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--Fail Extension for the ROAP-ROUploadResponse message-->
  <complexType name="Fail">
    <complexContent>
      <extension base="roap:Extension">
        <sequence minOccurs="0">
          <element name="roID" type="ID" maxOccurs="unbounded" />
          <element name="reason" minOccurs="0">
            <simpleType>
              <restriction base="string">
                <maxLength value="256" /><!--the unit is ‘byte’-->
              </restriction>
            </simpleType>
          </element>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--End of 2.1 Additions-->
  <!-- Basic types to identify entities -->
  <complexType name="Identifier">
    <choice>
      <element name="keyIdentifier" type="roap:KeyIdentifier" />
      <any namespace="##other" processContents="strict" />
    </choice>
  </complexType>
  <complexType name="KeyIdentifiers">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element name="keyIdentifier" type="roap:KeyIdentifier" />
    </sequence>
  </complexType>
  <complexType name="KeyIdentifier" abstract="true" />
  <!-- Hash of complete DER-encoded subjectPublicKeyInfo from -->
  <!-- key holder's certificate -->
  <complexType name="X509SPKIHash">
    <complexContent>
      <extension base="roap:KeyIdentifier">
        <sequence>
          <element name="hash" type="base64Binary" />
        </sequence>
        <attribute name="algorithm" type="anyURI"
          default="http://www.w3.org/2000/09/xmldsig#sha1" />
      </extension>
    </complexContent>
  </complexType>
  <!-- The corresponding ds:KeyInfo type -->
  <element name="X509SPKIHash" type="roap:X509SPKIHash" />
  <!-- Domain Identifier -->
  <!-- Last three characters (decimal digits) shall be interpreted as -->
  <!-- domain generation -->
  <simpleType name="DomainIdentifier">
    <restriction base="string">
      <pattern value=".{1,17}\d{3}" />
    </restriction>
  </simpleType>
  <!-- The corresponding ds:KeyInfo type -->
  <element name="domainID" type="roap:DomainIdentifier" />
  <!--Start of 2.1 Additions; for Forward compatibility; elements that MAY be extensions to the ROPayload-->
  <element name="roPayloadAliases">
    <complexType>
      <sequence>
        <element name="roAlias" type="roap:String80" minOccurs="0" />
        <element name="domainAlias" type="roap:String80" minOccurs="0" />
        <element name="riAlias" type="roap:String80" />
        <any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
    </complexType>
  </element>
  <!--End of 2.1 Additions-->
  <!-- Rights Object Definitions -->
  <complexType name="ROPayload">
    <sequence>
      <element name="riID" type="roap:Identifier" />
      <element name="rights" type="o-ex:rightsType" />
      <element name="signature" type="ds:SignatureType" minOccurs="0" />
      <element name="timeStamp" type="dateTime" minOccurs="0" />
      <element name="encKey" type="xenc:EncryptedKeyType" />
      <!--Start of 2.1 Additions-->
      <element ref="roap:roPayloadAliases" minOccurs="0" />
      <any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
      <!--End of 2.1 Additions-->
    </sequence>
    <attribute name="version" type="roap:Version" use="required" />
    <attribute name="id" type="ID" use="required" />
    <attribute name="stateful" type="boolean" />
    <attribute name="domainRO" type="boolean" />
    <attribute name="riURL" type="anyURI" />
  </complexType>
  <!-- May be sent standalone (domain ROs) -->
  <element name="protectedRO" type="roap:ProtectedRO" />
  <complexType name="ProtectedRO">
    <sequence>
      <element name="ro" type="roap:ROPayload" form="qualified" />
      <element name="mac" type="ds:SignatureType" />
    </sequence>
  </complexType>
  <!-- Registration protocol -->
  <!-- ROAP-DeviceHello -->
  <element name="deviceHello" type="roap:DeviceHello" />
  <complexType name="DeviceHello">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to establish an RI context.
        association.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="version" type="roap:Version" />
          <element name="deviceID" type="roap:Identifier"
            maxOccurs="unbounded" />
          <element name="supportedAlgorithm" type="anyURI" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP-RIHello -->
  <element name="riHello" type="roap:RIHello" />
  <complexType name="RIHello">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a deviceHello
        message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="selectedVersion" type="roap:Version" />
          <element name="riID" type="roap:Identifier" />
          <element name="selectedAlgorithm" type="anyURI" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="riNonce" type="roap:Nonce" />
          <element name="trustedAuthorities" type="roap:KeyIdentifiers"
            minOccurs="0" />
          <element name="serverInfo" type="base64Binary" minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
        </sequence>
        <attribute name="sessionId" type="roap:String64" />
      </extension>
    </complexContent>
  </complexType>
  <simpleType name="Nonce">
    <restriction base="base64Binary">
      <minLength value="14" />
    </restriction>
  </simpleType>
  <!-- ROAP-RegistrationRequest -->
  <element name="registrationRequest" type="roap:RegistrationRequest" />
  <complexType name="RegistrationRequest">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to request registration.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="roap:dateTimeOrUndefined" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="trustedAuthorities" type="roap:KeyIdentifiers"
            minOccurs="0" />
          <element name="serverInfo" type="base64Binary" minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
        <attribute name="sessionId" type="roap:String64" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <simpleType name="dateTimeOrUndefined">
    <union memberTypes="dateTime roap:UndefinedString" />
  </simpleType>
  <simpleType name="UndefinedString">
    <restriction base="string">
      <enumeration value="Undefined" />
    </restriction>
  </simpleType>
  <complexType name="CertificateChain">
    <sequence maxOccurs="unbounded">
      <element name="certificate" type="base64Binary" />
    </sequence>
  </complexType>
  <!-- ROAP-RegistrationResponse -->
  <element name="registrationResponse" type="roap:RegistrationResponse" />
  <complexType name="RegistrationResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a
        registrationRequest message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="riURL" type="anyURI" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="ocspResponse" type="base64Binary" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
        <attribute name="sessionId" type="roap:String64" />
      </extension>
    </complexContent>
  </complexType>
  <!--Start of 2.1 Additions-->
  <!--Identification protocol -->
  <!-- ROAP-IdentificationRequest -->
  <element name="identificationRequest"
    type="roap:IdentificationRequest" />
  <complexType name="IdentificationRequest">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to identify the Device.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="version" type="roap:Version" />
          <element name="deviceID" type="roap:Identifier"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP-IdentificationResponse-->
  <element name="identificationResponse"
    type="roap:IdentificationResponse" />
  <complexType name="IdentificationResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to an
        IdentificationRequest message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response"></extension>
    </complexContent>
  </complexType>
  <!--End of 2.1 Additions-->
  <!-- RO acquisition protocol -->
  <!-- ROAP-RORequest -->
  <element name="roRequest" type="roap:RORequest" />
  <complexType name="RORequest">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to request an RO.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="deviceID" type="roap:Identifier" />
          <element name="domainID" type="roap:DomainIdentifier"
            minOccurs="0" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="dateTime" />
          <element name="roInfo">
            <complexType>
              <sequence maxOccurs="unbounded">
                <element name="roID" type="ID" />
                <element name="dcfHash" minOccurs="0">
                  <complexType>
                    <sequence>
                      <element name="hash" type="base64Binary" />
                    </sequence>
                    <attribute name="algorithm" type="anyURI"
                      default="http://www.w3.org/2000/09/xmldsig#sha1" />
                  </complexType>
                </element>
              </sequence>
            </complexType>
          </element>
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP-ROResponse -->
  <element name="roResponse" type="roap:ROResponse" />
  <complexType name="ROResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a roRequest
        message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" minOccurs="0" />
          <element name="protectedRO" type="roap:ProtectedRO"
            form="qualified" maxOccurs="unbounded" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="ocspResponse" type="base64Binary" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--Start of 2.1 Additions-->
  <!--ROConfirmation protocol-->
  <!--ROAP-ROConfirmationRequest-->
  <element name="roConfirmRequest" type="roap:ROConfirmRequest" />
  <complexType name="ROConfirmRequest">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to communicate RO installation
        status.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="roap:dateTimeOrUndefined" />
          <element name="roConfirmInfo" type="roap:roConfirmInfo" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
        <attribute name="sessionId" type="roap:String64" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <!--ROAP-ROConfirmationResponse-->
  <element name="roConfirmResponse" type="roap:ROConfirmResponse" />
  <complexType name="ROConfirmResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a roConfirmRequest
        message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="nonce" type="roap:Nonce" />
          <element name="riID" type="roap:Identifier" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
        <attribute name="sessionId" type="roap:String64" />
      </extension>
    </complexContent>
  </complexType>
  <complexType name="roConfirmInfo">
    <sequence maxOccurs="unbounded">
      <element name="roID" type="ID" />
      <element name="installStatus" type="boolean" />
    </sequence>
  </complexType>
  <!--End of 2.1 Additions-->
  <!-- Domain registration protocol -->
  <!-- ROAP-JoinDomainRequest -->
  <element name="joinDomainRequest" type="roap:DomainRequest" />
  <complexType name="DomainRequest">
    <annotation>
      <documentation xml:lang="en">
        General PDU for sending Domain-related requests from a Device to
        an RI.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="roap:dateTimeOrUndefined" />
          <element name="domainID" type="roap:DomainIdentifier" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP-JoinDomainResponse -->
  <element name="joinDomainResponse" type="roap:JoinDomainResponse" />
  <complexType name="JoinDomainResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a
        joinDomainRequest message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="domainInfo" type="roap:DomainInfo" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="ocspResponse" type="base64Binary" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="DomainInfo">
    <sequence>
      <element name="notAfter" type="roap:dateTimeOrInfinite" />
      <element name="domainKey" type="roap:ProtectedDomainKey"
        form="qualified" maxOccurs="unbounded" />
    </sequence>
  </complexType>
  <!--Start of 2.1 Additions; For forward compatibility-->
  <element name="extendedDomainInfo">
    <complexType>
      <sequence>
        <element name="noConsumeAfter" type="roap:dateTimeOrInfinite" />
        <any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
    </complexType>
  </element>
  <!--End of 2.1 Additions-->
  <simpleType name="dateTimeOrInfinite">
    <union memberTypes="dateTime roap:InfiniteString" />
  </simpleType>
  <simpleType name="InfiniteString">
    <restriction base="string">
      <enumeration value="Infinite" />
    </restriction>
  </simpleType>
  <complexType name="ProtectedDomainKey">
    <sequence>
      <element name="encKey" type="xenc:EncryptedKeyType" />
      <element name="riID" type="roap:Identifier" />
      <element name="mac" type="base64Binary" />
    </sequence>
  </complexType>
  <!-- ROAP-LeaveDomainRequest -->
  <element name="leaveDomainRequest" type="roap:DomainRequest" />
  <!-- ROAP-LeaveDomainResponse -->
  <element name="leaveDomainResponse" type="roap:LeaveDomainResponse" />
  <complexType name="LeaveDomainResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a
        leaveDomainRequest message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="nonce" type="roap:Nonce" />
          <element name="domainID" type="roap:DomainIdentifier" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--Start of 2.1 Additions-->
  <!--Metering Protocol-->
  <!--ROAP-MeteringReportSubmit-->
  <element name="meteringReportSubmit" type="roap:MeteringReportSubmit" />
  <complexType name="MeteringReportSubmit">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to submit a metering Report.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="dateTime" />
          <element name="meteringReport">
            <complexType>
              <sequence>
                <element name="encryptedMeteringReport"
                  type="xenc:EncryptedDataType" />
                <element name="encKey" type="xenc:EncryptedKeyType" />
                <element name="mac" type="base64Binary" />
              </sequence>
            </complexType>
          </element>
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <!-- For forward compatibility -->
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--ROAP-MeteringReportResponse-->
  <element name="meteringReportResponse"
    type="roap:MeteringReportResponse" />
  <complexType name="MeteringReportResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a
        meteringReportSubmit message.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="ocspResponse" type="base64Binary" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="meteringReportType">
    <sequence>
      <element name="rawMeteringReportData" type="string" />
      <!-- For forward compatibility -->
      <any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </sequence>
  </complexType>
  <!--ROUpload Protocol-->
  <!--ROAP-ROUploadRequest-->
  <element name="roUploadRequest" type="roap:ROUploadRequest" />
  <complexType name="ROUploadRequest">
    <annotation>
      <documentation xml:lang="en">
        Message sent from Device to RI to upload ROs.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Request">
        <sequence>
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="time" type="dateTime" />
          <element name="roInfo">
            <complexType>
              <sequence maxOccurs="unbounded">
                <element name="roID" type="ID" />
                <element name="stateInfo" type="o-ex:constraintType"
                  minOccurs="0" maxOccurs="unbounded" />
              </sequence>
            </complexType>
          </element>
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--ROAP-ROUploadResponse-->
  <element name="roUploadResponse" type="roap:ROUploadResponse" />
  <complexType name="ROUploadResponse">
    <annotation>
      <documentation xml:lang="en">
        Message sent from RI to Device in response to a ROUploadRequest.
      </documentation>
    </annotation>
    <complexContent>
      <extension base="roap:Response">
        <sequence minOccurs="0">
          <element name="deviceID" type="roap:Identifier" />
          <element name="riID" type="roap:Identifier" />
          <element name="nonce" type="roap:Nonce" />
          <element name="certificateChain" type="roap:CertificateChain"
            minOccurs="0" />
          <element name="ocspResponse" type="base64Binary" minOccurs="0"
            maxOccurs="unbounded" />
          <element name="extensions" type="roap:Extensions"
            minOccurs="0" />
          <element name="signature" type="base64Binary" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <!--End of 2.1 Additions-->
  <!-- ROAP-Trigger -->
  <complexType name="BasicRoapTrigger">
    <sequence>
      <element name="riID" type="roap:Identifier" />
      <element name="riAlias" type="roap:String80" minOccurs="0" />
      <element name="nonce" type="roap:Nonce" minOccurs="0" />
      <element name="roapURL" type="anyURI" />
    </sequence>
    <attribute name="id" type="ID" />
  </complexType>
  <complexType name="DomainTrigger">
    <complexContent>
      <extension base="roap:BasicRoapTrigger">
        <sequence>
          <element name="domainID" type="roap:DomainIdentifier" />
          <element name="domainAlias" type="roap:String80"
            minOccurs="0" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ROAcquisitionTrigger">
    <complexContent>
      <extension base="roap:BasicRoapTrigger">
        <sequence>
          <element name="domainID" type="roap:DomainIdentifier"
            minOccurs="0" />
          <element name="domainAlias" type="string" minOccurs="0" />
          <sequence maxOccurs="unbounded">
            <element name="roID" type="ID" />
            <element name="roAlias" type="roap:String80" minOccurs="0" />
            <element name="contentID" type="anyURI" minOccurs="0"
              maxOccurs="unbounded" />
          </sequence>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ExtendedRoapTrigger">
    <complexContent>
      <extension base="roap:BasicRoapTrigger">
        <sequence>
          <any minOccurs="0" maxOccurs="unbounded"
            processContents="lax" />
        </sequence>
        <attribute name="type" type="roap:String80" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <!-- ROAP trigger -->
  <element name="roapTrigger" type="roap:RoapTrigger" />
  <complexType name="RoapTrigger">
    <annotation>
      <documentation xml:lang="en">
        Message used to trigger the Device to initiate a Rights Object
        Acquisition Protocol.
      </documentation>
    </annotation>
    <sequence>
      <choice>
        <element name="registrationRequest"
          type="roap:BasicRoapTrigger" />
        <element name="roAcquisition" type="roap:ROAcquisitionTrigger" />
        <element name="joinDomain" type="roap:DomainTrigger" />
        <element name="leaveDomain" type="roap:DomainTrigger" />
        <element name="extendedTrigger" type="roap:ExtendedRoapTrigger" />
      </choice>
      <element name="signature" type="ds:SignatureType" minOccurs="0" />
      <element name="encKey" type="xenc:EncryptedKeyType" minOccurs="0" />
    </sequence>
    <attribute name="version" type="roap:Version" />
    <attribute name="proxy" type="boolean" />
  </complexType>
  <!--Start of 2.1 Additions-->
  <simpleType name="String64">
    <restriction base="string">
      <maxLength value="64" />
    </restriction>
  </simpleType>
  <simpleType name="String80">
    <restriction base="string">
      <maxLength value="80" />
    </restriction>
  </simpleType>
  <simpleType name="String1024">
    <restriction base="string">
      <maxLength value="1024" />
    </restriction>
  </simpleType>
  <element name="trgLeaveDomain">
    <complexType>
      <sequence>
        <element name="deviceID" type="roap:Identifier" minOccurs="0" />
        <element name="domainAlias" type="roap:String80" minOccurs="0" />
        <element name="domainID" type="roap:DomainIdentifier" />
        <any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
      </sequence>
    </complexType>
  </element>
  <simpleType name="ucdHelloStatus">
    <restriction base="string">
      <enumeration value="Success" />
      <enumeration value="NothingToSend" />
      <enumeration value="VersionNotSupported" />
    </restriction>
  </simpleType>
  <element name="cdHello">
    <complexType>
      <attribute name="version" type="roap:Version" use="required" />
    </complexType>
  </element>
  <element name="ucdHello">
    <complexType>
      <sequence>
        <element name="httpURL" type="anyURI" minOccurs="0" />
      </sequence>
      <attribute name="status" type="roap:ucdHelloStatus"
        use="required" />
      <attribute name="version" type="roap:Version" use="required" />
    </complexType>
  </element>
  <element name="cdURLError">
    <complexType>
      <attribute name="version" type="roap:Version" use="required" />
      <attribute name="httpStatusCode" type="positiveInteger"
        use="required" />
    </complexType>
  </element>
  <!--End of 2.1 Additions-->
</schema>
