GetPrinterElementsRequest element

The required GetPrinterElementsRequest element allows a client to request information about the printer.

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

Attributes

There are no attributes.

Text value

None

Child elements

Element Description

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 GetPrinterElementsRequest operation.

A client calls GetPrinterElementsRequest to discover standard and vendor-extended elements of the Print Service's schema. Specifically, the client can query for information about the printer's configuration, status, default print ticket value, capabilities, or IHV extensions to the Printer Service.

If the Print Service successfully processes GetPrinterElementsRequest, it returns a GetPrinterElementsResponse operation with the requested information. Otherwise, the Print Service should return the appropriate error code.

All the codes described in Common Operation Error Codes can be returned from this operation. See Operation Error Reporting for details on how to report errors.

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 client specifies a single QName value - wprt:PrintConfiguration - to query for just the printer's configuration.

<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/GetPrinterElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>
  <soap:Body>
    <wprt:GetPrinterElementsRequest>
      <wprt:RequestedElements>
        <wprt:Name>wprt:PrinterConfiguration</wprt:Name>
      </wprt:RequestedElements>
    </wprt:GetPrinterElementsRequest >
  </soap:Body>
</soap:Envelope>

In the next example, a client specifies several QName values - wprt:PrinterStatus, wprt:DefaultPrintTicket, and an invalid QName for wprt:PrinterCapabilities - to query for the printer's status, default print ticket, and capabilities.

<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/GetPrinterElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>
  <soap:Body>
    <wprt:GetPrinterElementsRequest>
      <wprt:RequestedElements>
        <wprt:Name>wprt:PrinterStatus</wprt:Name>
        <wprt:Name>wprt:DefaultPrintTicket</wprt:Name>
        <wprt:Name>wprt:InvalidQNameForPrinterCapabilities</wprt:Name>
      </wprt:RequestedElements>
    </wprt:GetPrinterElementsRequest >
  </soap:Body>
</soap:Envelope>

See also

Common Operation Error Codes

GetPrinterElementsResponse

Operation Error Reporting

RequestedElements

 

 

Send comments about this topic to Microsoft

Build date: 7/19/2012