<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:cath="http://trunk.cathdb.info/api/wsdl"
	xmlns:types="http://trunk.cathdb.info/api/xsd"
	name="CATHEDRAL-0.1"
	targetNamespace="http://trunk.cathdb.info/api/wsdl">
	
	<wsdl:types>
		<xsd:schema targetNamespace="http://trunk.cathdb.info/api/wsdl">
		
			<xsd:import namespace="http://trunk.cathdb.info/api/xsd" schemaLocation="http://trunk.cathdb.info/api/xsd/GridTypes.xsd"/>
		
			<xsd:element name="SubmitQuery">
				<xsd:annotation>
					<xsd:documentation>
						Submit a protein structure (or an identifier representing a structure
						or part thereof) to be scanned against a specific library (defaults
						to Sreps of current version of CATH).
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="queryStruct" type="types:ProteinStruct" />
						<xsd:element name="cathedralLibrary" type="xsd:string" nillable="true" />
						<xsd:element name="emailAddress" type="xsd:string" />
						<xsd:element name="enableEmailNotify" type="xsd:boolean" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="SubmitQueryResponse">
				<xsd:annotation>
					<xsd:documentation>
						A unique job identifier.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobID" type="xsd:string" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>

			<xsd:element name="MonitorJob">
				<xsd:annotation>
					<xsd:documentation>
						Check on the status of a job you've submitted,
						by supplying the jobID and your email address.
					</xsd:documentation>

				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobLocator" type="types:JobLocator" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="MonitorJobResponse">
				<xsd:annotation>
					<xsd:documentation>
						A status code and optionally an explanatory message supplying
						more detail about the status.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobStatus" type="types:JobStatus" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="RetrieveChainHits">
				<xsd:annotation>
					<xsd:documentation>
						Retrieve the chain-level hits found by a completed job (a fault occurs if the
						job isn't in an appropriate state). Both the email address and
						jobID associated with the job are required.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobLocator" type="types:JobLocator" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="RetrieveChainHitsResponse">
				<xsd:annotation>
					<xsd:documentation>
						All of the chain hits for the structure supplied.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="chainResult" type="types:ChainCathedralResult" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="RetrieveDomainHits">
				<xsd:annotation>
					<xsd:documentation>
						Retrieve the domain-level hits found by a completed job (a fault occurs if the
						job isn't in an appropriate state). Both the email address and
						jobID associated with the job are required.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobLocator" type="types:JobLocator" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="RetrieveDomainHitsResponse">
				<xsd:annotation>
					<xsd:documentation>
						All of the domain hits for the structure supplied.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="domainResult" type="types:DomainCathedralResult" minOccurs="0" maxOccurs="unbounded" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="CancelJob">
				<xsd:annotation>
					<xsd:documentation>
						Cancel a running job, by supplying jobID and email address. All temporary
						files etc. on the server will be deleted, and no results will be obtainable
						for this job.
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobLocator" type="types:JobLocator" />

					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
			<xsd:element name="CancelJobResponse">
				<xsd:annotation>
					<xsd:documentation>
						The new status of the job. Should be CANCELLED unless something has gone
						wrong (in which case, check the comments field).
					</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="jobStatus" type="types:JobStatus" />
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			
		</xsd:schema>
	</wsdl:types>
	
	<wsdl:message name="SubmitQueryRequest">
		<wsdl:part element="cath:SubmitQuery" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="SubmitQueryResponse">
		<wsdl:part element="cath:SubmitQueryResponse" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="MonitorJobRequest">
		<wsdl:part element="cath:MonitorJob" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="MonitorJobResponse">
		<wsdl:part element="cath:MonitorJobResponse" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="RetrieveChainHitsRequest">
		<wsdl:part element="cath:RetrieveChainHits" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="RetrieveChainHitsResponse">
		<wsdl:part element="cath:RetrieveChainHitsResponse" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="RetrieveDomainHitsRequest">
		<wsdl:part element="cath:RetrieveDomainHits" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="RetrieveDomainHitsResponse">
		<wsdl:part element="cath:RetrieveDomainHitsResponse" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="CancelJobRequest">
		<wsdl:part element="cath:CancelJob" name="parameters" />
	</wsdl:message>
	
	<wsdl:message name="CancelJobResponse">
		<wsdl:part element="cath:CancelJobResponse" name="parameters" />
	</wsdl:message>

	<wsdl:portType name="CathedralScan">
		<wsdl:operation name="SubmitQuery">
			<wsdl:input message="cath:SubmitQueryRequest" />
			<wsdl:output message="cath:SubmitQueryResponse" />
		</wsdl:operation>
		<wsdl:operation name="MonitorJob">
			<wsdl:input message="cath:MonitorJobRequest" />
			<wsdl:output message="cath:MonitorJobResponse" />
		</wsdl:operation>
		<wsdl:operation name="RetrieveChainHits">
			<wsdl:input message="cath:RetrieveChainHitsRequest" />
			<wsdl:output message="cath:RetrieveChainHitsResponse" />
		</wsdl:operation>
		<wsdl:operation name="RetrieveDomainHits">
			<wsdl:input message="cath:RetrieveDomainHitsRequest" />
			<wsdl:output message="cath:RetrieveDomainHitsResponse" />
		</wsdl:operation>
		<wsdl:operation name="CancelJob">
			<wsdl:input message="cath:CancelJobRequest" />
			<wsdl:output message="cath:CancelJobResponse" />
		</wsdl:operation>
	</wsdl:portType>

	<wsdl:binding name="CathedralScanSOAP" type="cath:CathedralScan">
		<soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />

		<wsdl:operation name="SubmitQuery">
			<soap:operation soapAction="http://trunk.cathdb.info/CathedralScan/SubmitQuery" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>

		<wsdl:operation name="MonitorJob">
			<soap:operation soapAction="http://trunk.cathdb.info/CathedralScan/MonitorJob" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>

		<wsdl:operation name="RetrieveChainHits">
			<soap:operation soapAction="http://trunk.cathdb.info/CathedralScan/RetrieveChainHits" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>

		<wsdl:operation name="RetrieveDomainHits">
			<soap:operation soapAction="http://trunk.cathdb.info/CathedralScan/RetrieveDomainHits" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>

		<wsdl:operation name="CancelJob">
			<soap:operation soapAction="http://trunk.cathdb.info/CathedralScan/CancelJob" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>

	</wsdl:binding>

	<wsdl:service name="CathedralScan">
		<wsdl:port binding="cath:CathedralScanSOAP" name="CathedralScanSOAP">
			<soap:address location="http://trunk.cathdb.info/CathedralScan" />
		</wsdl:port>
	</wsdl:service>
	
</wsdl:definitions>
