Elemen GetScannerElementsRequest

Elemen GetScannerElementsRequest yang diperlukan memungkinkan klien untuk meminta informasi tentang pemindai.

Penggunaan

<wscn:GetScannerElementsRequest>
  child elements
</wscn:GetScannerElementsRequest>

Atribut

Tidak ada atribut.

Elemen anak

Elemen
RequestedElements

Elemen induk

Tidak ada elemen induk.

Keterangan

Layanan Pemindaian WSD harus mendukung operasi GetScannerElementsRequest .

Klien dapat memanggil GetScannerElementsRequest untuk menemukan elemen standar dan vendor yang diperluas dari skema Scan Service. Informasi yang tersedia untuk klien mencakup bagian mana pun dari data pemindai yang dapat diakses di tingkat akar perangkat. Informasi ini mencakup deskripsi, konfigurasi, status, tiket pemindaian default, dan ekstensi vendor apa pun ke Scan Service.

Jika Layanan Pemindaian berhasil memproses GetScannerElementsRequest, Layanan Pemindaian mengembalikan operasi GetScannerElementsResponse dengan informasi yang diminta. Jika tidak, Layanan Pemindaian harus mengembalikan kode kesalahan yang sesuai.

Operasi ini dapat mengembalikan semua kode kesalahan operasi WSD Scan Service umum. Untuk informasi selengkapnya tentang cara melaporkan kesalahan, lihat Pelaporan Kesalahan Operasi Layanan Pemindaian WSD.

Contoh

Dalam contoh kode berikut, klien menentukan satu nilai QName (wscn:ScannerDescription) untuk mengkueri deskripsi pemindai.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
  xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="https://schemas.xmlsoap.org/ws/2003/03/addressing"
  xmlns:wscn="https://schemas.microsoft.com/windows/2006/01/wdp/scan"
  soap:encodingStyle='https://www.w3.org/2002/12/soap-encoding' >

  <soap:Header>
    <wsa:To>AddressofScannerService</wsa:To>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2006/01/wdp/scan/GetScannerElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>

  <soap:Body>
    <wscn:GetScannerElementsRequest>
      <wscn:RequestedElements>
        <wscn:Name>wscn:ScannerDescription</wscn:Name>
      </wscn:RequestedElements>
    </wscn:GetScannerElementsRequest>
  </soap:Body>
</soap:Envelope>

Contoh kode berikut menunjukkan permintaan klien untuk status pemindai.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
  xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="https://schemas.xmlsoap.org/ws/2003/03/addressing"
  xmlns:wscn="https://schemas.microsoft.com/windows/2006/01/wdp/scan"
  soap:encodingStyle='https://www.w3.org/2002/12/soap-encoding' >

  <soap:Header>
    <wsa:To>AddressofScannerService</wsa:To>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2006/01/wdp/scan/GetScannerElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>

  <soap:Body>
    <wscn:GetScannerElementsRequest>
      <wscn:RequestedElements>
        <wscn:Name>wscn:ScannerStatus</wscn:Name>
      </wscn:RequestedElements>
    </wscn:GetScannerElementsRequest>
  </soap:Body>
</soap:Envelope>

Dalam contoh kode berikut, klien menentukan dua nilai QName. QName pertama adalah wscn:ScannerConfiguration, dan QName kedua tidak valid.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
  xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
  xmlns:wsa="https://schemas.xmlsoap.org/ws/2003/03/addressing"
  xmlns:wscn="https://schemas.microsoft.com/windows/2006/01/wdp/scan"
  xmlns:ihv="https://www.example.com/extension"
  soap:encodingStyle='https://www.w3.org/2002/12/soap-encoding' >

  <soap:Header>
    <wsa:To>AddressofScannerService</wsa:To>
    <wsa:Action>
      https://schemas.microsoft.com/windows/2006/01/wdp/scan/GetScannerElements
    </wsa:Action>
    <wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
  </soap:Header>

  <soap:Body>
    <wscn:GetScannerElementsRequest>
      <wscn:RequestedElements>
        <wscn:Name>wscn:ScannerConfiguration</wscn:Name>
        <wscn:Name>ihv:InvalidRequestEntry</wscn:Name>
      </wscn:RequestedElements>
    </wscn:GetScannerElementsRequest>
  </soap:Body>
</soap:Envelope>

Lihat juga

GetScannerElementsResponse

RequestedElements