GetPrinterElementsResponse element
The required GetPrinterElementsResponse element contains the WSD Print Service's response to a client's request for information about the printer.
GetPrinterElementsResponse 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:GetPrinterElementsResponse>
child elements
</wprt:GetPrinterElementsResponse>
Attributes
There are no attributes.
Text value
None
Child elements
| Element | Description |
|---|---|
|
Contains all the printer-related elements requested by a client through a call to GetPrinterElementsRequest |
Parent elements
There are no parent elements.
Remarks
The WSD Print Service must support the GetPrinterElementsResponse operation.
A client calls GetPrinterElementsRequest to discover the standard and IHV-extended elements of the Print Service's schema. The WSD Print Service must respond with a GetPrinterElementsResponse element that contains all the information that 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 WSD Print Service returns the printer's configuration.
<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/GetPrinterElementsResponse
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
<wsa:RelatesTo>uuid:MsgIdOfTheGetPrinterElementsRequest</wsa:RelatesTo>
</soap:Header>
<soap:Body>
<wprt:GetPrinterElementsResponse>
<wprt:ElementData Name="wprt:PrinterConfiguration" Valid="true">
<wprt:PrinterConfiguration>
<wprt:Storage>
<wprt:StorageEntry Name="BaseRAM">
<wprt:Type>RAM</wprt:Type>
<wprt:Size>32768</wprt:Size>
<wprt:Free>83</wprt:Free>
</wprt:StorageEntry>
</wprt:Storage>
<wprt:Consumables>
<wprt:ConsumableEntry Type="Toner" Color="Black">
<wprt:Level>35</wprt:Level>
</wprt:ConsumableEntry>
</wprt:Consumables>
<wprt:InputBins>
<wprt:InputBinEntry Name="Tray1">
<wprt:FeedDirection>ShortEdgeFirst</wprt:FeedDirection>
<wprt:MediaSize>na_legal_8.5x14in</wprt:MediaSize>
<wprt:Capacity>500</wprt:Capacity>
<wprt:Level>74</wprt:Level>
</wprt:InputBinEntry>
</wprt:InputBins>
<wprt:Finishings>
<wprt:CollationSupported>false</wprt:CollationSupported>
<wprt:JogOffsetSupported>true</wprt:JogOffsetSupported>
<wprt:DuplexerInstalled>true</wprt:DuplexerInstalled>
<wprt:StaplerInstalled>false</wprt:StaplerInstalled>
<wprt:HolePunchInstalled>false</wprt:HolePunchInstalled>
<wprt:OutputBins>
<wprt:OutputBinEntry Name="Bin1" Removed="true">
<wprt:Capacity>100</wprt:Capacity>
<wprt:Level>-1</wprt:Level>
</wprt:OutputBinEntry>
</wprt:OutputBins>
<wprt:Finishings>
</wprt:PrinterConfiguration>
</wprt:ElementData>
</wprt:GetPrinterElementsResponse >
</soap:Body>
</soap:Envelope>
In the next example, the WSD Print Service responds to a client's request for information about several elements, including a request for which the client provided an invalid keyword.
<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/GetPrinterElementsResponse
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
<wsa:RelatesTo>uuid:MsgIdOfTheGetPrinterElementsRequest</wsa:RelatesTo>
</soap:Header>
<soap:Body>
<wprt:GetPrinterElementsResponse>
<wprt:ElementData Name="wprt:PrinterStatus" Valid="true">
<wprt:PrinterStatus>
<wprt:PrinterState>Stopped</wprt:PrinterState>
<wprt:PrinterStateReasons>
<wprt:PrinterStateReason>MediaJam</wprt:PrinterStateReason>
<wprt:PrinterStateReason>OutputAreaAlmostFull</wprt:PrinterStateReason>
</wprt:PrinterStateReasons>
</wprt:PrinterStatus>
</wprt:ElementData>
<wprt:ElementData Name="wprt:DefaultPrintTicket" Valid="true">
<wprt:DefaultPrintTicket>
<wprt:JobDescription>
<wprt:JobName>DefaultName</wprt:JobName>
<wprt:JobOriginatingUserName>DefaultUser</wprt:JobOriginatingUserName>
</wprt:JobDescription>
<wprt:JobProcessing>
<wprt:Copies>1</wprt:Copies>
<wprt:JobFinishings>
<wprt:Collate>false</wprt:Collate>
<wprt:JogOffset>true</wprt:JogOffset>
<wprt:Staple>
<wprt:Location>None</wprt:Location>
<wprt:Angle>Slanted</wprt:Angle>
</wprt:Staple>
<wprt:HolePunch>
<wprt:Edge>None</wprt:Edge>
<wprt:Pattern>TwoHoleUSTop</wprt:Pattern>
</wprt:HolePunch>
</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:PrintQuality>Normal</wprt:PrintQuality>
<wprt:Sides>OneSided</wprt:Sides>
</wprt:DocumentProcessing>
</wprt:DefaultPrintTicket>
</wprt:ElementData>
<wprt:ElementData Name="wprt:InvalidQNameForPrinterCapabilities" Valid="false"/>
</wprt:GetPrinterElementsResponse >
</soap:Body>
</soap:Envelope>
See also
Send comments about this topic to Microsoft
Build date: 7/19/2012