[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

XML Web Services Input parameters

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.
1 Answer

omar awwad

1/16/2003 2:24:00 PM

0

i think this link will help
http://msdn.microsoft.com/library/de...
url=/library/en-us/dnservice/html/service08062002.asp
>-----Original Message-----
>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.
>.
>