
Originally Posted by
sky33
Sorry, I realize I am late to the game on this one, but I was wondering about a little bit different approach. When you have a service that could possibly be exposed to non-java clients as a SOAP based or REST based web service, is it a good approach to include exception conditions the return type? I think that SOAP uses faults, but what about REST based services? So in the case of createUser(), maybe I am returning a CreateUserResponse object which has the created User on success (+ maybe other contextual data), but also contains the error message(s) on failure. The messages could be broken out into system vs. business errors. I ask the question because I have seen a few public web services take this approach. Any thoughts on that approach?