xxxxxxxxxx
using System;
// ...
class Program
{
static void Main(string[] args)
{
YourWebServiceClient client = new YourWebServiceClient();
// Call a method from the web service
string result = client.YourWebServiceMethod();
// Display the result
Console.WriteLine(result);
// Wait for user input before closing the console
Console.ReadLine();
}
}
xxxxxxxxxx
using System.Net;
// ...
public partial class YourWebServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol
{
public YourWebServiceClient()
{
// Configure authorization
NetworkCredential credentials = new NetworkCredential("your_username", "your_password");
Credentials = credentials;
}
// Rest of the client-side code for consuming the web service...
}