I'm in may first smart client application and I'm using a web services structure to communicate the UI with the server.
I'm not sure about the best way to return errors to the client UI (for example, a invalid foreing key, a biz rule that was broke for
the user and so on). I could return via WS a error object like in a connectec system, but I think that is not a good way. Any
sugestion?
Thanks,
Max
Michael Nemtsev - 14 Mar 2006 21:52 GMT
Hello Max,
Use SoapException for this. General conception is here http://msdn2.microsoft.com/en-us/library/ds492xtk(VS.80).aspx
Throw like this http://msdn2.microsoft.com/en-us/library/6d0x301k.aspx and
catch like here http://msdn2.microsoft.com/en-us/library/7wteyzs5(VS.80).aspx
MB> I'm in may first smart client application and I'm using a web
MB> services structure to communicate the UI with the server.
MB>
MB> I'm not sure about the best way to return errors to the client UI
MB> (for example, a invalid foreing key, a biz rule that was broke for
MB> the user and so on). I could return via WS a error object like in a
MB> connectec system, but I think that is not a good way. Any sugestion?
MB>
MB> Thanks,
MB>
MB> Max
MB>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Richard Klee - 19 Mar 2006 23:54 GMT
I also suggest these two good articles, both dealing with exception handling
in distributed webservice scenario:
WebServices and Global Exception Handling:
http://www.hannes-pavelka.com/WebServicesAndGlobalExceptionHandling.aspx
SOA and Exception Handling:
http://blogs.geekdojo.net/ryan/archive/2004/02/10/942.aspx
> I'm in may first smart client application and I'm using a web services
> structure to communicate the UI with the server.
[quoted text clipped - 7 lines]
>
> Max