enterprises_s@hotmail.com
1/14/2003 11:43:00 PM
When designing an XML Web Service that accepts input
parameters, how do you let the consuming application know
when the parameter is not acceptable? Do you raise an
application exception?
The reason I ask is that I read somewhere that its not
good to raise exceptions for things you can test for in
your code. When making a normal application or asp page,
if I find an error in calling a function, i can print out
an error message. Or the compiler will catch it.
But since web services are separate, I still have to
validate the input, and if so, how do I let the consuming
app know that the input is not valid.
For instance, if I have foo(parameter1, parameter2) and
there is a restriction on parameter1 that it be less than
15 characters, then how do I return an error message if
parameter1 is indeed greater than 15 characters?
Thanks.