Returning Enumeration or Exception from WebMethod?

T

Tobias Lekman

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
 
M

Marina

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.
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top