<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright 2001 Microsoft Corporation. All rights reserved.

The presentation, distribution or other dissemination of the
information contained herein by Microsoft is not a license,
either expressly or impliedly, to any intellectual property owned or
controlled by Microsoft.

This document and the information contained herein is provided on an
"AS IS" basis and to the maximum extent permitted by applicable law,
Microsoft provides the document AS IS AND WITH ALL FAULTS, and hereby
disclaims all other warranties and conditions, either express, implied
or statutory, including, but not limited to, any (if any) implied
warranties, duties or conditions of merchantability, of fitness for a
particular purpose, of accuracy or completeness of responses, of
results, of workmanlike effort, of lack of viruses, and of lack of
negligence, all with regard to the document. ALSO, THERE IS NO
WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION,
CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE
DOCUMENT.

IN NO EVENT WILL MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE COST
OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE,
LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR
SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE,
ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF THE
POSSIBILITY OF SUCH DAMAGES.  
-->
<xsd:schema 
  targetNamespace="http://schemas.xmlsoap.org/ws/2001/10/security" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
  xmlns:enc="http://www.w3.org/2001/04/xmlenc#" 
  xmlns="http://schemas.xmlsoap.org/ws/2001/10/security" 
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified" 
  version="0.1">
  
  <xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/TR/xmlenc-core/xenc-schema.xsd"/>
  <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2001/PR-xmldsig-core-20010820/xmldsig-core-schema.xsd"/>
  <!--
    //
    // WS-Security includes the following elements used to extend ds:KeyInfo:
    //  - licenseLocation
    //
    -->
  <xsd:element name="licenseLocation" type="xsd:anyURI">
    <xsd:annotation>
      <xsd:documentation>
            This element is used within an XML Signature KeyInfo tag to
            provide a URI that points to a assertion/license that may be useful in
            determining the trust associated with an XML Signature.
       </xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!--
    //
    // WS-Security includes the following top level SOAP Headers:
    //  - integrity
    //  - confidentiality
    //  - credentials
    //
    -->
  <!--
    //
    // WS-Security message integrity header
    //
    -->
  <xsd:element name="integrity">
    <xsd:annotation>
      <xsd:documentation>
            This element defines the WS-Security integrity header.
            It's purpose is to encapsulate the XML digital signatures 
            of the SOAP message that contains this header.  This header
            is designed to allow all valid SOAP attributes as well
            as other namespace qualified attributes that are appropriate
            in the context that this is being used within.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
                            This element defines a reference to the XML Digital Signature
                            "Signature" element which is the top level element for
                            defining digital signatures of portions of an XML document.
             </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
                            This free-form extension may include additional,
                             namespace-qualified XML.
            </xsd:documentation>
          </xsd:annotation>
        </xsd:any>
      </xsd:sequence>
      <xsd:anyAttribute namespace="##other" processContents="lax"/>
    </xsd:complexType>
  </xsd:element>
  <!--
    //
    // WS-Security encrypted attachment element
    //
    -->
  <xsd:element name="encryptedAttachment" type="enc:EncryptedDataType">
    <xsd:annotation>
      <xsd:documentation>
                This element mirrors the XML Encrypt EncryptedData element
                and is used for special semantics around encrypted attachments
      </xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!--
    //
    // WS-Security message confidentiality header
    //
    -->
  <xsd:element name="confidentiality">
    <xsd:annotation>
      <xsd:documentation>
                This element defines the WS-Security confidentiality header.
                It's purpose is to identify encrypted attachments.  This header
                is designed to allow all valid SOAP attributes as well
                as other namespace qualified attributes that are appropriate
                in the context that this is being used within.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="encryptedAttachment" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
                      The encryptedAttachment element provides a reference and encryption
                      metadata for message attachments.
                    </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
                            This free-form extension may include additional,
                            namespace qualified XML.
            </xsd:documentation>
          </xsd:annotation>
        </xsd:any>
      </xsd:sequence>
      <xsd:anyAttribute namespace="##other" processContents="lax"/>
    </xsd:complexType>
  </xsd:element>
  <!--
    //
    // WS-Security credentials header
    //
    -->
  <xsd:element name="credentials">
    <xsd:annotation>
      <xsd:documentation>
                This element defines the WS-Security credentials header.
                It's purpose is to encapsulate credentials that 
                are agreed to between the SOAP producer and consumer. Credentials
                have additional properties which are defined in the WS-Security
                specification located at:
                  http://msdn.microsoft.com/ws/2001/10/Security/.  This header
                is designed to allow all valid SOAP attributes as well
                as other namespace qualified attributes that are appropriate
                in the context that this is being used within.
       </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
                            This element is a placeholder that indicates where the
                            credential(s) contained in the WS-Security credentials tag belong.
            </xsd:documentation>
          </xsd:annotation>
        </xsd:any>
      </xsd:sequence>
      <xsd:anyAttribute namespace="##other" processContents="lax"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
