ValidateScanTicketRequest element
The required ValidateScanTicketRequest operation element enables a client to determine if the settings for future scan operations are valid.
Usage
<wscn:ValidateScanTicketRequest>
child elements
</wscn:ValidateScanTicketRequest>
Attributes
There are no attributes.
Child elements
Element |
---|
ScanTicket |
Parent elements
There are no parent elements.
Remarks
A client can use the ValidateScanTicketRequest element to validate various setting changes and combinations.
ScanTicket contains all of the settings that the client wants to submit in a future scan operation. ScanTicket can contain only the processing elements that the client wants to override in the scanner, or it can contain every possible element that is supported in the WSD Scan Service.
If the WSD Scan Service successfully processes ValidateScanTicketRequest, it returns its validation information in a ValidateScanTicketResponse operation. Otherwise, the Scan Service should return the appropriate error codes.
This operation can return all of the common WSD Scan Service operation error codes. For more information about how to report errors, see WSD Scan Service Operation Error Reporting.
This operation might also return the following error code:
ClientErrorConflictingRequiredParameters
There is a conflict between two or more DocumentParameters elements that each have the MustHonor attribute set to true. Using all of the settings that are supplied with MustHonor set true causes a conflict in the device. The Scan Service cannot resolve this conflict so the ScanTicket is deemed invalid.
Fault property Definition [Code] soap:Sender [Subcode] wscn:ClientErrorConflictingRequiredParameters [Reason] Multiple elements in the DocumentParameters element have MustHonor set to true, but applying all settings set to true causes a conflict in the scanner device. [Detail] None
Examples
The following code example shows a validation request for a valid scan ticket.
<?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/ValidateScanTicket
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
</soap:Header>
<soap:Body>
<wscn:ValidateScanTicketRequest>
<wscn:ScanTicket>
<wscn:JobDescription>
<wscn:JobName>Photo Scan</wscn:JobName>
<wscn:JobOriginatingUserName>RogerSmith</JobOriginatingUserName>
</wscn:JobDescription>
<wscn:DocumentParameters>
<wscn:Format>dib</wscn:Format>
<wscn:InputSource>Platen</wscn:InputSource>
<wscn:ContentType>Auto</wscn:ContentType>
<wscn:InputSize>
<wscn:InputMediaSize>
<wscn:Width>3000</wscn:Width>
<wscn:Height>5000</wscn:Height>
</wscn:InputMediaSize>
</wscn:InputSize>
<wscn:Scaling>
<wscn:ScalingWidth>125</wscn:ScalingWidth>
<wscn:ScalingHeight>125</wscn:ScalingHeight>
</wscn:Scaling>
<wscn:MediaSides>
<wscn:MediaFront>
<wscn:ColorProcessing>GrayScale4</wscn:ColorProcessing>
<wscn:Resolution>
<wscn:Width>300</wscn:Width>
<wscn:Height>300</wscn:Height>
</wscn:Resolution>
</wscn:MediaFront>
</wscn:MediaSides>
</wscn:DocumentParameters>
</wscn:ScanTicket>
</wscn:ValidateScanTicketRequest>
</soap:Body>
</soap:Envelope>
The following code example shows a validation request for an invalid scan ticket.
<?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/ValidateScanTicket
</wsa:Action>
<wsa:MessageID>uuid:UniqueMsgId</wsa:MessageID>
</soap:Header>
<soap:Body>
<wscn:ValidateScanTicketRequest>
<wscn:ScanTicket>
<wscn:JobDescription>
<wscn:JobName>Photo Scan</wscn:JobName>
<wscn:JobOriginatingUserName>RogerSmith</JobOriginatingUserName>
</wscn:JobDescription>
<wscn:DocumentParameters>
<wscn:Format>jfif</wscn:Format>
<wscn:InputSource>Platen</wscn:InputSource>
<wscn:ContentType>Auto</wscn:ContentType>
<wscn:InputSize>
<wscn:DocumentSizeAutoDetect>true</wscn:DocumentSizeAutoDetect>
</wscn:InputSize>
<wscn:Scaling>
<wscn:ScalingWidth>1250</wscn:ScalingWidth>
<wscn:ScalingHeight>1250</wscn:ScalingHeight>
</wscn:Scaling>
<wscn:MediaSides>
<wscn:MediaFront>
<wscn:Resolution>
<wscn:Width>350</wscn:Width>
<wscn:Height>350</wscn:Height>
</wscn:Resolution>
<wscn:MediaFront>
<wscn:MediaSides>
</wscn:DocumentParameters>
</wscn:ScanTicket>
</wscn:ValidateScanTicketRequest>
</soap:Body>
</soap:Envelope>