GetJobElementsResponse element
The required GetJobElementsResponse element returns the job-related variables for a specified job to the client.
GetJobElementsResponse 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:GetJobElementsResponse>
child elements
</wprt:GetJobElementsResponse>
Attributes
There are no attributes.
Text value
None
Child elements
Element | Description |
---|---|
Job Elements |
Parent elements
There are no parent elements.
Remarks
The WSD Print Service must support the GetJobElementsResponse operation.
A client calls GetJobElementsRequest to determine the values of job-related variables of the specified job. The After successfully processing the GetJobElementsRequest, the WSD Print Service must respond with a GetJobElementsResponse element that contains the information the client requested.
In the following code examples, 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
In the following example, the Print Service returns the job status for the job identified by JobId 1.
<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/GetJobElementsResponse
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
<wsa:RelatesTo>uuid:MsgIdOfTheGetJobElementsRequest</wsa:RelatesTo>
</soap:Header>
<soap:Body>
<wprt:GetJobElementsResponse>
<wprt:JobElements>
<wprt:ElementData Name="JobStatus" Valid="true">
<wprt:JobStatus>
<wprt:JobId>1</wprt:JobId>
<wprt:JobState>Pending</wprt:JobState>
<wprt:JobStateReasons>
<wprt:JobStateReason>None</wprt:JobStateReason>
</wprt:JobStateReasons>
<wprt:KOctetsProcessed>0</wprt:KOctetsProcessed>
<wprt:MediaSheetsCompleted>0</wprt:MediaSheetsCompleted>
<wprt:NumberOfDocuments>1</wprt:NumberOfDocuments>
</wprt:JobStatus>
</wprt:ElementData>
</wprt:JobElements>
</wprt:GetPrinterElementsResponse >
</soap:Body>
</soap:Envelope>
The following example shows the Print Service's response to multiple requests from a client. The last ElementData element in the list handles an invalid QName value from the client.
<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/GetJobElementsResponse
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
<wsa:RelatesTo>uuid:MsgIdOfTheGetJobElementsRequest</wsa:RelatesTo>
</soap:Header>
<soap:Body>
<wprt:GetJobElementsResponse>
<wprt:JobElements>
<wprt:ElementData Name="wprt:PrintTicket" Valid="true">
<wprt:PrintTicket>
<wprt:JobDescription>
<wprt:JobName>GreatPresentation.ppt</wprt:JobName>
<wprt:JobOriginatingUserName>AdminUser</wprt:JobOriginatingUserName>
</wprt:JobDescription>
<wprt:JobProcessing>
<wprt:Copies>1</wprt:Copies>
<wprt:JobFinishings>
<wprt:Collate>false</wprt:Collate>
<wprt:JogOffset>true</wprt:JogOffset>
</wprt:JobFinishings>
<wprt:Priority>50</wprt:Priority>
</wprt:JobProcessing>
<wprt:DocumentProcessing>
<wprt:MediaSizeName>na_letter_8.5x11in</wprt:MediaSizeName>
<wprt:MediaType>stationery</wprt:MediaType>
<wprt:NumberUp>
<wprt:PagesPerSheet>1</wprt:PagesPerSheet>
<wprt:Direction>RightDown</wprt:Direction>
</wprt:NumberUp>
<wprt:Orientation>Portrait</wprt:Orientation>
<wprt:Resolution>
<wprt:Width>600</wprt:Width>
</wprt:Resolution>
<wprt:Sides>OneSided</wprt:Sides>
</wprt:DocumentProcessing>
<wprt:PrintTicket>
</wprt:ElementData>
<wprt:ElementData Name="wprt:Documents" Valid="true">
<wprt:Documents>
<wprt:Document>
<wprt:DocumentDescription>
<wprt:DocumentId>24</wprt:DocumentId>
<wprt:Compression>GZip</wprt:Compression>
<wprt:Format>application/octet-stream</wprt:Format>
<wprt:DocumentName>Compressed Output</wprt:DocumentName>
</wprt:DocumentDescription>
</wprt:Document>
<wprt:Documents>
</wprt:ElementData>
<wprt:ElementData Name="wprt:InvalidQName" Valid="false"/>
</wprt:JobElements>
</wprt:GetPrinterElementsResponse >
</soap:Body>
</soap:Envelope>
See also
Send comments about this topic to Microsoft
Build date: 7/19/2012