<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:tns="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0" 
  xmlns:s-ramp="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0" 
  elementFormDefault="qualified" version="1.0">
  <!--
      (c) 2010 Hewlett-Packard Company (HP), International Business Machines
      Corporation (IBM), Software AG (SAG) and TIBCO Software Inc. All
      rights reserved. Permission to copy and display the SOA Repository
      Artifact Model and Protocol (the “Specification”), in any medium
      without fee or royalty is hereby granted by Hewlett-Packard Company
      (HP), International Business Machines Corporation (IBM), Software AG
      (SAG) and TIBCO Software Inc. (collectively, the "Authors"), provided
      that you include the following on ALL copies of this document or
      portions thereof, that you make: 
      
      1. A link or URL to this document at this location:
      http://docs.oasis-open.org/s-ramp/ns/s-ramp-v1.0/wsdlmodel.xsd
      
      2. The copyright notice as shown in the Specification. 
      
      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 "SOA
      Repository Artifact Model and Protocol” Specification, including all
      its constituent documents. THIS DOCUMENT 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 THIS DOCUMENT 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 THIS DOCUMENT.
  -->
  
  <xsd:include schemaLocation="coremodel.xsd" />
  <xsd:include schemaLocation="xsdmodel.xsd" />
  <xsd:include schemaLocation="policymodel.xsd" />

  <xsd:simpleType name="wsdlDocumentEnum">
    <xsd:restriction base="s-ramp:documentArtifactEnum">
      <xsd:enumeration value="WsdlDocument" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="wsdlExtensionEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="WsdlExtension" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="portEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Port" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bindingEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Binding" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bindingOperationEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="BindingOperation" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="portTypeEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="PortType" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="operationEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Operation" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bindingOperationFaultEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="BindingOperationFault" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bindingOperationInputEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="BindingOperationInput" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="bindingOperationOutputEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="BindingOperationOutput" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="operationInputEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="OperationInput" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="operationOutputEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="OperationOutput" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="faultEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Fault" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="messageEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Message" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="partEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="Part" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="xsdTypeEnum">
    <xsd:restriction base="s-ramp:derivedArtifactEnum">
      <xsd:enumeration value="XsdType" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType name="WsdlDocument">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:XmlDocument">
        <xsd:sequence>
          <!-- Derived Relationships: -->
          <xsd:element name="importedXsds" type="s-ramp:xsdDocumentTarget" minOccurs="0" maxOccurs="unbounded" />
          <xsd:element name="includedXsds" type="s-ramp:xsdDocumentTarget" minOccurs="0" maxOccurs="unbounded" />
          <xsd:element name="redefinedXsds" type="s-ramp:xsdDocumentTarget" minOccurs="0" maxOccurs="unbounded" />
          <xsd:element name="importedWsdls" type="s-ramp:wsdlDocumentTarget" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="targetNamespace" type="xsd:anyURI" use="optional" />
        <xsd:attribute name="xsdTargetNamespaces" type="xsd:anyURI" use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="WsdlDerivedArtifactType" abstract="true">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:DerivedArtifactType">
        <xsd:sequence>
          <!-- Modeled "extension" relationship to any wsdlExtension artifact(s) -->
          <xsd:element name="extension" type="s-ramp:wsdlExtensionTarget" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="namespace" type="xsd:anyURI" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="WsdlService">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship to Port(s) this Service has: -->
          <xsd:element name="port" type="s-ramp:portTarget" minOccurs="1" maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Port">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationships with Binding artifact: -->
          <xsd:element name="Binding" type="s-ramp:bindingTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Binding">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship to BindingOperation(s): -->
          <xsd:element name="bindingOperation" type="s-ramp:bindingOperationTarget" minOccurs="0" maxOccurs="unbounded" />
          <!-- Derived Relationship with this Binding's PortType: -->
          <xsd:element name="portType" type="s-ramp:portTypeTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="PortType">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship to this PortType's Operation(s): -->
          <xsd:element name="operation" type="s-ramp:operationTarget" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="BindingOperation">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship to BindingOperationFault(s) for this BindingOperation: -->
          <xsd:element name="fault" type="s-ramp:bindingOperationFaultTarget" minOccurs="0" maxOccurs="unbounded" />
          <!-- Derived Relationship to BindingOperationInput for this BindingOperation: -->
          <xsd:element name="input" type="s-ramp:bindingOperationInputTarget" minOccurs="0" maxOccurs="1" />
          <!-- Derived Relationship to BindingOperationOutput for this BindingOperation: -->
          <xsd:element name="output" type="s-ramp:bindingOperationOutputTarget" minOccurs="0" maxOccurs="1" />
          <!-- Derived Relationship with Operation artifact: -->
          <xsd:element name="operation" type="s-ramp:operationTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="BindingOperationInput">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="BindingOperationFault">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType" />
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Operation">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationships to OperationInput and OperationOutput for this Operation: -->
          <xsd:element name="input" type="s-ramp:operationInputTarget" />
          <xsd:element name="output" type="s-ramp:operationOutputTarget" />
          <!-- Derived Relationship for fault(s) associated with this Operation: -->
          <xsd:element name="fault" type="s-ramp:faultTarget" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
    <!-- Only request / response is modeled -->
  </xsd:complexType>
  <xsd:complexType name="OperationInput">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship with Message artifact: -->
          <xsd:element name="message" type="s-ramp:messageTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Fault">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship with Message artifact: -->
          <xsd:element name="message" type="s-ramp:messageTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Message">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship to Part(s) of this Message: -->
          <xsd:element name="part" type="s-ramp:partTarget" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="Part">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationships with ElementDeclaraion and XSDType artifacts: -->
          <xsd:element name="type" type="s-ramp:xsdTypeTarget" minOccurs="0" maxOccurs="1" />
          <xsd:element name="element" type="s-ramp:elementTarget" minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="BindingOperationOutput">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="OperationOutput">
    <xsd:complexContent>
      <xsd:extension base="tns:NamedWsdlDerivedArtifactType">
        <xsd:sequence>
          <!-- Derived Relationship with Message for this OperationOutput: -->
          <xsd:element name="message" type="s-ramp:messageTarget" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="NamedWsdlDerivedArtifactType" abstract="true">
    <xsd:complexContent>
      <xsd:extension base="tns:WsdlDerivedArtifactType">
        <xsd:attribute name="NCName" type="xsd:NCName" use="optional" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="WsdlExtension">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:DerivedArtifactType">
        <xsd:attribute name="NCName" type="xsd:NCName" use="optional" />
        <xsd:attribute name="namespace" type="xsd:anyURI" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <!-- Relationship referencing the artifact's UUID, to reference a WSDLDocument. -->
  <xsd:complexType name="wsdlDocumentTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:wsdlDocumentEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a WSDLExtention. -->
  <xsd:complexType name="wsdlExtensionTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:wsdlExtensionEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a Port. -->
  <xsd:complexType name="portTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:portEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a Binding. -->
  <xsd:complexType name="bindingTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:bindingEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a BindingOperation. -->
  <xsd:complexType name="bindingOperationTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:bindingOperationEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a PortType. -->
  <xsd:complexType name="portTypeTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:portTypeEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference an Operation. -->
  <xsd:complexType name="operationTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:operationEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a BindingOperationFault. -->
  <xsd:complexType name="bindingOperationFaultTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:bindingOperationFaultEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a BindingOperationInputTarget. -->
  <xsd:complexType name="bindingOperationInputTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:bindingOperationInputEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a BindingOperationOutput. -->
  <xsd:complexType name="bindingOperationOutputTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:bindingOperationOutputEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference an OperationInput. -->
  <xsd:complexType name="operationInputTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:operationInputEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference an OperationOutput. -->
  <xsd:complexType name="operationOutputTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:operationOutputEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a Fault. -->
  <xsd:complexType name="faultTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:faultEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a Message. -->
  <xsd:complexType name="messageTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:messageEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference a Part. -->
  <xsd:complexType name="partTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:partEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- Relationship referencing the artifact's UUID, to reference any XsdType. -->
  <xsd:complexType name="xsdTypeTarget">
    <xsd:complexContent>
      <xsd:extension base="s-ramp:target">
        <xsd:attribute name="artifactType" type="s-ramp:xsdTypeEnum" use="required" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
</xsd:schema>
