Can't retrieve Code value SoapException in client application

J

Jethro Waanders

Hello,

I've written an ASP.NET webservice. I try to recognize the type of the
original exception in my client application bij setting the Code
property of the SoapException.

Code client application:
Catch Ex As Exception
If TypeOf Ex Is SoapException Then
Dim SoapEx As SoapException = CType(Ex, SoapException)
...

Until here it's working because my debugger reaches the Dim statement.
So it's a SoapException. BUT: SoapEx.Code.Name contains not the value
i've given in the webmethod but the value "Server". SoapEx.Message
contains the value "Server was unable to process request. --> The
surrogate pair is invalid."

What i'm doing wrong ???

The Code property in the webservice is filled in by throwing an
exception of type MyAppSoapException:
Public Class MyAppSoapException
Inherits SoapException

Sub New(ByRef Exc As UpdateException)
MyBase.New(Exc.Message, New System.Xml.XmlQualifiedName("DataError"))
End Sub

Can anybody please help me ?

Jethro Waanders
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top