throwing and handling exceptions in web services

L

Lachlan James

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
 
L

Lachlan James

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
 

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

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top