GetJobHistoryResponse element

The required GetJobHistoryResponse element returns a summary of job-related variables for previously completed jobs.

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

Attributes

There are no attributes.

Text value

None

Child elements

Element Description

JobHistory

Contains information about print jobs that have not yet completed processing.

Parent elements

There are no parent elements.

Remarks

The WSD Print Service must support the GetJobHistoryResponse operation.

A client calls GetJobHistoryRequest to determine the values of job-related variables of previously completed jobs. The WSD Print Service must respond with a GetJobHistoryResponse element that contains the information the client asked for or the appropriate error codes.

The amount of history maintained by the Print Service is implementation-specific.

In the following code example, 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 example returns a list of jobs and associated data in response to a request for job history. This example returns history for the last two completed jobs.

<soap:Envelope
    xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
    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/GetJobHistoryResponse
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
    <wsa:RelatesTo>uuid:MsgIdOfTheGetJobHistoryRequest</wsa:RelatesTo>
  </soap:Header>
  <soap:Body>
    <wprt:GetJobHistoryResponse>
      <wprt:JobHistory>
        <wprt:JobSummary>
          <wprt:JobId>1</wprt:JobId>
          <wprt:JobName>SampleJob 1</wprt:JobName>
          <wprt:JobState>Completed</wprt:JobState>
          <wprt:JobStateReasons>
            <wprt:JobStateReason>JobCompletedSuccessfully</wprt:JobStateReason>
          </wprt:JobStateReasons>
          <wprt:JobOriginatingUserName>Joe Smith</wprt:JobOriginatingUserName>
          <wprt:KOctetsProcessed>789</wprt:KOctetsProcessed>
          <wprt:MediaSheetsCompleted>5</wprt:MediaSheetsCompleted>
          <wprt:NumberOfDocuments>2</wprt:NumberOfDocuments>
        </wprt:JobSummary>
        <wprt:JobSummary>
          <wprt:JobId>2</wprt:JobId>
          <wprt:JobName>Sample Job 2</wprt:JobName>
          <wprt:JobState>Aborted</wprt:JobState>
          <wprt:JobStateReasons>
            <wprt:JobStateReason>DocumentFormatError</wprt:JobStateReason>
          </wprt:JobStateReasons>
          <wprt:JobOriginatingUserName>Joe Smith</wprt:JobOriginatingUserName>
          <wprt:KOctetsProcessed>0</wprt:KOctetsProcessed>
          <wprt:MediaSheetsCompleted>0</wprt:MediaSheetsCompleted>
          <wprt:NumberOfDocuments>1</wprt:NumberOfDocuments>
        </wprt:JobSummary>
      </wprt:JobHistory>
    </wprt:GetJobHistoryResponse >
  </soap:Body>
</soap:Envelope>

See also

GetJobElementsRequest

GetJobHistoryRequest

JobHistory

 

 

Send comments about this topic to Microsoft

Build date: 7/19/2012