Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WebServices exceptions

Reply
Thread Tools

WebServices exceptions

 
 
Pete Davis
Guest
Posts: n/a
 
      02-04-2004
I just want to check my facts.

I've heard some differing accounts, but my understanding of an article I
read on the MSDN site is, if you throw an exception in a web service, the
exception is encapsulated in a SoapException, returned as a Soap <fault> and
the SoapException is thrown on the client. Is my understanding of this
correct?

I just want to make sure if I'm throwing exceptions in the web service that
the client is going to get them. I seem to recall some postings where people
were saying exceptions they were throwing in their web services weren't
being thrown on the client, but instead were causing issues in their web
service itself (crashing?). I don't recall how those topics were resolved,
however.

Thanks

Pete davis

--
http://www.petedavis.net


 
Reply With Quote
 
 
 
 
Trebek
Guest
Posts: n/a
 
      02-04-2004
Nope, if you throw them, they will be caught at the client as a
SOAPException. However, a preferred way would be to catch the exception on
the web service end, fill out the detail node of the SOAPException, and have
the client catch that with the detail so they can understand what went
wrong.

Alex

"Pete Davis" <> wrote in message
news: news.com...
> I just want to check my facts.
>
> I've heard some differing accounts, but my understanding of an article I
> read on the MSDN site is, if you throw an exception in a web service, the
> exception is encapsulated in a SoapException, returned as a Soap <fault>

and
> the SoapException is thrown on the client. Is my understanding of this
> correct?
>
> I just want to make sure if I'm throwing exceptions in the web service

that
> the client is going to get them. I seem to recall some postings where

people
> were saying exceptions they were throwing in their web services weren't
> being thrown on the client, but instead were causing issues in their web
> service itself (crashing?). I don't recall how those topics were resolved,
> however.
>
> Thanks
>
> Pete davis
>
> --
> http://www.petedavis.net
>
>



 
Reply With Quote
 
 
 
 
Pete Davis
Guest
Posts: n/a
 
      02-04-2004
Okay, then I misunderstood that. I was under the impression that the
SoapException would have my exception as an InnerException. Thanks.

Pete
--
http://www.petedavis.net

"Trebek" <> wrote in message
news:40212ef9$0$82256$...
> Nope, if you throw them, they will be caught at the client as a
> SOAPException. However, a preferred way would be to catch the exception

on
> the web service end, fill out the detail node of the SOAPException, and

have
> the client catch that with the detail so they can understand what went
> wrong.
>
> Alex
>
> "Pete Davis" <> wrote in message
> news: news.com...
> > I just want to check my facts.
> >
> > I've heard some differing accounts, but my understanding of an article I
> > read on the MSDN site is, if you throw an exception in a web service,

the
> > exception is encapsulated in a SoapException, returned as a Soap <fault>

> and
> > the SoapException is thrown on the client. Is my understanding of this
> > correct?
> >
> > I just want to make sure if I'm throwing exceptions in the web service

> that
> > the client is going to get them. I seem to recall some postings where

> people
> > were saying exceptions they were throwing in their web services weren't
> > being thrown on the client, but instead were causing issues in their web
> > service itself (crashing?). I don't recall how those topics were

resolved,
> > however.
> >
> > Thanks
> >
> > Pete davis
> >
> > --
> > http://www.petedavis.net
> >
> >

>
>



 
Reply With Quote
 
Jan Tielens
Guest
Posts: n/a
 
      02-05-2004
Here's an article that shows how you can create some wrapper classes to make
life with SoapExceptions easier:
http://tinyurl.com/25j4q

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


"Pete Davis" <> wrote in message
news: news.com...
> Okay, then I misunderstood that. I was under the impression that the
> SoapException would have my exception as an InnerException. Thanks.
>
> Pete
> --
> http://www.petedavis.net
>
> "Trebek" <> wrote in message
> news:40212ef9$0$82256$...
> > Nope, if you throw them, they will be caught at the client as a
> > SOAPException. However, a preferred way would be to catch the exception

> on
> > the web service end, fill out the detail node of the SOAPException, and

> have
> > the client catch that with the detail so they can understand what went
> > wrong.
> >
> > Alex
> >
> > "Pete Davis" <> wrote in message
> > news: news.com...
> > > I just want to check my facts.
> > >
> > > I've heard some differing accounts, but my understanding of an article

I
> > > read on the MSDN site is, if you throw an exception in a web service,

> the
> > > exception is encapsulated in a SoapException, returned as a Soap

<fault>
> > and
> > > the SoapException is thrown on the client. Is my understanding of this
> > > correct?
> > >
> > > I just want to make sure if I'm throwing exceptions in the web service

> > that
> > > the client is going to get them. I seem to recall some postings where

> > people
> > > were saying exceptions they were throwing in their web services

weren't
> > > being thrown on the client, but instead were causing issues in their

web
> > > service itself (crashing?). I don't recall how those topics were

> resolved,
> > > however.
> > >
> > > Thanks
> > >
> > > Pete davis
> > >
> > > --
> > > http://www.petedavis.net
> > >
> > >

> >
> >

>
>



 
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
Exceptions - How do you make it work like built-in exceptions? Lie Python 3 01-14-2008 06:45 PM
Exceptions + Performance on path without exceptions gratch06@gmail.com C++ 3 04-16-2007 08:52 PM
Checked exceptions vs unchecked exceptions Ahmed Moustafa Java 5 07-14-2004 01:46 PM
PIX 515 Can Ping Out-to-In but not any webservices getting out-to-in Johnny Davis Cisco 6 01-19-2004 05:33 PM
Custom exceptions -- inherit from exceptions.Exception? Paul Miller Python 3 11-12-2003 09:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57