<?xml version="1.0"?>

<!-- 

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.

OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.

Copyright (C) OASIS Open (2004). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

-->

<wsdl:definitions name="ServiceGroup"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
   xmlns:wsbf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
   xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
   xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
   xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
   xmlns:wssg="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
   xmlns:wssgw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl"
   targetNamespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.wsdl">

   <!-- ========================== Imports =========================== -->
   <wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
                location="WS-ResourceProperties-1_2-Draft_01.wsdl"/>

   <wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
                location="WS-ResourceLifetime-1_2-Draft_01.wsdl"/>

   <!-- ===================== Types Definitions ====================== -->
   <wsdl:types>
      <xsd:schema
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd"
         elementFormDefault="qualified">

         <xsd:include schemaLocation="WS-ServiceGroup-1_2-Draft_01.wsdl" />

         <xsd:import namespace=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
            schemaLocation=
            "WS-ResourceLifetime-1_2-Draft_01.xsd"
            />

         <xsd:import namespace=
    "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
            schemaLocation=
            "WS-ResourceProperties-1_2-Draft_01.xsd"
            />

         <xsd:import namespace=
    "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
            schemaLocation=
            "WS-BaseFaults-1_2-Draft_01.xsd"
            />

         <!-- =============== Resource Property Related  =================== -->
         <!-- ============ Resource Properties for ServiceGroup ============ -->
         <xsd:element name="ServiceGroupRP">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="wssg:MembershipContentRule"
                     minOccurs="0" maxOccurs="unbounded"/>
                  <xsd:element ref="wssg:Entry"
                     minOccurs="0" maxOccurs="unbounded"/>
               </xsd:sequence>
            </xsd:complexType>
            <xsd:unique name="UniqueInterfaces">
               <xsd:selector xpath="wssg:MembershipContentRule"/>
               <xsd:field xpath="@MemberInterface"/>
            </xsd:unique>
         </xsd:element>

         <!-- ========== Resource Properties for ServiceGroupEntry ========= -->
         <xsd:element name="ServiceGroupEntryRP">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element ref="wssg:ServiceGroupEPR"
                     minOccurs="1" maxOccurs="1"/>
                  <xsd:element ref="wssg:MemberEPR"
                     minOccurs="1" maxOccurs="1"/>
                  <xsd:element ref="wssg:Content"
                     minOccurs="1" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <!-- ================= Message Specific Types  ==================== -->
         <!-- ======== Message Types for ServiceGroupRegistration  ========= -->
         <xsd:element name="Add">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="MemberEPR"
                     type="wsa:EndpointReferenceType"/>
                  <xsd:element name="Content"
                     type="xsd:anyType"/>
                  <xsd:element name="InitialTerminationTime"
                     type="xsd:dateTime"
                     minOccurs="0" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <xsd:element name="AddResponse"
            type="wsa:EndpointReferenceType"/>

         <xsd:complexType name="ContentCreationFailedFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="ContentCreationFailedFault"
            type="wssg:ContentCreationFailedFaultType"/>

         <xsd:complexType name="UnsupportedMemberInterfaceFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="UnsupportedMemberInterfaceFault"
            type="wssg:UnsupportedMemberInterfaceFaultType"/>

         <xsd:complexType name="AddRefusedFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="AddRefusedFault"
            type="wssg:AddRefusedFaultType"/>

      </xsd:schema>
   </wsdl:types>

   <!-- ==================== Message Definitions ===================== -->
   <!-- =============== ServiceGroupRegistration::Add ================
     Add(MemberEPR, Content, [InitialTerminationTime])
     returns: EPR to ServiceGroupEntry
   -->
   <wsdl:message name="AddRequest">
      <wsdl:part name="AddRequest" element="wssg:Add"/>
   </wsdl:message>

   <wsdl:message name="AddResponse">
      <wsdl:part name="AddResponse" element="wssg:AddResponse"/>
   </wsdl:message>

   <wsdl:message name="ContentCreationFailedFault">
      <wsdl:part name="ContentCreationFailedFault"
         element="wssg:ContentCreationFailedFault"/>
   </wsdl:message>

   <wsdl:message name="UnsupportedMemberInterfaceFault">
      <wsdl:part name="UnsupportedMemberInterfaceFault"
         element="wssg:UnsupportedMemberInterfaceFault"/>
   </wsdl:message>

   <wsdl:message name="AddRefusedFault">
      <wsdl:part name="AddRefusedFault"
         element="wssg:AddRefusedFault"/>
   </wsdl:message>

   <!-- =================== PortType Definitions ===================== -->
   <wsdl:portType name="ServiceGroup"
      wsrp:ResourceProperties="wssg:ServiceGroupRP">
      <!-- ========== extends wsrp:ResourceProperties ============= -->
      <wsdl:operation name="GetResourceProperty">
         <wsdl:input name="GetResourcePropertyRequest"
            message="wsrp:GetResourcePropertyRequest"/>
         <wsdl:output name="GetResourcePropertyResponse"
            message="wsrp:GetResourcePropertyResponse"/>
         <wsdl:fault name="ResourceUnknownFault"
            message="wsrp:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidResourcePropertyQNameFault"
            message="wsrp:InvalidResourcePropertyQNameFault"/>
      </wsdl:operation>
   </wsdl:portType>

   <wsdl:portType name="ServiceGroupEntry"
      wsrp:ResourceProperties="wssg:ServiceGroupEntryRP">
      <!-- ========== extends wsrp:ResourceProperties ============= -->
      <wsdl:operation name="GetResourceProperty">
         <wsdl:input name="GetResourcePropertyRequest"
            message="wsrp:GetResourcePropertyRequest"/>
         <wsdl:output name="GetResourcePropertyResponse"
            message="wsrp:GetResourcePropertyResponse"/>
         <wsdl:fault name="ResourceUnknownFault"
            message="wsrp:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidResourcePropertyQNameFault"
            message="wsrp:InvalidResourcePropertyQNameFault"/>
      </wsdl:operation>
   </wsdl:portType>

   <wsdl:portType name="ServiceGroupRegistration"
      wsrp:ResourceProperties="wssg:ServiceGroupRP">
      <!-- ========== extends wsrp:ResourceProperties ============= -->
      <wsdl:operation name="GetResourceProperty">
         <wsdl:input name="GetResourcePropertyRequest"
            message="wsrp:GetResourcePropertyRequest"/>
         <wsdl:output name="GetResourcePropertyResponse"
            message="wsrp:GetResourcePropertyResponse"/>
         <wsdl:fault name="ResourceUnknownFault"
            message="wsrp:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidResourcePropertyQNameFault"
            message="wsrp:InvalidResourcePropertyQNameFault"/>
      </wsdl:operation>
      <wsdl:operation name="Add">
         <wsdl:input name="AddRequest" message="wssg:AddRequest"/>
         <wsdl:output name="AddResponse" message="wssg:AddResponse"/>
         <wsdl:fault name="ContentCreationFailedFault"
            message="wssg:ContentCreationFailedFault"/>
         <wsdl:fault name="UnsupportedMemberInterfaceFault"
            message="wssg:UnsupportedMemberInterfaceFault"/>
         <wsdl:fault name="AddRefusedFault"
            message="wssg:AddRefusedFault"/>
      </wsdl:operation>
   </wsdl:portType>

</wsdl:definitions>
