Release 10.1A: OpenEdge Development:
Web Services

> ## Handling errors on the client

> To handle a SOAP fault in a VB.NET client, catch the `SoapException` and parse it, as shown:

>     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

> Caution: In any `catch` `block` where you exit the program, you must release all Web service objects you created in the program.

> The `parseSoapException( )` method in this example is a client function provided in the .NET samples installed with OpenEdge (see Chapter 6 "Sample Progress 4GL Web Services and Client Applications"). It parses the detail error information from the SOAP fault message.

> You can also use the Microsoft SOAP Toolkit to assist in debugging SOAP fault messages. For more information, see Chapter 7, " Testing and Debugging Progress 4GL Web Services."

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