CreatePrintJobResponse element

The required CreatePrintJobResponse element contains the WSD Print Service's response to a client's print request.

CreatePrintJobResponse 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:CreatePrintJobResponse>
  child elements
</wprt:CreatePrintJobResponse>

Attributes

There are no attributes.

Text value

None

Child elements

Element Description

JobId

Uniquely identifies a job on a printer.

Parent elements

There are no parent elements.

Remarks

The WSD Print Service must support the CreatePrintJobResponse operation.

The WSD Print Service sends a CreatePrintJobResponse operation to the client in response to the client's CreatePrintJobRequest.

If the client has made a valid print request, the Print Service must return a unique JobId element with CreatePrintJobResponse to identify the job. JobId must be in the range of 1 to 2147483647 (231-1), and can be generated in an implementation-defined manner. The WSD Print Service should not reuse values recently assigned because a client could confuse such jobs with older jobs.

If the client has made an invalid print request, the Print Service must return the appropriate error code instead of CreatePrintJobResponse. See CreatePrintJobRequest for error checking details and codes.

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 code sample shows the print service's response to a client's CreatePrintJobRequest.

<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>
      https://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
    </wsa:To>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2005/05/wdp/print/CreatePrintJobResponse
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
    <wsa:RelatesTo>uuid:MsgIdOfTheCreatePrintJobRequest</wsa:RelatesTo>
  </soap:Header>
  <soap:Body>
    <wprt:CreatePrintJobResponse>
      <wprt:JobId>1</wprt:JobId>
    </wprt:CreatePrintJobResponse>
  </soap:Body>
</soap:Envelope>

See also

CreatePrintJobRequest

JobId

 

 

Send comments about this topic to Microsoft

Build date: 7/19/2012