<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  Portions of this file Copyright 1999-2005 University of Chicago
  Portions of this file Copyright 1999-2005 The University of Southern California.
  
  This file or a portion of this file is licensed under the
  terms of the Globus Toolkit Public License, found at
  http://www.globus.org/toolkit/download/license.html.
  If you redistribute this file, with or without
  modifications, you must include this notice in the file.
-->
<definitions name="AuthorizationService"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml"
    xmlns:tns="http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml"
    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:samlp="urn:oasis:names:tc:SAML:1.0:protocol">

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

    <types>
        <xsd:schema targetNamespace="http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml"
            xmlns:tns="http://www.gridforum.org/namespaces/2004/03/ogsa-authz/saml"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified">

            <xsd:element name="supportedPolicies" type="xsd:anyURI"/>

            <xsd:element name="supportsIndeterminate" type="xsd:boolean"/>

            <xsd:element name="signatureCapable" type="xsd:boolean"/>
            
            <xsd:element name="SAMLPortRP">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element ref="tns:supportedPolicies"
                            minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element ref="tns:supportsIndeterminate"
                            minOccurs="1" maxOccurs="1"/>
                        <xsd:element ref="tns:signatureCapable"
                            minOccurs="1" maxOccurs="1"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>

        <xsd:schema targetNamespace="urn:oasis:names:tc:SAML:1.0:protocol"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified">

            <xsd:element name="Request">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:any namespace="##any"/>
                    </xsd:sequence>
                    <xsd:attribute name="RequestID" type="xsd:string" use="required"/>
                    <xsd:attribute name="MajorVersion" type="xsd:int" use="required"/>
                    <xsd:attribute name="MinorVersion" type="xsd:int" use="required"/>
                    <xsd:attribute name="IssueInstant" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>

            <xsd:element name="Response">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:any namespace="##any"/>
                    </xsd:sequence>
                    <xsd:attribute name="ResponseID" type="xsd:string" use="required"/>
                    <xsd:attribute name="InResponseTo" type="xsd:string" use="optional"/>
                    <xsd:attribute name="MajorVersion" type="xsd:int" use="required"/>
                    <xsd:attribute name="MinorVersion" type="xsd:int" use="required"/>
                    <xsd:attribute name="IssueInstant" type="xsd:string" use="required"/>
                    <xsd:attribute name="Recipient" type="xsd:string" use="optional"/>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </types>

    <message name="SAMLRequestInputMessage">
	<part name="parameters" element="samlp:Request"/>
    </message>

    <message name="SAMLRequestOutputMessage">
	<part name="parameters" element="samlp:Response"/>
    </message>

    <!-- And the request-response protocol goes like this -->
    <portType name="SAMLRequestPortType" 
        wsrp:ResourceProperties = "tns:SAMLPortRP">
	<operation name="SAMLRequest">
	    <input message="tns:SAMLRequestInputMessage"/>
	    <output message="tns:SAMLRequestOutputMessage"/>
	</operation>

        <operation name="GetResourceProperty">
            <input  name="GetResourcePropertyRequest" 
                message="wsrpw:GetResourcePropertyRequest" />
            <output name="GetResourcePropertyResponse" 
                message="wsrpw:GetResourcePropertyResponse" />
            <fault  name="ResourceUnknownFault" 
                message="wsrpw:ResourceUnknownFault" />
            <fault  name="InvalidResourcePropertyQNameFault" 
                message="wsrpw:InvalidResourcePropertyQNameFault" />     
        </operation>

        <operation name="SetResourceProperties">
            <input  name="SetResourcePropertiesRequest" 
                message="wsrpw:SetResourcePropertiesRequest" />
            <output name="SetResourcePropertiesResponse" 
                message="wsrpw:SetResourcePropertiesResponse" />
            <fault  name="ResourceUnknownFault" 
                message="wsrpw:ResourceUnknownFault" />
            <fault
                name="InvalidSetResourcePropertiesRequestContentFault"
                message="wsrpw:InvalidSetResourcePropertiesRequestContentFault"
                />     
            <fault  name="UnableToModifyResourcePropertyFault" 
                message="wsrpw:UnableToModifyResourcePropertyFault" />
            <fault  name="InvalidResourcePropertyQNameFault" 
                message="wsrpw:InvalidResourcePropertyQNameFault" />     
            <fault  name="SetResourcePropertyRequestFailedFault" 
                message="wsrpw:SetResourcePropertyRequestFailedFault" />
        </operation>

        <operation name="QueryResourceProperties">
            <input  name="QueryResourcePropertiesRequest" 
                message="wsrpw:QueryResourcePropertiesRequest" />
            <output name="QueryResourcePropertiesResponse" 
                message="wsrpw:QueryResourcePropertiesResponse" />
            <fault  name="ResourceUnknownFault" 
                message="wsrpw:ResourceUnknownFault" />
            <fault  name="InvalidResourcePropertyQNameFault" 
                message="wsrpw:InvalidResourcePropertyQNameFault" />     
            <fault  name="UnknownQueryExpressionDialectFault" 
                message="wsrpw:UnknownQueryExpressionDialectFault" />
            <fault  name="InvalidQueryExpressionFault" 
                message="wsrpw:InvalidQueryExpressionFault" />
            <fault  name="QueryEvaluationErrorFault" 
                message="wsrpw:QueryEvaluationErrorFault" />
        </operation>
    </portType>

</definitions>