Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > throwing and handling exceptions in web services

Reply
Thread Tools

throwing and handling exceptions in web services

 
 
Lachlan James
Guest
Posts: n/a
 
      07-14-2003
Hi,

I was just wondering how to best throw and catch
exceptions in web services.

I have created a web service that throws 3 or 4 different
types of exceptions. Depending on which exception is
thrown I would like the client to be able to act
accordingly, but how can the client catch an exception
that doesn't exist on their system?

Is there a better way to inform consuming code of
different errors that are occuring. I can't help but feel
if ms included the throws keyword like java we wouldn't
have this problem because the consuming code that is
generated would know about which exceptions a particular
service could throw.

Thanks,

Lachlan James
 
Reply With Quote
 
 
 
 
Lachlan James
Guest
Posts: n/a
 
      07-17-2003
I guess the best I can do is create a SoapException and
stick my exception details inside it. I guess that means
that the client will have to know about the different
exceptions they might encounter.

If anyone has any comments that would be helpful.

Thanks,

Lachlan

>-----Original Message-----
>Hi,
>
>I was just wondering how to best throw and catch
>exceptions in web services.
>
>I have created a web service that throws 3 or 4 different
>types of exceptions. Depending on which exception is
>thrown I would like the client to be able to act
>accordingly, but how can the client catch an exception
>that doesn't exist on their system?
>
>Is there a better way to inform consuming code of
>different errors that are occuring. I can't help but feel
>if ms included the throws keyword like java we wouldn't
>have this problem because the consuming code that is
>generated would know about which exceptions a particular
>service could throw.
>
>Thanks,
>
>Lachlan James
>.
>

 
Reply With Quote
 
 
 
Reply

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
Throwing Constructor Exceptions and cleaning up Richard Maher Java 38 04-15-2009 06:39 PM
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
Throwing Exceptions =?Utf-8?B?Q2xpdmU=?= ASP .Net 1 02-20-2004 03:23 PM
Throwing custom exceptions in web services using VS.Net Gian U. Uy ASP .Net Web Services 3 12-04-2003 07:06 PM
Throwing Exceptions C ASP .Net 2 11-06-2003 03:02 PM



Advertisments