Is it possible to inherits from SoapException to create custom exception

Discussion in 'ASP .Net Web Services' started by Ghislain Tanguay, Jan 28, 2005.

  1. Hi all,

    I try to create a class who inherits from SoapException

    Public class SoapExceptionTst
    inherits SoapException

    public sub new (....)

    Public property NewProperty as String
    Get

    End Get

    Set

    End Set

    Then in my serviceWeb I'm able to throw a new SoapExceptionTst but...

    sadly, when it arrive in my form in the catch the error always go directly
    in the

    Catch ex as SoapException!!!!!!

    Just before throwing it in my web service I see it's type and it's correct
    nut it change on the wire!!!!

    Is it possible to inherit from SoapException or not? or maybe I just don't
    understand
     
    Ghislain Tanguay, Jan 28, 2005
    #1
    1. Advertising

  2. Hello Ghislain,

    Thats because the SoapExceptiontst always gets serialized to Soapexception
    on the wire. Remember in webservice land the client is unaware of the implementation
    ... just knows the xml messages coming back and forth.
    HTH
    Regards,
    Dilip Krishnan
    MCAD, MCSD.net
    dkrishnan at geniant dot com
    http://www.geniant.com

    > Hi all,
    >
    > I try to create a class who inherits from SoapException
    >
    > Public class SoapExceptionTst
    > inherits SoapException
    > public sub new (....)
    >
    > Public property NewProperty as String
    > Get
    > End Get
    >
    > Set
    >
    > End Set
    >
    > Then in my serviceWeb I'm able to throw a new SoapExceptionTst but...
    >
    > sadly, when it arrive in my form in the catch the error always go
    > directly in the
    >
    > Catch ex as SoapException!!!!!!
    >
    > Just before throwing it in my web service I see it's type and it's
    > correct nut it change on the wire!!!!
    >
    > Is it possible to inherit from SoapException or not? or maybe I just
    > don't understand
    >
     
    Dilip Krishnan, Jan 28, 2005
    #2
    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. Alex Nitulescu
    Replies:
    0
    Views:
    376
    Alex Nitulescu
    Feb 22, 2005
  2. Chris
    Replies:
    0
    Views:
    359
    Chris
    Jan 31, 2007
  3. ton
    Replies:
    1
    Views:
    1,072
    Teemu Keiski
    Jun 24, 2007
  4. John Harkin
    Replies:
    0
    Views:
    158
    John Harkin
    Aug 18, 2004
  5. Robert Pettersson
    Replies:
    3
    Views:
    197
    Robert Pettersson
    Jan 12, 2005
Loading...

Share This Page