I need to add a service reference to our 3rd party's web service but I'm told they do not host the endpoint wsdl. I do however have a local copy of the wsdl so can anyone give me any pointer as to the best way to do this?
thanks
I need to add a service reference to our 3rd party's web service but I'm told they do not host the endpoint wsdl. I do however have a local copy of the wsdl so can anyone give me any pointer as to the best way to do this?
thanks
To access 3rd party web service using a wcf client you have to:
1.) Create service reference from wsdl file. See How to generate service reference with only physical wsdl file
2.) Instantiate the WCF client and call the required method. Sample code:
// Create a client object. CalculatorClient class was generated in service reference code.
CalculatorClient calcClient = new CalculatorClient();
// Call the Add service operation.
double value1 = 100.00D;
double value2 = 15.99D;
double result = calcClient.Add(value1, value2);
Console.WriteLine("Add({0},{1}) = {2}", value1, value2, result);
For more see Instantiate the WCF client proxy section in Accessing Services Using a WCF Client