Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This section describes how a WSD Print Service generates and sends operation error codes. Error codes that most operations can return are described in Common Operation Error Codes.
When the WSD Print Service encounters an error while processing an XxxRequest operation, it returns an error code instead of an XxxResponse element. The Print Service returns error codes in the <soap:Fault> element.
All error messages defined within the WSD Print Service must be sent according to the rules described in the Web Services Addressing (WS-Addressing) specification. Specifically, the WSD Print Service should send fault messages, in order, to the following locations:
The [fault endpoint] if it is present and valid.
The [reply endpoint] if it is present.
The [source endpoint].
Endpoints must include required message information headers on all fault messages. Fault messages are correlated as replies using the [relationship] property as defined in WS-Addressing. The following [action] property designates fault messages:
https://schemas.xmlsoap.org/ws/2004/08/addressing/fault
The definitions of faults use the following properties:
[Code] |
The fault code |
[Subcode] |
The fault subcode |
[Reason] |
The English language reason element. |
[Detail] |
The detail element. If absent, no detail element is defined for the fault. |
These properties bind to a SOAP 1.2 fault as follows:
<S:Envelope>
<S:Header>
<wsa:Action>https://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<!-- Headers excluded for clarity -->
</S:Header>
<S:Body>
<S:Fault>
<S:Code>
<S:Value>[Code]</S:Value>
<S:Subcode>
<S:Value>[Subcode]</S:Value>
</S:Subcode>
</S:Code>
<S:Reason>
<S:Text xml:lang="en">[Reason]</S:Text>
</S:Reason>
<S:Detail>[Detail]</S:Detail>
</S:Fault>
</S:Body>
</S:Envelope>
The following code shows a sample SOAP Fault:
<soap:Envelope xmlns:soap="https://www.w3.org/2003/05/soapelope"
xmlns:xml="https://www.w3.org/XML/1998/namespace"
xmlns:wsa="https://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:nprt="https://schemas.microsoft.com/windows/2005/05/wdp/print">
<soap:Header>
<wsa:Action>https://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<!-- Headers excluded for brevity -->
</soap:Header>
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
<soap:Subcode>
<soap:Value>wprt:InvalidOperation</soap:Value>
</soap:Subcode>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">Invalid Operation</soap:Text>
</soap:Reason>
<soap:Detail>
Name of Invalid Operation
</soap:Detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Send comments about this topic to Microsoft
Build date: 7/19/2012