PDA

Click to See Complete Forum and Search --> : WCF Custome Proxy


Ajx123
Feb 11th, 2010, 12:27 AM
Hi Friends
How to Invoke WCF Methods through Cutome Proxy class.
(In My Project I had developed Web services and I had used svcutil.exe to generate Proxy class So that I can Access methods without setting Web reference from vs 2008, Now I want to replace these web services with WCF Methods and I want to invoke these WCF Methods Conditionally) so Please Provide help for the same
thanks in advance
- @jay S

chris128
Feb 11th, 2010, 09:06 AM
you can still use svcutil.exe (or Add Service Reference in Visual Studio) to generate proxy classes for WCF services in the same way

mendhak
Feb 17th, 2010, 05:14 PM
OK first, that's a false assumption. By creating a proxy class, you're effectively creating a web reference. A web reference, when added in Visual Studio, uses svcutil/wsdl.exe for you behind the scenes.

The web methods are available for you to use. All you have to do is instantiate the class and use the methods available.

MyProxyClass client = new MyProxyClass("MYBasicHttpEndpoint", "http://machinename/service1.svc");
client.SayHelloWorld();