hi
i am interacting with another package using webservice.
now the 3rd party who has developed the package has given me a link for the webservice.
Code:
http://??.??.??.??:8080/ABMPDA/services/PDA?wsdl
the above is the link to the web service. ?? being the nos.
now i have added this web service to my package.
i am developing the software on a PDA to use this webservice to get and update data to their package.
Response of 1st isAuthenticate(java.lang.String,java.lang.String) method are-
a. Two input parameter (Tax collector officer login name and password defined in MAInet).
a. If user is valid user then o/p will be:-
Valid User^71 (Note- ‘^’ indicate separator, contain two parameters i.e. Valid User, 71)
b. If user is invalid user then o/p will be:-
Invalid User
i am calling the method as :
Code:
Dim mRetStr As String = AbmService.isAuthenticate(TxtUserName.Text, TxtPassword.Text)
it is not letting me to pass the parameter it is giving me an error
i have attached 2 images to explain how i have done.
in the first image i have just placed the dim abmservice statement down but actually it is before it.
they r saying we have explained u everthing and u need to change the way to call the webmethod.
can someone pls. guide me how i go around i am not getting any further help from there side.
pls. help me out as i have to show the demo at the earliest.
Try using Internet Explorer to reach the WebService. IE will show the correct parameters of each method, if it shows that the parameters are not strings then take a screen shot of that and send it to the authors of the WebService.
it is showing me that there r 2 parameters but i am confused as how else can i call it as that firm is telling me to change my coding and call it properly. i dont know of any other way to call it. i asked them too to show me the coding for calling it but they r not informing me.
I think you didn't reference the web service correctly.
Suppose the url of the webservice you will consume is
Code:
http://www.domainname.com/service1
The steps to add a web reference differs from your VS version.
VS2005: Click on "Project" menu then "Add Web Reference...". Type in the url and click "Go". Select the web service(s) that is (are) avaible from that url and click "Add reference".
VS2008: Project menu > Add Service Reference. Then click on "Advanced..." button. Then click on "Add Web Reference..." button. Type in the url then click Go. Then select the webservice(s) that you want to consume and click "Add Reference".
Now back in your code, when you declare a variable for the web service, it will be in the form backwards to the url of the webservice. Taken the example url above, it will be like this
Code:
Dim myWebService as New service1.com.domainname.www
Intellisense will help you for the most part.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it. - Abraham Lincoln -
thankx for ur help stanav but i have added the reference correctly. the webreference is updating correctly too when i press update web reference following is how i have declared it
Dim auth as New WebReference.isAuthenticate(userName, password) '<<< You will have to rely on Intellisense to see how
'to properly instantiate this object. The code shown is just a guessing/mock-up code.
Dim response as taxcollection.webreference.isauthenticateResponse = umcService.isAuthenticate(auth)
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it. - Abraham Lincoln -
Like stanav said, you have to use intellisense to work out which parameters are required! Their might be 2 objects you pass in, but they may only be properties.
So
Dim auth as New WebReference.isAuthenticate(xx) ' What goes here, we cant tell!
auth.login_name = "fdgdfkj" 'Again a guess, your going to have to intellisense it for us!
It seems daft to create a function as the same name as a type however.
It seems that the wsdl file is incorrect. In the Solution Explorer click on the Show All Files button and under the Web Reference node find the .wsdl file and manually edit it to accept 2 strings for the isAuthenticate method.