Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET WSS
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
 
Dim sResult As DataSet
result = WebService.GetInformation("") ''Here should go the parameter, but assuming that the client is not assigned it
The Next code below is the web service.
Public Function GetInformation(ByVal CodSeguridad As Integer) As DataSet ''here trow me an Error of dataTpye or if the parameter is missing
 
thanks in advance.
Posted 28-Jul-11 6:20am

1 solution

Rate this: bad
good
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:
 
http://msdn.microsoft.com/en-gb/magazine/cc164115.aspx[^]
 
http://msdn.microsoft.com/en-gb/magazine/cc164100.aspx[^]
  Permalink  
Comments
Rene Bustos at 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 at 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
0 OriginalGriff 370
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 235
3 Afzaal Ahmad Zeeshan 209
4 CPallini 195
0 OriginalGriff 5,560
1 DamithSL 4,476
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 28 Jul 2011
Copyright © CodeProject, 1999-2014
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