Share via


GetJobElementsRequest element

The required GetJobElementsRequest element requests the values of job-related variables for the job identified by the value of the JobId element.

GetJobElementsRequest is defined in the namespace at this URI: https://schemas.microsoft.com/windows/2005/05/wdp/print and referenced by the prefix wprt. (This resource may not be available in some languages and countries.)

Usage

<wprt:GetJobElementsRequest>
  child elements
</wprt:GetJobElementsRequest>

Attributes

There are no attributes.

Text value

None

Child elements

Element Description

JobId

Uniquely identifies a job on a printer.

RequestedElements

Identifies the elements that the client wants data for when it calls GetPrinterElementsRequest or GetJobElementsRequest.

Parent elements

There are no parent elements.

Remarks

The WSD Print Service must support the GetJobElementsRequest operation.

A client calls GetJobElementsRequest to determine the values of job-related variables for the job identified by JobId. The WSD Print Service must respond with a GetJobElementsResponse element that contains the information the client asked for or the appropriate error codes.

All the codes described in Common Operation Error Codes could be returned from this operation. See Operation Error Reporting for details about how to report errors. The Print Service should also check for the following error condition in this operation:

  • ClientErrorJobIdNotFound

    If the specified job is not found, the Print Service returns the error ClientErrorJobIdNotFound. This indicates that the job never existed (including when the argument is not in the range 1 to 2147483647 (231-1), or has reached its terminating state (completed, canceled, or aborted) and is no longer known to the Print Service.)

    Fault Property Property Definition
    [Code] soap:Sender
    [Subcode] wprt:ClientErrorJobIdNotFound
    [Reason] Specified JobId not found
    [Detail] Incorrect JobId

     

In the following example code, note that you must also prefix the names of the child and other elements with the appropriate namespace to be certain that your name references apply to elements in the correct namespace.

Examples

The following example requests the status of the job identified by JobId 1.

<soap:Envelope
    xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
    xmlns:wsdp="https://schemas.xmlsoap.org/ws/2005/05/devprof"
    xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wprt="https://schemas.microsoft.com/windows/2005/05/wdp/print">
    soap:encodingStyle='https://www.w3.org/2002/12/soap-encoding' >
  <soap:Header>
    <wsa:To>uuid:DeviceUUID</wsa:To>
    <wsdp:ServiceId>uri:IdofThisService</wsdp:ServiceId>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2005/05/wdp/print/GetJobElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>
  <soap:Body>
    <wprt:GetJobElementsRequest>
      <wprt:JobId>1</wprt:JobId>
      <wprt:RequestedElements>
        <wprt:Name>wprt:JobStatus</wprt:Name>
      </wprt:RequestedElements>
    </wprt:GetPrinterElementsRequest >
  </soap:Body>
</soap:Envelope>

The following code sample shows a client's query for multiple elements (PrintTicket, Documents, and an invalid request).

<soap:Envelope
    xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
    xmlns:wsdp="https://schemas.xmlsoap.org/ws/2005/05/devprof"
    xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wprt="https://schemas.microsoft.com/windows/2005/05/wdp/print">
    soap:encodingStyle='https://www.w3.org/2002/12/soap-encoding' >
  <soap:Header>
    <wsa:To>uuid:DeviceUUID</wsa:To>
    <wsdp:ServiceId>uri:IdofThisService</wsdp:ServiceId>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2005/05/wdp/print/GetJobElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>
  <soap:Body>
    <wprt:GetJobElementsRequest>
      <wprt:RequestedElements>
        <wprt:Name>wprt:PrintTicket</wprt:Name>
        <wprt:Name>wprt:Documents</wprt:Name>
        <wprt:Name>wprt:InvalidQName</wprt:Name>
      </wprt:RequestedElements>
    </wprt:GetPrinterElementsRequest >
  </soap:Body>
</soap:Envelope>

See also

GetJobElementsResponse

JobId

RequestedElements

 

 

Send comments about this topic to Microsoft

Build date: 7/19/2012