Using this method the Client may request that any currently active, not completed job be cancelled.
Note: This is a request only as the service cannot guarantee to comply with this immediately. There may still be a cost incurred.
cancelJob
will fail if the job is in a completed state.
An entry with the following information will be added to the <history>
element returned from retrieveJobInformation
:
<event stage="job" status="cancelled" timeStamp="2005-01-01T12:00:00.000Z"/>
<xsd:element name="cancelJobRequest"> <xsd:complexType> <xsd:sequence> <xsd:element ref="types:ticket"/> </xsd:sequence> </xsd:complexType> </xsd:element>
<xsd:element name="cancelJobResponse"> <xsd:complexType> <xsd:sequence> <xsd:element ref="types:ticket"/> <xsd:element ref="types:succeeded"/> <xsd:element ref="types:info"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="succeeded" type="xsd:boolean"/>
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <cancelJobRequest xmlns="urn:oasis:names:tc:wstrans:v1:types"> <ticket jobId="job-001" projectId="proj-002" userId="user-003"/> </cancelJobRequest> </soapenv:Body> </soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <cancelJobResponse xmlns="urn:oasis:names:tc:wstrans:v1:types"> <ticket jobId="job-001" projectId="proj-002" userId="user-003"/> <succeeded>1</succeeded> <info>Cancellation succeeded</info> </cancelJobResponse> </soapenv:Body> </soapenv:Envelope>