Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Can't retrieve Code value SoapException in client application

Thread Tools

Can't retrieve Code value SoapException in client application

Jethro Waanders
Posts: n/a

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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SoapException when invoking a .NET webservice from java code. anil ASP .Net Web Services 0 06-02-2008 01:14 PM
Retrieve Value as it's Strong Type from Application or Session State Cramer ASP .Net 2 05-03-2008 12:15 AM
How to retrieve constants value from compiled code in jar file? Java 1 07-06-2007 02:25 PM
VB Code to retrieve 1 value from sql database Ashe Sjedic ASP .Net 3 02-02-2006 09:01 PM
SoapException....setting the "code" property.... Doug ASP .Net Web Services 1 08-17-2004 10:06 PM