I am new to web services in VB.net. I have imported the WSDL into the Visual Studio 2010, but using the .net 2.0 “Web References” framework instead of the new “Service References”.
I simply need to learn how to pass my API key and one other piece of information through the API to the server. This is all that I have. What code to I need to add to
a) Send the API Key
b) Send the Database Mode String
Public Sub Call_Web_Service_Method()
Dim CallWebService As New PersonService.Header()
Dim sPostAPIKEY As String = CallWebService.APIKey()
Dim sPostDatabasemode As String = CallWebService.DatabaseMode
End Sub
I’ve been looking for two days now on how to send an API key to a server in VB.net and I have not found anything. Please help a newbie.
Thanks so much!
Is it your own web service or a web service that you don’t have control over? What method on the web service do you want to call? The web service probably has a method where you can provide the api key and the database mode as parameters?
Check out these simple guides on how to consume a web service i VB.NET
http://www.codeproject.com/Articles/2761/Consuming-Web-Services-from-a-Win-Forms-Applicatio
http://www.fryan0911.com/2009/05/vbnet-how-to-consume-web-services.html