Can't retrieve Code value SoapException in client application

Discussion in 'ASP .Net Web Services' started by Jethro Waanders, Nov 26, 2003.

  1. 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
     
    Jethro Waanders, Nov 26, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flare

    Inherit from soapException

    Flare, Oct 23, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    2,358
    Kevin Spencer
    Oct 24, 2003
  2. Cramer
    Replies:
    2
    Views:
    322
    Arne Vajhøj
    May 3, 2008
  3. Doug

    SoapException....setting the "code" property....

    Doug, Aug 17, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    100
  4. Doug
    Replies:
    0
    Views:
    97
  5. anil
    Replies:
    0
    Views:
    139
Loading...

Share This Page