Compartir a través de


Understanding the SOAP Fault <detail> Contents (Windows CE 5.0)

Send Feedback

The SOAP specification allows the <detail> elements of the SOAP <Fault> element to be used for application specific error information.

When an error occurs at the server, the SOAP Toolkit for Windows CE SoapServer object (accessed using the ISoapServer interface) and ISAPI listener place an <errorInfo> element in the <detail> element to convey detailed error information to the client, as shown in the following syntax example.

<soap:Fault ...>
...
<detail>
 <mserror:errorInfo 
       xmlns:mserror="https://schemas.microsoft.com/soap-
                       toolkit/faultdetail/error/">
    <mserror:returnCode>-2147024809</mserror:returnCode> 
    <mserror:serverErrorInfo>
        <mserror:description>Failure...shutting down</mserror:description> 
        <mserror:source>error-source</mserror:source> 
        <mserror:helpFile>
                 help goes here
        </mserror:helpFile> 
        <mserror:helpContext>-1</mserror:helpContext> 
     </mserror:serverErrorInfo>
     <mserror:callStack>
        <mserror:callElement>
           <mserror:component>WSDLOperation</mserror:component> 
           <mserror:description>
                  Executing method ReturnError failed
           </mserror:description> 
           <mserror:returnCode>-2147352567</mserror:returnCode> 
        </mserror:callElement>
     </mserror:callStack>
  </mserror:errorInfo>
  </detail>

<errorinfo> element structure

This element contains all of the specific error information.

The <errorInfo> element and its child elements are in the following namespace:

https://schemas.Microsoft.com/soap-toolkit/faultdetail/error/

The <errorInfo> element can have three child elements:

  • <returnCode>
  • <serverErrorInfo>
  • <callStack>

<returnCode> element

The <returnCode> child element provides the HRESULT return value of the method that failed on the server.

<serverErrorInfo> element

This optional child element appears if the failure occurs in an interface that supports the COM IErrorInfo interface (as indicated by the ISupportErrorInfo interface).

All of the following child elements of the <serverErrorInfo> element are optional and are only present if the IErrorInfo interface provides a value:

  • The <description> element, which contains the value returned by IErrorInfo::GetDescription
  • The <source> element, which contains the value returned by IErrorInfo::GetSource
  • The <helpFile> element, which contains the value returned by IErrorInfo::GetHelpFile
  • The <helpContext> element, which contains the value returned by IErrorInfo::GetHelpContext

All child elements are returned through the IErrorInfo interface provided by the ISoapClient object and in the Error object provided by Microsoft Visual Basic®.

<callStack> element

The <callStack> element has a collection of <callElement> child elements.

Each <callElement> child element contains the following:

  • A <component> element
  • A <description> element
  • A <returncode> element

This <callStack> element represents the internal call stack of the SoapServer object.

The last <callElement> element contains the error that occurred first.

See Also

Advanced Topics

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.