Tuesday, October 26, 2010

The 5 second guide to adding WCF Client code

In case you ever have to blag some WCF client code ever...

1. Right click on your project
2. Choose "Add Service Reference"
3. In the dialog, enter the service URL wait for the "discovery" to happen, then change the namespace name and hit OK
4. In the client code just call the service - like
                var client = new MyNameSpace.MyServiceClient();
                int result = client.Method(param1, param2, param3);

Simples ;)

No comments:

Post a Comment