Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Returning Enumeration or Exception from WebMethod?

Reply
Thread Tools

Returning Enumeration or Exception from WebMethod?

 
 
Tobias Lekman
Guest
Posts: n/a
 
      08-09-2003
Hi,

I am trying to raise an exception from within a WebMethod
in my web service. Is this possible at all? If so, how do
you do it?

If this is not possible, then I would be happy to return
an enumeration of response codes, but have been
unsuccessful in declaring and returning an enumeration.
Is this possible at all? If so, how do you do it?

Regards,
Tobias Lekman

 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      08-11-2003
Putting a statement like 'throw new Exception()', will do it. Or just
having a line of code that does it.

What is returned is a SoapException object, I think. But this should have
properties to let you drill down and get the contents of the original
exception.

"Tobias Lekman" <> wrote in message
news:007501c35e98$83d1a3a0$...
> Hi,
>
> I am trying to raise an exception from within a WebMethod
> in my web service. Is this possible at all? If so, how do
> you do it?
>
> If this is not possible, then I would be happy to return
> an enumeration of response codes, but have been
> unsuccessful in declaring and returning an enumeration.
> Is this possible at all? If so, how do you do it?
>
> Regards,
> Tobias Lekman
>



 
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
Hash enumeration returning nulls? cczona Ruby 1 03-26-2010 04:51 PM
Re-using a simple type definition; with enumeration constraint andwithout enumeration constraint puvit82 XML 4 02-01-2008 03:46 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
returning none when it should be returning a list? randomtalk@gmail.com Python 11 05-02-2006 10:26 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