Answered by:
How to consume an external wcf service

Question
-
User-1868455780 posted
Hi ,
How to consume an external WCF service without adding service reference?
TIA
Vivek
Wednesday, July 19, 2017 12:33 PM
Answers
-
User-1509636757 posted
How to consume an external WCF service without adding service reference?
Open Visual Studio Developer Command Prompt and write command:
svcutil.exe http://www.testxxx.com/XX/Service1.svc?wsdl
This will generate proxy class and you can add it to your project and use it to connect and call service methods.
Reference: How to: Create a Windows Communication Foundation Client | Microsoft Docs
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, July 19, 2017 12:42 PM
All replies
-
User-1509636757 posted
How to consume an external WCF service without adding service reference?
Open Visual Studio Developer Command Prompt and write command:
svcutil.exe http://www.testxxx.com/XX/Service1.svc?wsdl
This will generate proxy class and you can add it to your project and use it to connect and call service methods.
Reference: How to: Create a Windows Communication Foundation Client | Microsoft Docs
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, July 19, 2017 12:42 PM -
User2103319870 posted
Alternatively you could create the Endpoint and reference using ChannelFactory.
You can take a look in to this article for more details : http://www.c-sharpcorner.com/article/how-to-use-a-wcf-service-without-adding-service-reference/
Wednesday, July 19, 2017 12:55 PM -
User-1868455780 posted
Thank you kaushal. its worked!
Wednesday, July 19, 2017 1:26 PM -
User1404573039 posted
Hi vivektkk,
I am glad your issue has been resolved, and I would suggest you mark the suggestion from kaushal as answer to close this thread, and then other who run into the same issue would find the solution easily.
Regards,
Tony
Thursday, July 20, 2017 5:34 AM