web services for devices install: printers & scanners mike fenelon software developer digital...

44
Web Services for Web Services for Devices Install: Devices Install: Printers & Scanners Printers & Scanners Mike Fenelon Mike Fenelon Software Developer Software Developer Digital Documents, Platform and Solutions Team Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com MFenelon @ microsoft.com Microsoft Corporation Microsoft Corporation

Upload: yessenia-lourie

Post on 31-Mar-2015

229 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Web Services for Devices Web Services for Devices Install:Install:Printers & ScannersPrinters & ScannersMike FenelonMike FenelonSoftware DeveloperSoftware DeveloperDigital Documents, Platform and Solutions TeamDigital Documents, Platform and Solutions TeamMFenelon @ microsoft.comMFenelon @ microsoft.comMicrosoft CorporationMicrosoft Corporation

Page 2: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Printing with Web Printing with Web Services for DevicesServices for Devices

Page 3: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Printer Installation Step-By-StepPrinter Installation Step-By-Step

Print Device PDO

Print Service

FDO

Function Discovery (FD)

SpoolerWSD Port Monitor

PnP-Printer Class Installer

4

56

7

8

9

11

10

7

6 5

4 3

2

11

9

8 1

IPBusEnumerator WS-Discovery Provider

User-Mode Enabled Bus Enumerator

(UMBus)

Page 4: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step 1- Step 1- WSD Port Monitor WSD Port Monitor InitializationInitialization

SpoolerWSD Port Monitor

1

Function Discovery (FD)

Spooler starts upSpooler starts up

WSD Port Monitor WSD Port Monitor (WSDMon) queries FD for (WSDMon) queries FD for all existing WSD print all existing WSD print devices and creates the devices and creates the appropriate portsappropriate ports

Any new devices found Any new devices found while the spooler wasn’t while the spooler wasn’t running will also kick off running will also kick off PnP installation for the PnP installation for the Print Object (Step 9)Print Object (Step 9)

WSDMon will also WSDMon will also register for notifications register for notifications on the correct FD on the correct FD category to receive category to receive future device future device notificationsnotifications

Page 5: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Steps 2 & 3 – Steps 2 & 3 – Printer Printer Announcement and DiscoveryAnnouncement and Discovery

2

3

Function Discovery (FD)

WS-Discovery Provider

Printer announces presence Printer announces presence on the network by a WS-on the network by a WS-Discovery “Hello” message Discovery “Hello” message or responds to a Probe or responds to a Probe message from user opening message from user opening Computers & DevicesComputers & Devices

WS-Discovery provider WS-Discovery provider recognizes the device and recognizes the device and publishes it to Function publishes it to Function Discovery (FD)Discovery (FD)

Device Instance in FD Device Instance in FD contains all the basic device contains all the basic device MetadataMetadata

Device enabled for install if Device enabled for install if it contains PnP-X related it contains PnP-X related metadatametadata

Page 6: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Steps 4 & 5 – Steps 4 & 5 – Notification from Notification from FD and Devnode CreationFD and Devnode Creation

5

4

User-Mode Enabled Bus Enumerator

(UMBus)

IPBusEnumerator

Function Discovery (FD)

From Within Computers & From Within Computers & Devices the User Devices the User adds/installs discovered adds/installs discovered device to Association device to Association DatabaseDatabase

IPBusEnum gets a IPBusEnum gets a notification of the newly notification of the newly associated Network Deviceassociated Network Device

IPBusEnum reads data IPBusEnum reads data from the new instance and from the new instance and uses the COM interface to uses the COM interface to the User-Mode Enabled Bus the User-Mode Enabled Bus Enumerator (UMBus) to tell Enumerator (UMBus) to tell UMBus to create a new WS UMBus to create a new WS Print Service DevNodePrint Service DevNode

Page 7: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step 6 – Step 6 – Create Printer Service Create Printer Service DevnodeDevnode

6

Scan Service FDO

User-Mode Enabled Bus Enumerator

(UMBus)

UMBus creates a File UMBus creates a File Device Object (FDO) for Device Object (FDO) for the WS-based Printer the WS-based Printer ServiceService

This FDO has a This FDO has a HardwareID & HardwareID & CompatibleId based on CompatibleId based on data from the Device data from the Device Relationship MetadataRelationship Metadata

<pnpx:HardwareId><pnpx:HardwareId>

<pnpx:CompatibleId><pnpx:CompatibleId>

Page 8: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

SpoolerWSD Port Monitor

Steps 7 & 8 – Steps 7 & 8 – Print Service PnP Print Service PnP Notification to FD and WSDMonNotification to FD and WSDMon

7

8

Function Discovery (FD)

Print Service

FDO

FD gets PnP FD gets PnP notification of the notification of the new WS-Printer new WS-Printer Service device objectService device object

FD adds device to the FD adds device to the correct correct category/subcategory category/subcategory and creates and creates notification which is notification which is picked up by picked up by WSDMonWSDMon

Page 9: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step 9 – Step 9 – GetMetadataGetMetadata

9

SpoolerWSD Port Monitor

User-Mode Enabled Bus Enumerator

(UMBus)

WSDMon activates the WS WSDMon activates the WS PrintProxy via the FD function PrintProxy via the FD function instance and gets needed instance and gets needed information from the device information from the device

Uses GetMetadata calls or Uses GetMetadata calls or Print Service methods Print Service methods

Gets device 1284 ID and Gets device 1284 ID and determines port namedetermines port name

WSDMon calls UMBus with WSDMon calls UMBus with info needed to create a Print info needed to create a Print Device Physical Device Device Physical Device Object (PDO) in RAW modeObject (PDO) in RAW mode

This gets PnP started This gets PnP started installing the Print Object in installing the Print Object in the spooler (Printers and the spooler (Printers and Faxes folder)Faxes folder)

Page 10: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Steps 10 & 11 – Steps 10 & 11 – PDO Creation PDO Creation and Driver Installand Driver Install

10

11

Print Device PDO

PnP-Printer Class

Installer

User-Mode Enabled Bus Enumerator

(UMBus)

UMBus creates a Print Device UMBus creates a Print Device PDOPDOThis PDO contains the Hardware This PDO contains the Hardware ID, PortName, PrinterName, ID, PortName, PrinterName, Location and comment field of Location and comment field of the associated printerthe associated printerPnP searches installed INFs to PnP searches installed INFs to find an INF that matchesfind an INF that matchesIf no INF is found the Found New If no INF is found the Found New Hardware Wizard (FNHM) startsHardware Wizard (FNHM) startsIf an INF is found (or selected in If an INF is found (or selected in the FNHW) PnP invokes the the FNHW) PnP invokes the associated class installer, in this associated class installer, in this case the Printer Class Installercase the Printer Class InstallerInstall continues just like local Install continues just like local PnP using the supplied PnP using the supplied information from the Print Device information from the Print Device PDO to complete the installationPDO to complete the installation

Page 11: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Printing Operation Step By Printing Operation Step By StepStep

Spooler

WSD Port Monitor

Driver

App

Queue View

B

C

D

E

GF

A

Page 12: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step A & B – Step A & B – Driver InitializationDriver Initialization

WSD Port Monitor

B

A

Driver Bi-di enabled Driver Bi-di enabled Driver queries device for queries device for configurationconfiguration

Driver uses Bi-di schema Driver uses Bi-di schema to request device to request device configurationconfiguration

WSD Port Monitor uses WSD Port Monitor uses GetPrinterElements GetPrinterElements operation to retrieve operation to retrieve data from printerdata from printer

WSDMon converts XML WSDMon converts XML data to Bi-di Schema data to Bi-di Schema responsesresponses

Page 13: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step C – Step C – Application prints a Application prints a documentdocument

App

C

WSD Port Monitor

Application uses Application uses DevCaps to get accurate DevCaps to get accurate device capabilitiesdevice capabilities

Application formats the Application formats the document based on document based on current device current device capabilitiescapabilities

Application begins Application begins rendering the documentrendering the document

Page 14: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step D & E – Step D & E – WSD Port Monitor WSD Port Monitor prints a documentprints a document

D E

WSD Port Monitor

WSDMon sends WSDMon sends CreatePrintJob operation CreatePrintJob operation to prepare device for to prepare device for print dataprint data

CreatePrintJob responseCreatePrintJob response contains device JobIDcontains device JobID

On first WritePort call On first WritePort call WSDMon creates WSDMon creates SendDocument opreationSendDocument opreation

Device JobID and Device JobID and

Job data transferred as Job data transferred as part of SendDocument part of SendDocument operation using MTOM operation using MTOM

Page 15: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step F & G – Step F & G – JobEndState Event JobEndState Event and Rich Statusand Rich Status

Queue View

F

G

WSD Port Monitor

Printer send Printer send JobEndState event JobEndState event when the print job when the print job finishesfinishes

WSD Port Monitor WSD Port Monitor creates Rich Status creates Rich Status notification based on notification based on information in the information in the eventevent

Job Status in Queue Job Status in Queue View is updated after View is updated after SetJob callSetJob call

Page 16: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Scanning with Web Scanning with Web Services for DevicesServices for Devices

Page 17: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Scan Service FDO

User-Mode Enabled Bus Enumerator

(UMBus)

Function Discovery (FD)

WS-Discovery Provider

WIA Service

WSD Scan Driver

IPBusEnumerator

4

566 5

4 3

2

8

1

Scanner Installation Step By Scanner Installation Step By StepStep

Page 18: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step 1 – Step 1 – WIA Service and Scan WIA Service and Scan ClassClassDriver InitializationDriver Initialization

WIA Service starts WIA Service starts up or User starts a up or User starts a WIA application WIA application

WIA Service WIA Service queries PnP for all queries PnP for all existing Scan existing Scan devices and devices and creates the creates the appropriate appropriate objects (Step 8)objects (Step 8)

Function Discovery (FD)

WIA

Service

WSD Scan Driver

1

Page 19: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Scanner announces presence Scanner announces presence on the network by a WS-on the network by a WS-Discovery “Hello” message or Discovery “Hello” message or responds to a Probe message responds to a Probe message from user opening Computers from user opening Computers & Devices& Devices

WS-Discovery provider WS-Discovery provider recognizes the device and recognizes the device and publishes it to Function publishes it to Function Discovery (FD)Discovery (FD)

Device Instance in FD contains Device Instance in FD contains all the basic device Metadataall the basic device Metadata

Device enabled for install if it Device enabled for install if it contains PnP-X related contains PnP-X related metadatametadata

2

3

Function Discovery (FD)

WS-Discovery Provider

Steps 2 & 3 – Steps 2 & 3 – Scanner Scanner Announcement and DiscoveryAnnouncement and Discovery

Page 20: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

From Within Computers & From Within Computers & Devices the User Devices the User adds/installs discovered adds/installs discovered device to Association device to Association DatabaseDatabase

IPBusEnum gets a IPBusEnum gets a notification of the newly notification of the newly associated Network Deviceassociated Network Device

IPBusEnum reads data from IPBusEnum reads data from the new instance and uses the new instance and uses the COM interface to the the COM interface to the User-Mode Enabled Bus User-Mode Enabled Bus Enumerator (UMBus) to tell Enumerator (UMBus) to tell UMBus to create a new WS UMBus to create a new WS Print Service DevNodePrint Service DevNode

User-Mode Enabled Bus Enumerator

(UMBus)

5

4

IPBusEnumerator

Function Discovery (FD)

Steps 4 & 5 – Steps 4 & 5 – Notification Notification from FD and Devnode from FD and Devnode CreationCreation

Page 21: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Steps 6 –Steps 6 – Create Scanner Create Scanner Service DevnodeService Devnode

UMBus creates a File UMBus creates a File Device Object (FDO) for Device Object (FDO) for the WS-based Scanner the WS-based Scanner ServiceService

This FDO has a This FDO has a HardwareID & HardwareID & CompatibleId based on CompatibleId based on data from the Device data from the Device Relationship MetadataRelationship Metadata

<pnpx:HardwareId><pnpx:HardwareId>

<pnpx:CompatibleId><pnpx:CompatibleId>

6

Scan Service FDO

User-Mode Enabled Bus Enumerator

(UMBus)

Page 22: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

WIA Service

WSD Scan Driver

WIA Service gets PnP WIA Service gets PnP notification of the new notification of the new WS-Scanner Service WS-Scanner Service device objectdevice object

WIA creates a unique WIA creates a unique identifier for the deviceidentifier for the device

WSD Scan Driver instance WSD Scan Driver instance is loaded for the new is loaded for the new scannerscanner

Scan Service Function Scan Service Function Instance is activated and Instance is activated and the ScanProxy DLL is the ScanProxy DLL is loadedloaded

Scanner installation is Scanner installation is complete!complete!

7

Step 7 – Step 7 – PnP Notification and WSD PnP Notification and WSD Scan Driver Object InitializationScan Driver Object Initialization

Scan Service FDO

Page 23: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Scanning Operation in the HomeScanning Operation in the Home- Step By Step- Step By Step

WIA Service

C

DB

A

WSD Scan Driver

Page 24: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step A –Step A – PC Registers with PC Registers with ScannerScanner

At scan object creation At scan object creation the PC creates scan the PC creates scan destination(s) in the destination(s) in the scan devicescan device

Assigns device a unique Assigns device a unique identifieridentifier

Subscribes for Subscribes for ScanAvailableEvent with ScanAvailableEvent with wscn:ScanDestinations wscn:ScanDestinations extension operation to set extension operation to set display name for current display name for current PCPC

Receives scan context Receives scan context from devicefrom device

A

WIA Service

WSD Scan Driver

Page 25: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Steps B & C – Steps B & C – User Initiates ScanUser Initiates ScanUser selects User selects destination from destination from device display paneldevice display panel

User presses scan User presses scan buttonbutton

Device sends a Device sends a ScanAvailableEvent to ScanAvailableEvent to selected PCselected PC

Event contains scanner Event contains scanner identifier and scan identifier and scan contextcontext

C

B

WIA Service

WSD Scan Driver

Note: this could also be initiated from an application on the PC if scanner doesn’t have LCD or multi-PC capability

Page 26: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Step D –Step D – Client Scans From Client Scans From DeviceDevice

Client uses Client uses CreateScanJob & CreateScanJob & RetreiveImage RetreiveImage operations to initiate operations to initiate scan and retrieve scan scan and retrieve scan datadata

Scan ticket in Scan ticket in CreateScanJob operation CreateScanJob operation contains desired scanning contains desired scanning parametersparameters

Scan data is retrieved as Scan data is retrieved as part of the RetrieveImage part of the RetrieveImage operation response in any operation response in any form using MTOMform using MTOM

D

WIA Service

WSD Scan Driver

Page 27: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

XML Messages for PrintingXML Messages for Printing

Page 28: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

GetPrinterElements Request GetPrinterElements Request Example Example <SOAP:Envelope <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print">xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print"><SOAP:Header><SOAP:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/05/wdp/print/GetPrinterElementshttp://schemas.microsoft.com/windows/2005/05/wdp/print/GetPrinterElements

</wsa:Action></wsa:Action>--- Header removed for Brevity ------ Header removed for Brevity ---

</SOAP:Header</SOAP:Header<SOAP:Body><SOAP:Body>

<wprt:GetPrinterElementsRequest><wprt:GetPrinterElementsRequest><wprt:RequestedElements><wprt:RequestedElements>

<wprt:Name>wprt:PrinterConfiguration</wprt:Name><wprt:Name>wprt:PrinterConfiguration</wprt:Name></wprt:RequestedElements> </wprt:RequestedElements>

</wprt:GetPrinterElementsRequest ></wprt:GetPrinterElementsRequest ></SOAP:Body></SOAP:Body>

</SOAP:Envelope></SOAP:Envelope>

Page 29: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

GetPrinterElements Response GetPrinterElements Response Example Example <SOAP:Envelope <SOAP:Envelope

xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print">print"><SOAP:Header><SOAP:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/05/wdp/print/http://schemas.microsoft.com/windows/2005/05/wdp/print/GetPrinterElementsResponseGetPrinterElementsResponse

</wsa:Action></wsa:Action>--- Header removed for Brevity ------ Header removed for Brevity ---

</SOAP:Header</SOAP:Header<SOAP:Body><SOAP:Body>

<wprt:GetPrinterElementsResponse><wprt:GetPrinterElementsResponse>..... .

</wprt:GetPrinterElementsResponse></wprt:GetPrinterElementsResponse></SOAP:Body></SOAP:Body>

</SOAP:Envelope></SOAP:Envelope>

Page 30: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

CreatePrintJob Request CreatePrintJob Request ExampleExample<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print">xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print"><SOAP:Header><SOAP:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/05/wdp/print/CreatePrintJobhttp://schemas.microsoft.com/windows/2005/05/wdp/print/CreatePrintJob

</wsa:Action></wsa:Action>--- Header removed for Brevity ------ Header removed for Brevity ---

</SOAP:Header</SOAP:Header<SOAP:Body><SOAP:Body>

<wprt:CreatePrintJobRequest><wprt:CreatePrintJobRequest>......

</wprt:CreatePrintJobRequest></wprt:CreatePrintJobRequest></SOAP:Body></SOAP:Body>

</SOAP:Envelope></SOAP:Envelope>

Page 31: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

CreatePrintJob Response CreatePrintJob Response ExampleExample<SOAP:Envelope <SOAP:Envelope

xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print">print"><SOAP:Header><SOAP:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/05/wdp/print/http://schemas.microsoft.com/windows/2005/05/wdp/print/CreatePrintJobResponseCreatePrintJobResponse

</wsa:Action></wsa:Action>--- Header removed for Brevity ------ Header removed for Brevity ---

</SOAP:Header</SOAP:Header<SOAP:Body><SOAP:Body>

<wprt:CreatePrintJobResponse><wprt:CreatePrintJobResponse>......

</wprt:CreatePrintJobResponse></wprt:CreatePrintJobResponse></SOAP:Body></SOAP:Body>

</SOAP:Envelope></SOAP:Envelope>

Page 32: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

SendDocument Request SendDocument Request ExampleExamplemime-version: 1.0mime-version: 1.0Content-Type: multipart/related;Content-Type: multipart/related;

type=application/xop+xml;type=application/xop+xml;boundary=“--=_NextPart_123_321_0000000.3E9F5D”;boundary=“--=_NextPart_123_321_0000000.3E9F5D”;start=”<OperationRequest>”;start=”<OperationRequest>”;startinfo=application/soap+xmlstartinfo=application/soap+xml

----=_NextPart_123_321_0000000.3E9F5D----=_NextPart_123_321_0000000.3E9F5DContent-Type: application/xop+xml; type=application/soap_xop+xml charset=UTF-8Content-Type: application/xop+xml; type=application/soap_xop+xml charset=UTF-8Content-Transfer-Encoding: binaryContent-Transfer-Encoding: binaryContent-ID: <OperationRequest>Content-ID: <OperationRequest><?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?><soap:Envelope <soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2004/08/devprof"xmlns:wsdp="http://schemas.xmlsoap.org/ws/2004/08/devprof"xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print"xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print"xmlns:xmlmime=’http://www.w3.org/2004/11/xmlmime’xmlns:xmlmime=’http://www.w3.org/2004/11/xmlmime’xmlns:xop=’http://www.w3.org/2004/08/xop/include’xmlns:xop=’http://www.w3.org/2004/08/xop/include’soap:encodingStyle='http://www.w3.org/2002/12/soap-encoding' >soap:encodingStyle='http://www.w3.org/2002/12/soap-encoding' ><soap:Header><soap:Header>

<wsa:To>uuid:<wsa:To>uuid:DeviceUUIDDeviceUUID</wsa:To></wsa:To><wsdp:ServiceId>uri:<wsdp:ServiceId>uri:IdofThisServiceIdofThisService</wsdp:ServiceId></wsdp:ServiceId><wsa:Action><wsa:Action>

http://schemas.microsoft.com/windows/2005/05/wdp/print/SendDocumenthttp://schemas.microsoft.com/windows/2005/05/wdp/print/SendDocument</wsa:Action></wsa:Action><wsa:MessageID>uuid:<wsa:MessageID>uuid:UniqueMsgIdUniqueMsgId</wsa:MessageID></wsa:MessageID>

</soap:Header></soap:Header>

Page 33: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

SendDocument Request Example SendDocument Request Example (cont.)(cont.)<soap:Body><soap:Body>

<wprt:SendDocumentRequest><wprt:SendDocumentRequest><wprt:JobId><wprt:JobId>IdFromCreateJobRequestIdFromCreateJobRequest</wprt:JobId></wprt:JobId><wprt:DocumentDescription><wprt:DocumentDescription>

<wprt:DocumentId><wprt:DocumentId>DocIdNumberDocIdNumber</wprt:DocumentId></wprt:DocumentId><wprt:Compression>None</wprt:Compression><wprt:Compression>None</wprt:Compression><wprt:DocumentFormat><wprt:DocumentFormat>

application/octet-stream</wprt:DocumentFormat>application/octet-stream</wprt:DocumentFormat><wprt:DocumentName>Example.xml</wprt:DocumentName><wprt:DocumentName>Example.xml</wprt:DocumentName>

</wprt:DocumentDescription></wprt:DocumentDescription><wprt:LastDocument>true</wprt:LastDocument><wprt:LastDocument>true</wprt:LastDocument><wprt:DocumentData xmlmime:contentType=”application/postscript”><wprt:DocumentData xmlmime:contentType=”application/postscript”>

<xop:Include href=”cid:000001” /><xop:Include href=”cid:000001” /></wprt:DocumentData></wprt:DocumentData>

</wprt:SendDocumentRequest></wprt:SendDocumentRequest></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

----=_NextPart_123_321_0000000.3E9F5D----=_NextPart_123_321_0000000.3E9F5DContent-Type: application/postscript;Content-Type: application/postscript;Content-Transfer-Encoding: binaryContent-Transfer-Encoding: binaryContent-ID: <000001>Content-ID: <000001>

Document PDL DataDocument PDL Data

----=_NextPart_123_321_0000000.3E9F5D------=_NextPart_123_321_0000000.3E9F5D--

Page 34: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

SendDocument Response SendDocument Response ExampleExample<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print">xmlns:wprt="http://schemas.microsoft.com/windows/2005/05/wdp/print"><SOAP:Header><SOAP:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/05/wdp/print/SendDocumentResponsehttp://schemas.microsoft.com/windows/2005/05/wdp/print/SendDocumentResponse

</wsa:Action></wsa:Action>--- Header removed for Brevity ------ Header removed for Brevity ---

</SOAP:Header</SOAP:Header<SOAP:Body><SOAP:Body>

<wprt:SendDocumentResponse/><wprt:SendDocumentResponse/></SOAP:Body></SOAP:Body>

</SOAP:Envelope></SOAP:Envelope>

Page 35: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

XML Messages for XML Messages for ScanningScanning

Page 36: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Subscribe Request Example Subscribe Request Example <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</wsa:Action><wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</wsa:Action><wsdp:ServiceId>uri:scn</wsdp:ServiceId><wsdp:ServiceId>uri:scn</wsdp:ServiceId>--- Headers removed for Brevity ------ Headers removed for Brevity ---

</soap:Header></soap:Header><soap:Body><soap:Body>

<wse:Subscribe><wse:Subscribe><wse:Delivery Mode="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push"><wse:Delivery Mode="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push">

<wse:NotifyTo><wse:NotifyTo><wsa:Address><wsa:Address>

http://157.56.92.87:5357/872b563f-2832-49eb-8e80-a721fe7a7fd9http://157.56.92.87:5357/872b563f-2832-49eb-8e80-a721fe7a7fd9</wsa:Address></wsa:Address>

</wse:NotifyTo></wse:NotifyTo></wse:Delivery></wse:Delivery><wse:Expires>PT10M</wse:Expires><wse:Expires>PT10M</wse:Expires><wse:Filter Dialect="http://schemas.xmlsoap.org/ws/2005/05/devprof/Action"><wse:Filter Dialect="http://schemas.xmlsoap.org/ws/2005/05/devprof/Action">

http://schemas.microsoft.com/windows/2005/08/wdp/scan/ScanAvailableEventhttp://schemas.microsoft.com/windows/2005/08/wdp/scan/ScanAvailableEvent</wse:Filter></wse:Filter><wscn:ScanDestinations><wscn:ScanDestinations>

<wscn:ScanDestination><wscn:ScanDestination><wscn:ClientDisplayName>Scan to MFenelon2L</wscn:ClientDisplayName><wscn:ClientDisplayName>Scan to MFenelon2L</wscn:ClientDisplayName><wscn:ClientContext>Scan</wscn:ClientContext><wscn:ClientContext>Scan</wscn:ClientContext>

</wscn:ScanDestination></wscn:ScanDestination><wscn:ScanDestination><wscn:ScanDestination>

<wscn:ClientDisplayName>Scan for Print to MFenelon2L</wscn:ClientDisplayName><wscn:ClientDisplayName>Scan for Print to MFenelon2L</wscn:ClientDisplayName><wscn:ClientContext>ScanToPrint</wscn:ClientContext><wscn:ClientContext>ScanToPrint</wscn:ClientContext>

</wscn:ScanDestination></wscn:ScanDestination></wscn:ScanDestinations></wscn:ScanDestinations>

</wse:Subscribe></wse:Subscribe></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 37: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

Subscribe (ScanAvailableEvent) Subscribe (ScanAvailableEvent) Response Example Response Example <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse</wsa:Action><wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse</wsa:Action>--- Headers removed for Brevity ------ Headers removed for Brevity ---

</soap:Header></soap:Header><soap:Body><soap:Body>

<wse:SubscribeResponse><wse:SubscribeResponse><wse:SubscriptionManager><wse:SubscriptionManager>

<wsa:Address>http://157.56.88.113:80/TestDevice</wsa:Address><wsa:Address>http://157.56.88.113:80/TestDevice</wsa:Address><wsa:ReferenceProperties><wsa:ReferenceProperties>

<wsdp:ServiceId>uri:scn</wsdp:ServiceId><wsdp:ServiceId>uri:scn</wsdp:ServiceId><wse:Identifier>uuid:0c27676b-e507-4837-9512-49d64640991d</wse:Identifier><wse:Identifier>uuid:0c27676b-e507-4837-9512-49d64640991d</wse:Identifier>

</wsa:ReferenceProperties></wsa:ReferenceProperties></wse:SubscriptionManager></wse:SubscriptionManager><wse:Expires>PT9M59.9531289S</wse:Expires><wse:Expires>PT9M59.9531289S</wse:Expires><wscn:DestinationResponses><wscn:DestinationResponses>

<wscn:DestinationResponse><wscn:DestinationResponse><wscn:ClientContext>Scan</wscn:ClientContext><wscn:ClientContext>Scan</wscn:ClientContext><wscn:DestinationToken><wscn:DestinationToken>113527a8-0908-4222-bd6c-9c95d302c454</wscn:DestinationToken>113527a8-0908-4222-bd6c-9c95d302c454</wscn:DestinationToken>

</wscn:DestinationResponse></wscn:DestinationResponse><wscn:DestinationResponse><wscn:DestinationResponse>

<wscn:ClientContext>ScanToPrint</wscn:ClientContext><wscn:ClientContext>ScanToPrint</wscn:ClientContext><wscn:DestinationToken>6fcbbc0f-c035-41ca-a912-f6961a2e2257</wscn:DestinationToken><wscn:DestinationToken>6fcbbc0f-c035-41ca-a912-f6961a2e2257</wscn:DestinationToken>

</wscn:DestinationResponse></wscn:DestinationResponse></wscn:DestinationResponses></wscn:DestinationResponses>

</wse:SubscribeResponse></wse:SubscribeResponse></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 38: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

ScanAvailableEvent ExampleScanAvailableEvent Example<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:To><wsa:To>http://157.56.92.87:5357/872b563f-2832-49eb-8e80-a721fe7a7fd9http://157.56.92.87:5357/872b563f-2832-49eb-8e80-a721fe7a7fd9

</wsa:To></wsa:To><wsa:Action><wsa:Action>

http://schemas.microsoft.com/windows/2005/08/wdp/scan/ScanAvailableEventhttp://schemas.microsoft.com/windows/2005/08/wdp/scan/ScanAvailableEvent</wsa:Action></wsa:Action>

</soap:Header></soap:Header><soap:Body><soap:Body>

<wscn:ScanAvailableEvent><wscn:ScanAvailableEvent><wscn:ClientContext>Scan</wscn:ClientContext><wscn:ClientContext>Scan</wscn:ClientContext><wscn:ScanIdentifier><wscn:ScanIdentifier>

a74dc73c-34b6-4e99-a724-c006f4625b68a74dc73c-34b6-4e99-a724-c006f4625b68</wscn:ScanIdentifier></wscn:ScanIdentifier>

</wscn:ScanAvailableEvent></wscn:ScanAvailableEvent></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 39: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

CreateScanJob Request Example CreateScanJob Request Example <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:To>http://157.56.88.113:80/TestDevice</wsa:To><wsa:To>http://157.56.88.113:80/TestDevice</wsa:To><wsa:Action><wsa:Action>

http://schemas.microsoft.com/windows/2005/08/wdp/scan/CreateScanJobhttp://schemas.microsoft.com/windows/2005/08/wdp/scan/CreateScanJob</wsa:Action></wsa:Action><wsdp:ServiceId>uri:scn</wsdp:ServiceId><wsdp:ServiceId>uri:scn</wsdp:ServiceId>--- Headers removed for Brevity ------ Headers removed for Brevity ---

</soap:Header></soap:Header><soap:Body><soap:Body>

<wscn:CreateScanJobRequest><wscn:CreateScanJobRequest><wscn:ScanIdentifier><wscn:ScanIdentifier>

a74dc73c-34b6-4e99-a724-c006f4625b68</wscn:ScanIdentifier>a74dc73c-34b6-4e99-a724-c006f4625b68</wscn:ScanIdentifier><wscn:DestinationToken><wscn:DestinationToken>

113527a8-0908-4222-bd6c-9c95d302c454</wscn:DestinationToken>113527a8-0908-4222-bd6c-9c95d302c454</wscn:DestinationToken><wscn:ScanTicket><wscn:ScanTicket>

<wscn:JobDescription><wscn:JobDescription><wscn:JobName>GetImage from ScanAvailableEvent</wscn:JobName><wscn:JobName>GetImage from ScanAvailableEvent</wscn:JobName><wscn:JobOriginatingUserName><wscn:JobOriginatingUserName>

MFenelon</wscn:JobOriginatingUserName>MFenelon</wscn:JobOriginatingUserName><wscn:JobInformation>Scanning from platen..</wscn:JobInformation><wscn:JobInformation>Scanning from platen..</wscn:JobInformation>

</wscn:JobDescription></wscn:JobDescription>

Page 40: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

CreateScanJob Request Example (Cont.) CreateScanJob Request Example (Cont.) <wscn:DocumentParameters><wscn:DocumentParameters>

<wscn:Format>exif</wscn:Format><wscn:Format>exif</wscn:Format><wscn:ImagesToTransfer>1</wscn:ImagesToTransfer><wscn:ImagesToTransfer>1</wscn:ImagesToTransfer><wscn:InputSource>Platen</wscn:InputSource><wscn:InputSource>Platen</wscn:InputSource><wscn:InputSize><wscn:InputSize>

<wscn:InputMediaSize><wscn:InputMediaSize><wscn:Width>1000</wscn:Width><wscn:Width>1000</wscn:Width><wscn:Height>1000</wscn:Height><wscn:Height>1000</wscn:Height>

</wscn:InputMediaSize></wscn:InputMediaSize></wscn:InputSize></wscn:InputSize><wscn:Rotation>0</wscn:Rotation><wscn:Rotation>0</wscn:Rotation><wscn:MediaSides><wscn:MediaSides>

<wscn:MediaFront><wscn:MediaFront><wscn:ColorProcessing>RGB24</wscn:ColorProcessing><wscn:ColorProcessing>RGB24</wscn:ColorProcessing><wscn:Resolution><wscn:Resolution>

<wscn:Width>200</wscn:Width><wscn:Width>200</wscn:Width></wscn:Resolution></wscn:Resolution>

</wscn:MediaFront></wscn:MediaFront></wscn:MediaSides></wscn:MediaSides>

</wscn:DocumentParameters></wscn:DocumentParameters></wscn:ScanTicket></wscn:ScanTicket>

</wscn:CreateScanJobRequest></wscn:CreateScanJobRequest></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 41: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

CreateScanJob Response CreateScanJob Response Example Example <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdisco="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsdisco="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/08/wdp/scan/http://schemas.microsoft.com/windows/2005/08/wdp/scan/

CreateScanJobResponseCreateScanJobResponse</wsa:Action></wsa:Action>--- Headers removed for Brevity ------ Headers removed for Brevity ---

</soap:Header></soap:Header><soap:Body><soap:Body>

<wscn:CreateScanJobResponse><wscn:CreateScanJobResponse><wscn:JobId>1</wscn:JobId><wscn:JobId>1</wscn:JobId><wscn:JobToken>b5838c21<wscn:JobToken>b5838c21-63a1-4e99-a724-b459218cae7f-63a1-4e99-a724-b459218cae7f</wscn:JobToken></wscn:JobToken><wscn:ImageInformaiton><wscn:ImageInformaiton>

..

..</wscn:ImageInformation></wscn:ImageInformation><wscn:DocumentFinalParameters><wscn:DocumentFinalParameters>

..

..</wscn:DocumentFinalParameters></wscn:DocumentFinalParameters>

</wscn:CreateScanJobResponse></wscn:CreateScanJobResponse></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 42: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

RetrieveImage Request RetrieveImage Request Example Example <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"

xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof" xmlns:wsdp="http://schemas.xmlsoap.org/ws/2005/05/devprof"

xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">

<soap:Header><soap:Header>

<wsa:Action><wsa:Action>

http://schemas.microsoft.com/windows/2005/08/wdp/scan/RetrieveImagehttp://schemas.microsoft.com/windows/2005/08/wdp/scan/RetrieveImage

</wsa:Action></wsa:Action>

<wsdp:ServiceId>uri:scn</wsdp:ServiceId><wsdp:ServiceId>uri:scn</wsdp:ServiceId>--- Headers removed for Brevity ------ Headers removed for Brevity ---

</soap:Header></soap:Header>

<soap:Body><soap:Body>

<wscn:RetrieveImageRequest><wscn:RetrieveImageRequest>

<wscn:JobId>1</wscn:JobId><wscn:JobId>1</wscn:JobId>

<wscn:JobToken>b5838c21<wscn:JobToken>b5838c21-63a1-4e99-a724-b459218cae7f-63a1-4e99-a724-b459218cae7f</wscn:JobToken></wscn:JobToken>

<wscn:DocumentDescription><wscn:DocumentDescription>

<wscn:DocumentName>ScannedImage001.JPG</wscn:DocumentName><wscn:DocumentName>ScannedImage001.JPG</wscn:DocumentName>

</wscn:DocumentDescription></wscn:DocumentDescription>

</wscn:RetrieveImageRequest></wscn:RetrieveImageRequest>

</soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

Page 43: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

RetrieveImage Response RetrieveImage Response Example Example Content-Type: multipart/related; Content-Type: multipart/related; boundary=4aa7d814-adc1-47a2-8e1c-07585b9892a4;boundary=4aa7d814-adc1-47a2-8e1c-07585b9892a4;type="application/xop+xml"; type="application/xop+xml"; start="<14629f74-2047-436c-8046-5cac76d280fc@uuid>"; start="<14629f74-2047-436c-8046-5cac76d280fc@uuid>"; start-info=application/soap+xml; charset="utf-8”start-info=application/soap+xml; charset="utf-8”mime-version: 1.0mime-version: 1.0

--4aa7d814-adc1-47a2-8e1c-07585b9892a4--4aa7d814-adc1-47a2-8e1c-07585b9892a4content-type: application/xop+xml; type="application/soap+xml"; charset="utf-content-type: application/xop+xml; type="application/soap+xml"; charset="utf-8"8"content-transfer-encoding: binarycontent-transfer-encoding: binarycontent-id: <14629f74-2047-436c-8046-5cac76d280fc@uuid>content-id: <14629f74-2047-436c-8046-5cac76d280fc@uuid><?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan">xmlns:wscn="http://schemas.microsoft.com/windows/2005/08/wdp/scan"><soap:Header><soap:Header>

<wsa:Action><wsa:Action>http://schemas.microsoft.com/windows/2005/08/wdp/scan/RetrieveImageResponsehttp://schemas.microsoft.com/windows/2005/08/wdp/scan/RetrieveImageResponse

</wsa:Action></wsa:Action></soap:Header></soap:Header><soap:Body><soap:Body>

<wscn:RetrieveImageResponse><wscn:RetrieveImageResponse>

Page 44: Web Services for Devices Install: Printers & Scanners Mike Fenelon Software Developer Digital Documents, Platform and Solutions Team MFenelon @ microsoft.com

RetrieveImage Response Example RetrieveImage Response Example (Cont.) (Cont.)

<wscn:ScanData><wscn:ScanData><XOP:Include xmlns:XOP="http://www.w3.org/2004/08/xop/include" <XOP:Include xmlns:XOP="http://www.w3.org/2004/08/xop/include"

href="cid:1c696bd7-005a-48d9-9ee9-9adca11f8892@uuid"/>href="cid:1c696bd7-005a-48d9-9ee9-9adca11f8892@uuid"/></wscn:ScanData></wscn:ScanData>

</wscn:RetrieveImageResponse></wscn:RetrieveImageResponse></soap:Body></soap:Body>

</soap:Envelope></soap:Envelope>

--4aa7d814-adc1-47a2-8e1c-07585b9892a4--4aa7d814-adc1-47a2-8e1c-07585b9892a4content-type: application/dibcontent-type: application/dibcontent-transfer-encoding: binarycontent-transfer-encoding: binarycontent-id: <1c696bd7-005a-48d9-9ee9-9adca11f8892@uuid>content-id: <1c696bd7-005a-48d9-9ee9-9adca11f8892@uuid>

....Binary Image data for Scan.........Binary Image data for Scan.....

--4aa7d814-adc1-47a2-8e1c-07585b9892a4----4aa7d814-adc1-47a2-8e1c-07585b9892a4--