Click here to Skip to main content
13,052,022 members (63,867 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Guys, i have the next question.
if i have a method in a Web Service and this method need 1 parameter, but the person who is callin my web service not pass the parameter correctly. how can i validate that parameter before the function take it this if is missing or the datatype is in incorrect formtat? there´s a way to prevent this?
here put an example

<br />
<pre lang="vb">Dim sResult As DataSet<br />
result = WebService.GetInformation("") ''Here should go the parameter, but assuming that the client is not assigned it<br />
</pre><br />
The Next code below is the web service.<br />
<pre lang="vb">Public Function GetInformation(ByVal CodSeguridad As Integer) As DataSet ''here trow me an Error of dataTpye or if the parameter is missing</pre><br />

thanks in advance.
Posted 28-Jul-11 5:20am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is no in built support for this, but wthese two articles might give you a direction:[^][^]
Rene Bustos 29-Jul-11 9:39am
Manas. thanks for the answer. I hope stay in this site for a long time.

thanks i gona give you accepted solution, the links posted are very good.

see you later.From Mexico.
Manas Bhardwaj 29-Jul-11 9:43am
glad, it helped you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 28 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100