<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions name="repository-service"
   targetNamespace="http://www.alfresco.org/ws/service/repository/1.0" 
   xmlns:apachesoap="http://xml.apache.org/xml-soap" 
   xmlns:rep="http://www.alfresco.org/ws/service/repository/1.0" 
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   xmlns:cms="http://www.alfresco.org/ws/model/content/1.0"
   xmlns:cml="http://www.alfresco.org/ws/cml/1.0"
   xmlns:headers="http://www.alfresco.org/ws/headers/1.0">
   <!-- ************************************** -->
   <!-- Copyright Alfresco Software, Inc. 2005 -->
   <!-- ************************************** -->

   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0" xmlns="http://www.w3.org/2001/XMLSchema">
         
         <xsd:import namespace="http://www.alfresco.org/ws/headers/1.0" schemaLocation="../wsdl/headers.xsd"></xsd:import>
         <xsd:import namespace="http://www.alfresco.org/ws/cml/1.0" schemaLocation="../wsdl/cml.xsd"></xsd:import>
         
         <element name="createStore">
         	<complexType>
               <sequence>
                  <element name="scheme" type="xsd:string"/>
                  <element name="address" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="createStoreResponse">
            <complexType>
               <sequence>
                  <element name="createStoreReturn" type="cms:Store"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="getStores">
            <complexType>
               <sequence/>
            </complexType>
         </element>
         
         <element name="getStoresResponse">
            <complexType>
               <sequence>
                  <element name="getStoresReturn" type="cms:Store" minOccurs="1" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="query">
            <complexType>
               <sequence>
                  <element name="store" type="cms:Store"/>
                  <element name="query" type="cms:Query"/>
                  <element name="includeMetaData" type="xsd:boolean"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="rep:QueryResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryChildren">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryChildrenResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="rep:QueryResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryParents">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryParentsResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="rep:QueryResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryAssociated">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
                  <element name="association" type="rep:Association" nillable="true"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="queryAssociatedResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="rep:QueryResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="fetchMore">
            <complexType>
               <sequence>
                  <element name="querySession" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="fetchMoreResponse">
            <complexType>
               <sequence>
                  <element name="queryReturn" type="rep:QueryResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="update">
            <complexType>
               <sequence>
                  <element name="statements" type="cml:CML"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="updateResponse">
            <complexType>
               <sequence>
                  <element name="updateReturn" type="rep:UpdateResult" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="describe">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="describeResponse">
            <complexType>
               <sequence>
                  <element name="describeReturn" type="cms:NodeDefinition" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="get">
            <complexType>
               <sequence>
                  <element name="where" type="cms:Predicate"/>
               </sequence>
            </complexType>
         </element>

         <element name="getResponse">
            <complexType>
               <sequence>
                  <element name="getReturn" type="cms:Node" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <complexType name="QueryResult">
            <sequence>
               <element name="querySession" type="xsd:string" nillable="true"/>
               <element name="resultSet" type="cms:ResultSet"/>
            </sequence>
         </complexType>
         <element name="QueryResult" type="rep:QueryResult"/>
         
         <complexType name="UpdateResult">
            <sequence>
               <element name="statement" type="xsd:string"/>
               <element name="updateCount" type="cms:ResultSet" nillable="true"/>
               <element name="sourceId" type="xsd:string" nillable="true"/>
               <element name="source" type="cms:Reference" nillable="true"/>
               <element name="destination" type="cms:Reference" nillable="true"/>
            </sequence>
         </complexType>
         <element name="UpdateResult" type="rep:UpdateResult"/>
         
         <complexType name="Association">
            <sequence>
               <element name="associationType" type="cms:Name" nillable="true"/>
               <element name="direction" type="xsd:string" nillable="true"/>
            </sequence>
         </complexType>
         <element name="Association" type="rep:Association"/>
         
         <complexType name="RepositoryFault">
            <sequence>
               <element name="errorCode" type="xsd:int"/>
               <element name="message" type="xsd:string"/>
            </sequence>
         </complexType>
         <element name="RepositoryFault" type="rep:RepositoryFault"/>
         
         <element name="QueryConfiguration" type="headers:QueryConfiguration" />
      </schema>
   </wsdl:types>

   <wsdl:message name="Headers">
      <wsdl:documentation>Defines the SOAP headers used by this service.</wsdl:documentation>
      <wsdl:part element="rep:QueryConfiguration" name="QueryConfiguration"/>
   </wsdl:message>
   
   <wsdl:message name="createStoreRequest">
      <wsdl:part element="rep:createStore" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="createStoreResponse">
      <wsdl:part element="rep:createStoreResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="getStoresRequest">
      <wsdl:part element="rep:getStores" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="getStoresResponse">
      <wsdl:part element="rep:getStoresResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="queryRequest">
      <wsdl:part element="rep:query" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="queryResponse">
      <wsdl:part element="rep:queryResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="queryChildrenRequest">
      <wsdl:part element="rep:queryChildren" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="queryChildrenResponse">
      <wsdl:part element="rep:queryChildrenResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="queryParentsRequest">
      <wsdl:part element="rep:queryParents" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="queryParentsResponse">
      <wsdl:part element="rep:queryParentsResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="queryAssociatedRequest">
      <wsdl:part element="rep:queryAssociated" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="queryAssociatedResponse">
      <wsdl:part element="rep:queryAssociatedResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="fetchMoreRequest">
      <wsdl:part element="rep:fetchMore" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="fetchMoreResponse">
      <wsdl:part element="rep:fetchMoreResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="updateRequest">
      <wsdl:part element="rep:update" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="updateResponse">
      <wsdl:part element="rep:updateResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="describeRequest">
      <wsdl:part element="rep:describe" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="describeResponse">
      <wsdl:part element="rep:describeResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="getRequest">
      <wsdl:part element="rep:get" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="getResponse">
      <wsdl:part element="rep:getResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="RepositoryFault">
      <wsdl:part element="rep:RepositoryFault" name="fault"/>
   </wsdl:message>
   
   <wsdl:portType name="RepositoryServiceSoapPort">
      <wsdl:operation name="createStore">
         <wsdl:documentation>Creates a new repository store.</wsdl:documentation>
         <wsdl:input message="rep:createStoreRequest" name="createStoreRequest"/>
         <wsdl:output message="rep:createStoreResponse" name="createStoreResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="getStores">
         <wsdl:documentation>Retrieves a list of stores where content resources are held.</wsdl:documentation>
         <wsdl:input message="rep:getStoresRequest" name="getStoresRequest"/>
         <wsdl:output message="rep:getStoresResponse" name="getStoreResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="query">
         <wsdl:documentation>Executes a query against a store.</wsdl:documentation>
         <wsdl:input message="rep:queryRequest" name="queryRequest"/>
         <wsdl:output message="rep:queryResponse" name="queryResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="queryChildren">
         <wsdl:documentation>Executes a query to retrieve the children of the specified resource.</wsdl:documentation>
         <wsdl:input message="rep:queryChildrenRequest" name="queryChildrenRequest"/>
         <wsdl:output message="rep:queryChildrenResponse" name="queryChildrenResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="queryParents">
         <wsdl:documentation>Executes a query to retrieve the parents of the specified resource.</wsdl:documentation>
         <wsdl:input message="rep:queryParentsRequest" name="queryParentsRequest"/>
         <wsdl:output message="rep:queryParentsResponse" name="queryParentsResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="queryAssociated">
         <wsdl:documentation>Executes a query to retrieve associated resources of the specified resource.</wsdl:documentation>
         <wsdl:input message="rep:queryAssociatedRequest" name="queryAssociatedRequest"/>
         <wsdl:output message="rep:queryAssociatedResponse" name="queryAssociatedResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="fetchMore">
         <wsdl:documentation>Fetches the next batch of query results.</wsdl:documentation>
         <wsdl:input message="rep:fetchMoreRequest" name="fetchMoreRequest"/>
         <wsdl:output message="rep:fetchMoreResponse" name="fetchMoreResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="update">
         <wsdl:documentation>Executes a CML script to manipulate the contents of a Repository store.</wsdl:documentation>
         <wsdl:input message="rep:updateRequest" name="updateRequest"/>
         <wsdl:output message="rep:updateResponse" name="updateResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="describe">
         <wsdl:documentation>Describes a content resource.</wsdl:documentation>
         <wsdl:input message="rep:describeRequest" name="describeRequest"/>
         <wsdl:output message="rep:describeResponse" name="describeResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
      <wsdl:operation name="get">
         <wsdl:documentation>Gets a resource from the repository.</wsdl:documentation>
         <wsdl:input message="rep:getRequest" name="getRequest"/>
         <wsdl:output message="rep:getResponse" name="getResponse"/>
         <wsdl:fault message="rep:RepositoryFault" name="RepositoryFault"/>
      </wsdl:operation>
   </wsdl:portType>
   
   <wsdl:binding name="RepositoryServiceSoapBinding" type="rep:RepositoryServiceSoapPort">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="createStore">
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/createStore"/>
         <wsdl:input name="createStoreRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="createStoreResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="getStores">
         <wsdl:documentation>Retrieves a list of stores where content resources are held.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/getStores"/>
         <wsdl:input name="getStoresRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getStoreResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="query">
         <wsdl:documentation>Executes a query against a store</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/query"/>
         <wsdl:input name="queryRequest">
            <wsdlsoap:header use="literal" message="rep:Headers" part="QueryConfiguration"/>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="queryResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="queryChildren">
         <wsdl:documentation>Executes a query to retrieve the children of the specified resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/queryChildren"/>
         <wsdl:input name="queryChildrenRequest">
            <wsdlsoap:header use="literal" message="rep:Headers" part="QueryConfiguration"/>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="queryChildrenResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="queryParents">
         <wsdl:documentation>Executes a query to retrieve the parents of the specified resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/queryParents"/>
         <wsdl:input name="queryParentsRequest">
            <wsdlsoap:header use="literal" message="rep:Headers" part="QueryConfiguration"/>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="queryParentsResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="queryAssociated">
         <wsdl:documentation>Executes a query to retrieve associated resources of the specified resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/queryAssociated"/>
         <wsdl:input name="queryAssociatedRequest">
            <wsdlsoap:header use="literal" message="rep:Headers" part="QueryConfiguration"/>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="queryAssociatedResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="fetchMore">
         <wsdl:documentation>Fetches the next batch of query results.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/fetchMore"/>
         <wsdl:input name="fetchMoreRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="fetchMoreResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="update">
         <wsdl:documentation>Executes a CML script to manipulate the contents of a Repository store.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/update"/>
         <wsdl:input name="updateRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="updateResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="describe">
         <wsdl:documentation>Describes a content resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/describe"/>
         <wsdl:input name="describeRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="describeResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>      
      <wsdl:operation name="get">
         <wsdl:documentation>Gets a resource from the respository.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/repository/1.0/get"/>
         <wsdl:input name="getRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="RepositoryFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/repository/1.0" use="literal" name="RepositoryFault"/>
         </wsdl:fault>
      </wsdl:operation>
   </wsdl:binding>

   <wsdl:service name="RepositoryService">
      <wsdl:documentation>Provides read and write operations against a repository.</wsdl:documentation>
      <wsdl:port binding="rep:RepositoryServiceSoapBinding" name="RepositoryService">
         <wsdlsoap:address location="http://localhost:8080/alfresco/api/RepositoryService"/>
      </wsdl:port>
   </wsdl:service>
   
</wsdl:definitions>
