This is blog 3 of 3. This blog will learn how to create an app that consumes your web service.
Quick steps
- In Visual Studio, create a new Console application.
- Add a service reference to the project.
- In code, use the ServiceSoapClient to call the available web services (methods).

3. Example code
static void Main(string[] args)
{
try
{
ServiceSoapClient client = new ServiceSoapClient();
string insult = client.GetInsult();
Console.WriteLine(insult);
}
catch (Exception e)
{
Console.WriteLine(e.Message.ToString());
}
Console.WriteLine("Press any key to continue");
Console.ReadKey();
}
That was fun! Let’s do it again.