Generally, a disposal web service consumer class will be created for you in the namespace you provided when configuring the service reference. The default namespace for such consumers will be under ServiceReference1
, and the client will be named with the convention WebServiceNameClient
. That consumer will have member methods representing all requests that can be invoked on the web service, for instance:
C#
My.Project.Root.ServiceReference1.WebServiceNameClient client = new My.Project.Root.ServiceReference1.WebServiceNameClient();
string action = "GET";
int id = 1;
var result = client.DoWebServiceWork(action, id);
VB.NET
Dim client As New My.Project.Root.ServiceReference1.WebServiceNameClient()
Dim action As String = "GET"
Dim id As Integer = 1
Dim result = client.DoWebServiceWork(action, id)