I'm taking my first baby steps into consuming web services. Here's my situation:
I'm writing in .NET 3.5 for an existing corporate intranet website. I need to add a call to a web service, passing account data and getting a response.
I am able to add a web reference to the .wsdl file and have Visual Studio generate the Service Reference class.
So, here's my question - is it easier to use WCF in this situation, or should I use the baked in ASP.NET web services architecture?
I tried to get the web services working using the following code, but was unsuccessful. In this code, the ProgramServiceClient is the name of the service class generated for me by VS using the wsdl file. Again, I am very new to this, so any pointers would be very helpful!
var client = new ProgramServiceClient();
Int64 acct = 123456781234
var requestMetadata = new RequestMetadata();
var response = new GetProgramResponse();
var request = new GetProgramRequest
{
AccountId = acct
};
client.GetProgram(requestMetadata, request, out response);