Last post Sep 03, 2013 07:24 AM by noobville
Aug 30, 2013 12:23 PM|noobville|LINK
Sep 02, 2013 06:30 AM|Amy Peng - MSFT|LINK
Using Add Service Reference is the easiest way to call a service when you are working with Visual Studio. If you still want to generate a proxy you can use the command-line tool svcutil.
Otherwise you will have to work directly with the channel.
The following is an example about using channel without using the add service reference, please try to refer to:
BasicHttpBinding basicHttpBinding = new BasicHttpBinding();
EndpointAddress endpointAddress = new EndpointAddress("http://localhost:1031/Service/Myservice.svc");
IPersonService personService = new ChannelFactory<IPersonService>(basicHttpBinding, endpointAddress).CreateChannel();
If you know the wsdl file, then please try to refer to the following:
#How to create service proxy from wsdl file:
Sep 03, 2013 07:24 AM|noobville|LINK
I will be given the wsdl at runtime. I have a public property that will be set by another application. The 2nd solution you presented seems a bit vague on how it could work for me. Do you know of a better example?