I am trying to call the third party webservice in WCF service.
i am able to call the the service by adding the service reference in(URL) through WCF service, but while doing that i heard from the people it is not the right way of doing this, when i googled this, found through channelfactory we can call the service .
But the problem is it is saying the contract dlls should get shared between client and server, this i am not getting.
can any body provide the sample to call the service with out adding service reference. http://www.codeproject.com/Tips/558163/Difference-between-Proxy-and-Channel-Factory-in-WC
and what are the issues if we add service reference in the project and what are the pitfalls?
I am sure that i have to call SOAP service only
Thanks
You can use HttpWebRequest to create a web request and then pass the XML document describing whole SOAP request and get the response. Something like below code I used in one of my application. I have removed few bits from it that are specific to my application but you will get the idea.