I'm new in consuming web services and i have to access a state-run web service.
I was given an app.config file, a certificate file (.cer) and some general instructions.
Haven'n used Visual Studio 2008 Express before but i have 15 years experience in writing vb5/6 code.
Anyway, I installed the .cer file using mmc and then opened a new project and
I added the System.Runtime.Serialization and System.ServiceModel
I addedd a service reference to the WSDL link
I included app.config file in my project
and wrote the follwing code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EchoSvcClientConsAppl
{
class Program
{
static void Main(string[] args)
{
ConAp66.myserviceref.ServiceClient clientProxy = new ConAp66.myserviceref.ServiceClient();
clientProxy.ClientCredentials.UserName.UserName = "xx";
clientProxy.ClientCredentials.UserName.Password = "xx";
clientProxy.Open();
String ar1 = "xxx";
String ar2 = "xxx";
String ar3 = "xxx";
ConAp66.myserviceref.eRes r = clientProxy.getRes1(ar1, ar2, ar3);
clientProxy.Close();
System.Console.ReadLine();
}
}
}
i get an error on line:
ConAp66.myserviceref.eRes r = clientProxy.getRes1(ar1, ar2, ar3);
saying that i have token authentication problems
any clues???
Your help would be greatly appreciated since i really don't know what to do...