This call allows for the association of a resource file such as translation memory or the URI for a glossary with a particular job. The same resource file can be associated with any number of jobs.
Job tickets
– One or more jobs the resource should be associated withResource URI
– URI for the resource to be associated with the specified jobsPurpose
– Explains what the resource is intended to be used forJob ticket
Success Indication
Resource URI
– This may be a different URI from the one passed in.If the web service implementation returns a different URI from the one passed in this may refer to a modified version of the resource. An example of this would be a translation memory that is updated as part of executing the job.
It is recommended that the passed-in URI should remain active and accessible for the duration of all jobs that the resource has been associated with.
An entry of the following format will be added to the <history>
element returned from retrieveJobInformation
:
<event stage="job" status="resource associated" timeStamp="2005-01-01T12:00:00.000Z" additionalInformation="http://aCompany.com/Resource.tm"/>
You can call retrieveResourceInformation
to find out which jobs a particular resource URI is associated with.
To remove the association between a resource and a job, call disassociateResource
.
<xsd:element name="associateResourceRequest"> <xsd:complexType> <xsd:sequence> <xsd:element ref="types:ticket"/> <xsd:element ref="types:resource"/> <xsd:element ref="types:purpose"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="purpose"> <xsd:complexType> <xsd:sequence> <xsd:attribute name="usage" type="xsd:string" use="required"/> </xsd:sequence> </xsd:complexType> </xsd:element>
<xsd:element name="associateResourceResponse"> <xsd:complexType> <xsd:sequence> <xsd:element ref="types:ticket"/> <xsd:element ref="types:succeeded"/> <xsd:element ref="types:resource"/> </xsd:sequence> </xsd:complexType> </xsd:element>
<?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> <associateResourceRequest xmlns="urn:oasis:names:tc:wstrans:v1:types"> <ticket jobId="job-001" projectId="proj-002" userId="user-003"/> <resource uri="http://www.simship.com/resource1.pdf"/> <purpose usage="reference"/> </associateResourceRequest> </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> <associateResourceResponse xmlns="urn:oasis:names:tc:wstrans:v1:types"> <ticket jobId="job-001" projectId="proj-002" userId="user-003"/> <succeeded>0</succeeded> <resource uri="http://www.translate-this.com/trans-ws/download/resource1.pdf"/> </associateResourceResponse> </soapenv:Body> </soapenv:Envelope>
See also: disassociateResource
, retrieveResourceInformation