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

<wsdl:definitions name="authoring-service"
   targetNamespace="http://www.alfresco.org/ws/service/authoring/1.0" 
   xmlns:apachesoap="http://xml.apache.org/xml-soap" 
   xmlns:author="http://www.alfresco.org/ws/service/authoring/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">
   <!-- ************************************** -->
   <!-- Copyright Alfresco Software, Inc. 2005 -->
   <!-- ************************************** -->
   
   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/authoring/1.0" xmlns="http://www.w3.org/2001/XMLSchema">
      
         <xsd:import namespace="http://www.alfresco.org/ws/model/content/1.0" schemaLocation="../wsdl/types.xsd"/>
         
         <element name="checkout">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
                  <element name="destination" type="cms:ParentReference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="checkoutResponse">
            <complexType>
               <sequence>
                  <element name="checkoutReturn" type="author:CheckoutResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="checkin">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
                  <element name="comments" type="cms:NamedValue" minOccurs="0" maxOccurs="unbounded"/>
                  <element name="keepCheckedOut" type="xsd:boolean"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="checkinResponse">
            <complexType>
               <sequence>
                  <element name="checkinReturn" type="author:CheckinResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="checkinExternal">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Reference"/>
                  <element name="comments" type="cms:NamedValue" minOccurs="0" maxOccurs="unbounded"/>
                  <element name="keepCheckedOut" type="xsd:boolean"/>
                  <element name="format" type="cms:ContentFormat"/>
                  <element name="content" type="xsd:base64Binary"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="checkinExternalResponse">
            <complexType>
               <sequence>
                  <element name="checkinExternalReturn" type="cms:Reference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="cancelCheckout">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="cancelCheckoutResponse">
            <complexType>
               <sequence>
                  <element name="cancelCheckoutReturn" type="author:CancelCheckoutResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="lock">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
                  <element name="lockChildren" type="xsd:boolean"/>
                  <element name="lockType" type="author:LockTypeEnum"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="lockResponse">
            <complexType>
               <sequence>
                  <element name="lockReturn" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="unlock">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
                  <element name="unlockChildren" type="xsd:boolean"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="unlockResponse">
            <complexType>
               <sequence>
                  <element name="unlockReturn" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="getLockStatus">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="getLockStatusResponse">
            <complexType>
               <sequence>
                  <element name="getLockStatusReturn" type="author:LockStatus" minOccurs="0" maxOccurs="unbounded"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="createVersion">
            <complexType>
               <sequence>
                  <element name="items" type="cms:Predicate"/>
                  <element name="comments" type="cms:NamedValue" minOccurs="0" maxOccurs="unbounded"/>
                  <element name="versionChildren" type="xsd:boolean"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="createVersionResponse">
            <complexType>
               <sequence>
                  <element name="createVersionReturn" type="author:VersionResult"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="getVersionHistory">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="getVersionHistoryResponse">
            <complexType>
               <sequence>
                  <element name="getVersionHistoryReturn" type="cms:VersionHistory"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="revertVersion">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
                  <element name="versionLabel" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="revertVersionResponse">
            <complexType>
               <sequence/>
            </complexType>
         </element>
         
         <element name="deleteAllVersions">
            <complexType>
               <sequence>
                  <element name="node" type="cms:Reference"/>
               </sequence>
            </complexType>
         </element>
         
         <element name="deleteAllVersionsResponse">
            <complexType>
               <sequence>
                  <element name="deleteAllVersionsReturn" type="cms:VersionHistory"/>
               </sequence>
            </complexType>
         </element>
         
         <complexType name="CheckoutResult">
            <sequence>
               <element name="originals" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               <element name="workingCopies" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </complexType>
         <element name="CheckoutResult" type="author:CheckoutResult"/>
         
         <complexType name="CheckinResult">
            <sequence>
               <element name="workingCopies" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               <element name="checkedIn" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </complexType>
         <element name="CheckinResult" type="author:CheckinResult"/>
         
         <complexType name="CancelCheckoutResult">
            <sequence>
               <element name="workingCopies" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               <element name="originals" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </complexType>
         <element name="CancelCheckoutResult" type="author:CancelCheckoutResult"/>
         
         <complexType name="LockStatus">
            <sequence>
               <element name="node" type="cms:Reference"/>
               <element name="lockType" type="author:LockTypeEnum" maxOccurs="1" minOccurs="0" nillable="true"/>
               <element name="lockOwner" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"/>
            </sequence>
         </complexType>
         <element name="LockStatus" type="author:LockStatus"/>
         
         <complexType name="VersionResult">
            <sequence>
               <element name="nodes" type="cms:Reference" minOccurs="0" maxOccurs="unbounded"/>
               <element name="versions" type="cms:Version" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
         </complexType>
         <element name="VersionResult" type="author:VersionResult"/>
         
         <!-- 
         <complexType name="LockType">
            <sequence>
               <element name="type" type="author:LockTypeEnum"/>
            </sequence>
         </complexType>
         <element name="LockType" type="author:LockType"/>
         -->
         
         <xsd:simpleType name="LockTypeEnum">
    	      <xsd:restriction base="xsd:string">
    		      <xsd:enumeration value="read"/>
    		      <xsd:enumeration value="write"/>
            </xsd:restriction>
         </xsd:simpleType>
    
         <complexType name="AuthoringFault">
            <sequence>
               <element name="errorCode" type="xsd:int"/>
               <element name="message" type="xsd:string"/>
            </sequence>
         </complexType>
         <element name="AuthoringFault" type="author:AuthoringFault"/>
      </schema>
   </wsdl:types>

   <wsdl:message name="checkoutRequest">
      <wsdl:part element="author:checkout" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="checkoutResponse">
      <wsdl:part element="author:checkoutResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="checkinRequest">
      <wsdl:part element="author:checkin" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="checkinResponse">
      <wsdl:part element="author:checkinResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="checkinExternalRequest">
      <wsdl:part element="author:checkinExternal" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="checkinExternalResponse">
      <wsdl:part element="author:checkinExternalResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="cancelCheckoutRequest">
      <wsdl:part element="author:cancelCheckout" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="cancelCheckoutResponse">
      <wsdl:part element="author:cancelCheckoutResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="lockRequest">
      <wsdl:part element="author:lock" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="lockResponse">
      <wsdl:part element="author:lockResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="unlockRequest">
      <wsdl:part element="author:unlock" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="unlockResponse">
      <wsdl:part element="author:unlockResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="getLockStatusRequest">
      <wsdl:part element="author:getLockStatus" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="getLockStatusResponse">
      <wsdl:part element="author:getLockStatusResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="createVersionRequest">
      <wsdl:part element="author:createVersion" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="createVersionResponse">
      <wsdl:part element="author:createVersionResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="getVersionHistoryRequest">
      <wsdl:part element="author:getVersionHistory" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="getVersionHistoryResponse">
      <wsdl:part element="author:getVersionHistoryResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="revertVersionRequest">
      <wsdl:part element="author:revertVersion" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="revertVersionResponse">
      <wsdl:part element="author:revertVersionResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="deleteAllVersionsRequest">
      <wsdl:part element="author:deleteAllVersions" name="parameters"/>
   </wsdl:message>

   <wsdl:message name="deleteAllVersionsResponse">
      <wsdl:part element="author:deleteAllVersionsResponse" name="parameters"/>
   </wsdl:message>
   
   <wsdl:message name="AuthoringFault">
      <wsdl:part element="author:AuthoringFault" name="fault"/>
   </wsdl:message>
   
   <wsdl:portType name="AuthoringServiceSoapPort">
      <wsdl:operation name="checkout">
         <wsdl:documentation>Checkout a content resource for editing.</wsdl:documentation>
         <wsdl:input message="author:checkoutRequest" name="checkoutRequest"/>
         <wsdl:output message="author:checkoutResponse" name="checkoutResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="checkin">
         <wsdl:documentation>Checkin a content resource.</wsdl:documentation>
         <wsdl:input message="author:checkinRequest" name="checkinRequest"/>
         <wsdl:output message="author:checkinResponse" name="checkinResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="checkinExternal">
         <wsdl:documentation>Checkin an external content resource thus replacing the existing working content.</wsdl:documentation>
         <wsdl:input message="author:checkinExternalRequest" name="checkinExternalRequest"/>
         <wsdl:output message="author:checkinExternalResponse" name="checkinExternalResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="cancelCheckout">
         <wsdl:documentation>Cancels the checkout.</wsdl:documentation>
         <wsdl:input message="author:cancelCheckoutRequest" name="cancelCheckoutRequest"/>
         <wsdl:output message="author:cancelCheckoutResponse" name="cancelCheckoutResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="lock">
         <wsdl:documentation>Locks a content resource.</wsdl:documentation>
         <wsdl:input message="author:lockRequest" name="lockRequest"/>
         <wsdl:output message="author:lockResponse" name="lockResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="unlock">
         <wsdl:documentation>Unlocks a content resource.</wsdl:documentation>
         <wsdl:input message="author:unlockRequest" name="unlockRequest"/>
         <wsdl:output message="author:unlockResponse" name="unlockResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="getLockStatus">
         <wsdl:documentation>Gets the lock status of the specified nodes.</wsdl:documentation>
         <wsdl:input message="author:getLockStatusRequest" name="getLockStatusRequest"/>
         <wsdl:output message="author:getLockStatusResponse" name="getLockStatusResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="createVersion">
         <wsdl:documentation>Create a snapshot of the specified node(s) in the version store.</wsdl:documentation>
         <wsdl:input message="author:createVersionRequest" name="createVersionRequest"/>
         <wsdl:output message="author:createVersionResponse" name="createVersionResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="getVersionHistory">
         <wsdl:documentation>Gets the version history for the specfied node.</wsdl:documentation>
         <wsdl:input message="author:getVersionHistoryRequest" name="getVersionHistoryRequest"/>
         <wsdl:output message="author:getVersionHistoryResponse" name="getVersionHistoryResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="revertVersion">
         <wsdl:documentation>Revert a node to the snapshot of the specified version.</wsdl:documentation>
         <wsdl:input message="author:revertVersionRequest" name="revertVersionRequest"/>
         <wsdl:output message="author:revertVersionResponse" name="revertVersionResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
      <wsdl:operation name="deleteAllVersions">
         <wsdl:documentation>Delete all snapshot versions of the specified node.</wsdl:documentation>
         <wsdl:input message="author:deleteAllVersionsRequest" name="deleteAllVersionsRequest"/>
         <wsdl:output message="author:deleteAllVersionsResponse" name="deleteAllVersionsResponse"/>
         <wsdl:fault message="author:AuthoringFault" name="AuthoringFault"/>
      </wsdl:operation>
   </wsdl:portType>
   
   <wsdl:binding name="AuthoringServiceSoapBinding" type="author:AuthoringServiceSoapPort">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="checkout">
         <wsdl:documentation>Checkout a content resource for editing.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/checkout"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="checkin">
         <wsdl:documentation>Checkin a content resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/checkin"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="checkinExternal">
         <wsdl:documentation>Checkin an external content resource thus replacing the existing working content.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/checkinExternal"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="cancelCheckout">
         <wsdl:documentation>Cancels the checkout.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/cancelCheckout"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="lock">
         <wsdl:documentation>Locks a content resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/lock"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="unlock">
         <wsdl:documentation>Unlocks a content resource.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/unlock"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="getLockStatus">
         <wsdl:documentation>Gets the lock status of the specified nodes.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/getLockStatus"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="createVersion">
         <wsdl:documentation>Create a snapshot of the specified node(s) in the version store.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/createVersion"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="getVersionHistory">
         <wsdl:documentation>Gets the version history for the specfied node.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/getVersionHistory"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="revertVersion">
         <wsdl:documentation>Revert a node to the snapshot of the specified version.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/revertVersion"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
      <wsdl:operation name="deleteAllVersions">
         <wsdl:documentation>Delete all snapshot versions of the specified node.</wsdl:documentation>
         <wsdlsoap:operation soapAction="http://www.alfresco.org/ws/service/authoring/1.0/deleteAllVersions"/>
         <wsdl:input>
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
         <wsdl:fault name="AuthoringFault">
            <wsdlsoap:fault namespace="http://www.alfresco.org/ws/service/authoring/1.0" use="literal" name="AuthoringFault"/>
         </wsdl:fault>
      </wsdl:operation>
   </wsdl:binding>

   <wsdl:service name="AuthoringService">
      <wsdl:documentation>Provides support for collaborative editing of content.</wsdl:documentation>
      <wsdl:port binding="author:AuthoringServiceSoapBinding" name="AuthoringService">
         <wsdlsoap:address location="http://localhost:8080/alfresco/api/AuthoringService"/>
      </wsdl:port>
   </wsdl:service>
   
</wsdl:definitions>
