<?xml version="1.0" ?>
<!--
Copyright Notice
(c) 2007 Hewlett-Packard Development Company (HP), Intel Corporation,
International Business Machines Corporation (IBM), and Microsoft
Corporation. All rights reserved.

Permission to copy and display the "Web Services Resource Catalog"
Specification, in any medium without fee or royalty is hereby granted,
provided that you include the following on ALL copies of the "Web
Services Resource Catalog" Specification, or portions thereof, that
you make:
 1. A link or URL to the "Web Services Resource Catalog"
    Specification at this location:
       http://schemas.xmlsoap.org/ws/2007/05/resourceCatalog
 2. The copyright notice as shown in the "Web Services Resource
    Catalog" Specification.

Hewlett-Packard Development Company (HP), Intel Corporation,
International Business Machines Corporation (IBM), and Microsoft
Corporation (collectively, the "Authors") each agree to grant you a
royalty-free license, under reasonable, non-discriminatory terms and
conditions to their respective patents that they deem necessary to
implement the "Web Services Resource Catalog" Specification.

THE "WEB SERVICES RESOURCE CATALOG" SPECIFICATION IS PROVIDED "AS IS,"
AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
CONTENTS OF THE "WEB SERVICES RESOURCE CATALOG" SPECIFICATION ARE
SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS
WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.

THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
USE OR DISTRIBUTION OF THE "WEB SERVICES RESOURCE CATALOG"
SPECIFICATION.

The name and trademarks of the Authors may NOT be used in any manner,
including advertising or publicity pertaining to the "Web Services
Resource Catalog" Specification or its contents without specific,
written prior permission. Title to copyright in the "Web Services
Resource Catalog" Specification will at all times remain with the
Authors.

No other rights are granted by implication, estoppel or otherwise.
-->

<xs:schema xmlns:tns="http://schemas.xmlsoap.org/ws/2007/05/resourceCatalog" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.xmlsoap.org/ws/2007/05/resourceCatalog" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" 
             schemaLocation="http://www.w3.org/2001/xml.xsd"/>

    <!-- Constructs from the WS-Addressing Core adapted to MetaEPR -->
    <xs:complexType name="MetaEPRType" mixed="false">
        <xs:sequence>
            <xs:element ref="tns:ParameterMap" minOccurs="0"/>
            <xs:element name="Address" type="xs:string"/>
            <xs:element name="ReferenceParameters" type="tns:MetaEndpointElementType" minOccurs="0"/>
            <xs:element name="Metadata" type="tns:MetaEndpointElementType" minOccurs="0"/>
            <xs:element name="Any" type="tns:MetaEndpointExtensibilityType" minOccurs="0"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="AddressingVersions" type="tns:URIListType" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:simpleType name="URIListType">
        <xs:list itemType="xs:anyURI"/>
    </xs:simpleType>
    <xs:complexType name="MetaEndpointElementType" mixed="true">
        <xs:sequence>
            <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="MetaEndpointExtensibilityType" mixed="true">
        <xs:sequence>
            <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <!-- End -->
    <xs:element name="ParameterMap" type="tns:ParameterMapType"/>
    <xs:complexType name="ParameterMapType" mixed="false">
        <xs:sequence>
            <xs:element name="Parameter" type="tns:ParameterType" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="ParameterType" mixed="false">
        <xs:sequence>
            <xs:element name="Description" type="tns:LocalizableStringType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="Example" type="tns:ExampleType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="Token" type="xs:NCName" use="required"/>
        <xs:attribute name="QNameType" type="tns:QNameTypeType" use="required"/>
        <xs:attribute name="QName" type="xs:QName" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:simpleType name="QNameTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="simpleType"/>
            <xs:enumeration value="innerValueOfGED"/>
            <xs:enumeration value="outerValueOfGED"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="ExampleType" mixed="true">
        <xs:sequence>
            <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="MetaURIType" mixed="false">
        <xs:sequence>
            <xs:element ref="tns:ParameterMap"/>
            <xs:element name="TemplateURI" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="DescriptorType">
        <xs:sequence>
            <xs:element name="DisplayName" type="tns:LocalizableStringType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="Publisher" type="xs:string" minOccurs="0"/>
            <xs:element name="PublisherURL" type="xs:anyURI" minOccurs="0"/>
            <xs:element name="ResourceURL" type="xs:anyURI" minOccurs="0"/>
            <xs:element name="Version" type="xs:string" minOccurs="0"/>
            <xs:element name="Created" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="Updated" type="xs:dateTime" minOccurs="0"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="ClassifierType">
        <xs:simpleContent>
            <xs:extension base="xs:anyURI">
                <xs:anyAttribute namespace="##other" processContents="lax"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="ResourceType">
        <xs:sequence>
            <xs:element name="ResourceRef" type="tns:ResourceRefType" maxOccurs="unbounded"/>
            <xs:element name="ResourceDiscoveryProperties" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:anyAttribute namespace="##other" processContents="lax"/>
        </xs:complexType>
            </xs:element>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="ResourceElementType">
        <xs:attribute name="Namespace" type="xs:anyURI" use="required"/>
        <xs:attribute name="LocalName" type="xs:NCName" use="required"/>
    </xs:complexType>
    <xs:complexType name="ReferenceType">
            <xs:choice>
                <xs:element name="URI" type="xs:anyURI"/>
                <!-- a WS-Addressing EPR -->
                <xs:any namespace="##other" processContents="lax"/>
            </xs:choice>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="ParameterizableReferenceType">
            <xs:choice>
                <xs:element name="URI" type="xs:anyURI"/>
                <xs:element name="MetaURI" type="tns:MetaURIType" maxOccurs="unbounded"/>
                <xs:element name="MetaEPR" type="tns:MetaEPRType" maxOccurs="unbounded"/>
                <!-- a WS-Addressing EPR -->
                <xs:any namespace="##other" processContents="lax"/>
            </xs:choice>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="ResourceRefType">
        <xs:sequence>
            <xs:element name="ResourceElement" type="tns:ResourceElementType" minOccurs="0"/>
	    <xs:element name="ProtocolAndModelClassifier" type="tns:ClassifierType" minOccurs="0" maxOccurs="unbounded"/>	
            <xs:element name="Reference" type="tns:ParameterizableReferenceType"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="EntryReferenceType">
        <xs:sequence>
            <xs:element name="EntryId" type="xs:anyURI"/>
            <xs:element name="RemoteRef" type="tns:RemoteRefType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="Role" type="xs:anyURI" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="RemoteRefType">
        <xs:sequence>
            <xs:element name="ProtocolClassifier" type="tns:ClassifierType" minOccurs="0"/>
            <xs:element name="Reference" type="tns:ReferenceType"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="RefType" type="tns:RefTypeType" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:simpleType name="RefTypeType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Catalog"/>
            <xs:enumeration value="Entry"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="Entry" type="tns:EntryType"/>
    <xs:complexType name="EntryType">
        <xs:sequence>
            <xs:element name="Descriptor" type="tns:DescriptorType" minOccurs="0"/>
            <xs:element name="Classifier" type="tns:ClassifierType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="Annotation" type="tns:LocalizableStringType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="Resource" type="tns:ResourceType" minOccurs="0"/>
            <xs:element name="EntryRef" type="tns:EntryReferenceType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="Id" type="xs:anyURI" use="required"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:complexType name="CatalogType">
        <xs:sequence>
            <xs:element ref="tns:Entry" minOccurs="0" maxOccurs="unbounded"/>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
    </xs:complexType>
    <xs:element name="Catalog" type="tns:CatalogType"/>
    <xs:complexType name="LocalizableStringType">
        <xs:simpleContent>
	    <xs:extension base="xs:string">
		<xs:attribute ref="xml:lang" use="optional"/>
	    </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
    <!-- GEDs for use in ParameterMap -->
    <xs:element name="Host" type="xs:string"/>
    <xs:element name="Port" type="xs:positiveInteger"/>
</xs:schema>
