submitJobRequest Function for SOAP Web Services
Given the parameters for a print job request, this function submits the print job for processing. The response includes the print job ID number.
When you create a SOAP Web Service data service for which the WSDL URL is the Spectrum Services Web Services Description Language (WSDL), an operation envelope template containing this function is one of those available. For more information about using SOAP Web Services in Spectrum, see SOAP API for Web Services.
Important! Content in a SOAP Web Service data service or a Web Service integration is case sensitive. This includes names, attributes, and values.
About the syntax documentation
SOAP Operation Envelope (Request)
When you create a SOAP Web Service data service, the XML of the operation envelope template that you select is displayed as the Envelope parameter. Most operation envelope templates include some elements for which you must replace the value with a value appropriate to your environment. If this operation envelope template has such elements, they are described here.
<soap:Body>
<pub:submitJobRequest xmlns:pub="http://published.webservices.loftware.com/">
<jobRequest>
<clientCode>SoapSampleApp</clientCode>
<folderUrl><!-- Replace with the FQN of the JOB TARGET folder you wish to use</folderUrl>
<jobData>
<entryList>
<name>...</name>
<value>...</value>
</entryList>
<!-- Add more entryList elements as needed to supply data to Spectrum. -->
<!-- You can nest entryList elements. Notice that parent entryList elements do not include value.
-->
<entryList>
<name>...</name>
<entryList>
<name>...</name>
<value>...</value>
</entryList>
</entryList>
</jobData>
</jobRequest>
</pub:submitJobRequest>
</soap:Body>
Example: A Simple Print Request
The following example is for a simple print request for a label template with no Prompt fields.
<soap:Body>
<pub:submitJobRequest xmlns:pub="http://published.webservices.loftware.com/">
<jobRequest>
<clientCode>SoapSampleApp</clientCode>
<folderUrl>/Default/Label Templates</folderUrl>
<jobData>
<entryList>
<name>!DESTINATION!</name>
<value>/Default/IP_ZPL_II</value>
</entryList>
<entryList>
<name>!DOCUMENT_URL!</name>
<value>/Default/Label Templates/test_text</value>
</entryList>
<!-- In the following nested entryList, /Body/fieldname is configured. Notice that parent entryList elements do not include value. You can nest more entryList elements as needed.
-->
<entryList>
<name>Body</name>
<entryList>
<name>fieldname</name>
<value>Text Value</value>
</entryList>
</entryList>
<!-- Add more entryList elements as needed to supply data to Spectrum -->
</jobData>
</jobRequest>
</pub:submitJobRequest>
</soap:Body>
Tip: If you are creating a more complex print request, refer to the Spectrum WSDL for additional detail about the syntax. For more information, see the "Spectrum WSDL" section in SOAP API for Web Services.
SOAP Response Function
The following is the structure of the Response Function expected as part of a SOAP Response received in response to the preceding type of SOAP Operation Envelope (Request). Any ellipses indicate expected data. For more information, see SOAP API for Web Services.
The response includes one result element that includes a long value representing the print job ID, such as 10000160.
<pub:submitJobRequestResponse xmlns:pub="http://published.webservices.loftware.com/">
<return success="[true|false]">
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:long">...
</result>
</return>
</pub:submitJobRequestResponse>