<?xml version="1.0" encoding="UTF-8"?>
<schema
  targetNamespace="http://xmlns.oracle.com/weblogic/webservice-policy-ref"
  xmlns:wls="http://xmlns.oracle.com/weblogic/webservice-policy-ref"
  xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified"
  version="1.1"
  >
  
  <element name="webservice-policy-ref" type="wls:webservice-policy-refType"/>

  <complexType name="webservice-policy-refType">
    <sequence>
      <xsd:element name="ref-name" type="j2ee:string" minOccurs="0" />
      <xsd:element name="port-policy" type="wls:port-policyType"
        minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="operation-policy" type="wls:operation-policyType"
        minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="version" type="string" use="optional"/>
  </complexType>

  <complexType name="port-policyType">
    <sequence>
      <xsd:element name="port-name" type="j2ee:string" />
      <xsd:element name="ws-policy" type="wls:ws-policyType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element name="owsm-security-policy" type="wls:owsm-security-policyType" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>

  <xsd:simpleType name="statusType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="enabled"/>
      <xsd:enumeration value="disabled"/>
      <xsd:enumeration value="deleted"/>
    </xsd:restriction>
  </xsd:simpleType>

  <complexType name="ws-policyType">
    <sequence>
      <xsd:element name="uri" type="j2ee:string" />
      <xsd:element name="direction" type="j2ee:string" minOccurs="0" />
      <xsd:element name="status" default="enabled" type="wls:statusType" minOccurs="0" />       
    </sequence>
  </complexType>

  <complexType name="owsm-security-policyType">
    <sequence>
      <xsd:element name="uri" type="j2ee:string"/>
      <xsd:element name="status" default="enabled" type="wls:statusType" minOccurs="0">       
     </xsd:element>
    </sequence>
  </complexType> 

  <complexType name="operation-policyType">
    <sequence>
      <xsd:element name="operation-name" type="j2ee:string" />
			<xsd:element name="service-link" type="j2ee:string" minOccurs="0" maxOccurs="1"/>
      <xsd:element name="ws-policy" type="wls:ws-policyType" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
  </complexType>
</schema>
