Release 10.1A: OpenEdge Development:
Web Services

> ## Handling SOAP faults programmatically

> The client application should handle all SOAP faults. Many SOAP client toolkits convert SOAP faults to client exceptions that can be handled in a `try...catch` block. The following code is a VB.NET fragment from the sample applications that are available on the Documentation and Samples CD:

>     Try
>        ' Code to access the Web service
>        ...
>        Catch soapEx As System.Web.Services.Protocols.SoapException
>           Dim detail As String, reqId As String
>              detail = parseSoapException(soapEx.Detail, reqId)
>              MsgBox(detail, MsgBoxStyle.Critical, soapEx.Message)
>     End Try

> In this example, `parseSoapException( )` is a client helper function to parse the SOAP fault detail provided in .NET sample code. You can find more examples like this in both the .NET and Java sample client applications. For more information on these sample applications, see Chapter 6, " Sample Progress 4GL Web Services and Client Applications."

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095