Fuego.WebServices : SoapFaultException

Instances of SoapFaultException are exceptions raised when the invocation to a SOAP Web Service operation fails with a SOAP Fault.

These exceptions contain information about the SOAP Fault message, including the SOAP Fault code and description string.

Important: This exception only covers faults generated by the SOAP protocol. Lower-level network problems and exceptions (like ConnectionException or NoRouteToHostException) are not covered by SoapFaultException.

Example

do
    exampleService as ExampleService = ExampleService()
    findExampleRequest as FindExampleRequest = FindExampleRequest()
    findExampleRequest.exampleType.hello="hello"
    
    findExample exampleService
        using findExampleRequest = findExampleRequest
        returning findExampleResponse = findExampleResponse

on soapFault as SoapFaultException

    logMessage "SOAP fault caught: ["+ soapFault.faultCode+"] "
               + soapFault.faultString


    logMessage "Fault message:"+generateXmlFor(soapFault)

on ex as Exception

    logMessage "Non-SOAP exception calling Web Service "+ex
end