WS-Discovery 行動列印支援
支援從 Windows 10 行動裝置版 列印的裝置,必須將MobilePrinter類別新增至其 WS-Discovery ThisModel 回應,如下列範例所示:
<soap:Envelope
xmlns:soap="https://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdisco="https://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:wsx="https://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsd="https://schemas.xmlsoap.org/ws/2006/02/devprof"
xmlns:pnpx="https://schemas.microsoft.com/windows/pnpx/2005/10">
<soap:Header>
<!-- Place SOAP header information here.-->
</soap:Header>
<soap:Body>
<wsx:Metadata>
<wsx:MetadataSection
Dialect="https://schemas.xmlsoap.org/ws/2005/05/devprof/ThisDevice">
<wsd:ThisDevice>
<!-- Place ThisDevice metadata here.-->
</wsd:ThisDevice>
</wsx:MetadataSection>
<wsx:MetadataSection
Dialect="https://schemas.xmlsoap.org/ws/2005/05/devprof/ThisModel">
<wsd:ThisModel>
<!-- Place ThisModel metadata here.-->
<pnpx:DeviceCategory>
<!-- This device is in the Printers category -->
Printers Scanners MobilePrinter
</pnpx:DeviceCategory>
</wsd:ThisModel>
</wsx:MetadataSection>
<wsx:MetadataSection
Dialect="https://schemas.xmlsoap.org/ws/2005/05/devprof/Relationship">
<wsd:Relationship
Type="https://schemas.xmlsoap.org/ws/2005/05/devprof/host">
<wsd:Hosted>
<!-- Place Hosted metadata for the
first service here.-->
<pnpx:HardwareId>
<!-- Place the Hardware ID for the first service here.-->
PnPX_SampleService1_HWID
</pnpx:HardwareId>
<pnpx:CompatibleId>
<!-- Place the Compatible ID for the first service here.-->
PnPX_SampleService1_CPID
</pnpx:CompatibleId>
</wsd:Hosted>
</wsd:Relationship>
</wsx:MetadataSection>
</wsx:Metadata>
</soap:Body>
</soap:Envelope>
下表提供MobilePrinter 類別關鍵字的其他資訊:
常數/值 | Description |
---|---|
PNPX_DEVICECATEGORY_PRINTER_MOBILE L“MobilePrinter” |
MobilePrinter 類別 關鍵詞:印表機 |
如需如何將裝置類別新增至 WS-Discovery 元數據交換的詳細資訊,請參閱 PnP-X 規格。