I have two WCF service(WCF1 and WCF2). WCF2 generates does some function. WCF1 has to call WCF2 on basis of some condition. I added the WCF2 service reference in WCF1.
Created object for the WCF2 and called the method,
WCF2.WCF2Client etObj = new WCF2Client();
etObj.EmployeeInterfaced();
On build i get the error WCF2
The type name 'WCF2' does not exist in the type 'WCF1.IWCF1'
Call WCF from WCF
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Prashant KoliRank #7,688 · 236 reputationPosted May 12, 2015, 2:54 AM EDT
For example, the proxy class name is WCF2Client.cs and the namespace is MyCompany.MyService, then
try creating the instance as below:
MyCompany.MyService.WCF2Client objProxy = new MyCompany.MyService.WCF2Client()
Then call methods like objProxy.Method() etc.It should work.
Gowthami Perumal6 reputationPosted May 21, 2015, 11:39 PM EDT
rajat kumar56 reputationPosted May 24, 2015, 8:34 PM EDT