<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="License"
           targetNamespace="License"
           elementFormDefault="qualified"
           version="10000">

  <xs:annotation>
    <xs:documentation xml:lang="en">
      License schema definition
      Copyright 2012 Dynamic Information Systems Corporation.  All rights reserved.
    </xs:documentation>
  </xs:annotation>

  <xs:element name="license" type="licenseType" />

  <!-- ***************** -->
  <!-- *** licensing *** -->
  <!-- ***************** -->
  <xs:complexType name="licenseType">
    <xs:all>
      <xs:element name="datatype" type="datatypeType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="sql" type="sqlType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="request" type="requestType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="requestDetail" type="requestDetailType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licenseDetail" type="licenseDetailType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="generate" type="generateType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="validate" type="validateType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="validateDetail" type="validateDetailType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="validateStatus" type="validateStatusType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="transfer" type="transferType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="response" type="responseType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="export" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="import" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="database" type="databaseType" minOccurs="0" maxOccurs="1"/>
    </xs:all>
  </xs:complexType>

  <!-- *********** -->
  <!-- *** sql *** -->
  <!-- *********** -->
  <xs:complexType name="sqlType">
    <xs:sequence>
      <xs:element name="stmt" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="version" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="sqlParms" type="parmType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="identity" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      <xs:element name="nonQuery" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- **************** -->
  <!-- *** parmType *** -->
  <!-- **************** -->
  <xs:complexType name="parmType">
    <xs:sequence>
      <xs:element name="sqlParm" minOccurs="1" maxOccurs="unbounded">
        <xs:complexType>
          <xs:all>
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="datatype" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
          </xs:all>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <!-- *************** -->
  <!-- *** request *** -->
  <!-- *************** -->
  <xs:complexType name="requestType">
    <xs:sequence>
      <xs:element name="requestId" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licenseType" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="company" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="contact" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="phone" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="email" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="omnidexVersion" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="omnidexSystemID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="nodeName" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="hardware" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="physicalMemory" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="operatingSystem" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="processors" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="totalCores" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="configuration" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="detail" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="dateEntered" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseDetail" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="requestDetailType">
    <xs:sequence>
      <xs:element name="timestamp" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="serverID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="systemboardID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="operatingSystemID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="omnidexSystemID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="omnidexHome" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="omnidexData" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="omnidexRegistry" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licensee" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licType" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licValidation" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licExpiration" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licCode" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licStatus" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="comments" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="licenseDetailType">
    <xs:sequence>
      <xs:element name="invoiceNo" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="serverID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="systemboardID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="operatingSystemID" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="licenseClass" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="validateFreq" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="validateGrace" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="transferLicenseID" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="comments" type="xs:string" minOccurs="0" maxOccurs="1"/>
      <xs:element name="activationKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- **************** -->
  <!-- *** generate *** -->
  <!-- **************** -->
  <xs:complexType name="generateType">
    <xs:sequence>
      <xs:element name="licenseID" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="creator" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="creatorCpu" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="omnidexSystemID" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="osType" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseType" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseClass" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validateFreq" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validateGrace" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licensedProducts" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licensee" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="expiredDate" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- **************** -->
  <!-- *** validate *** -->
  <!-- **************** -->
  <xs:complexType name="validateType">
    <xs:sequence>
      <xs:element name="licenseID" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="detailType" type="xs:int" minOccurs="0" maxOccurs="1"/>
      <xs:element name="detail" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="validateDetailType">
    <xs:sequence>
      <xs:element name="validationDate" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseCode" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="company" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="omnidexSystemID" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="nodeName" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="hardware" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="physicalMemory" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="operatingSystem" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="processors" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="totalCores" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="serverID" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="systemboardID" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="operatingSystemID" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="configuration" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="omnidexVersion" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseType" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseClass" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validateFreq" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validateGrace" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="expiredDate" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="validateStatusType">
    <xs:sequence>
      <xs:element name="validationID" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="status" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- **************** -->
  <!-- *** transfer *** -->
  <!-- **************** -->
  <xs:complexType name="transferType">
    <xs:sequence>
      <xs:element name="licenseID" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="licenseCode" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="effectiveDate" type="xs:string" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- **************** -->
  <!-- *** response *** -->
  <!-- **************** -->
  <xs:complexType name="responseType">
    <xs:sequence>
      <xs:element name="licenseID" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="company" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validateCode" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="revokeDate" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="validationID" type="xs:int" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="datatypeType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="SQL"/>
      <xs:enumeration value="REQUEST"/>
      <xs:enumeration value="REQUEST_DETAIL"/>
      <xs:enumeration value="GENERATE"/>
      <xs:enumeration value="VALIDATE"/>
      <xs:enumeration value="VALIDATE_DETAIL"/>
      <xs:enumeration value="TRANSFER"/>
      <xs:enumeration value="RESPONSE"/>
      <xs:enumeration value="EXPORT"/>
      <xs:enumeration value="IMPORT"/>
      <xs:enumeration value="CLEAR"/>
      <xs:enumeration value="LICENSE_DETAIL"/>
      <xs:enumeration value="VALIDATE_STATUS"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="databaseType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="LIVE"/>
      <xs:enumeration value="TEST"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
