示例#1
0
文件: Program.cs 项目: rebider/soa
        public static void Main(string[] args)
        {
            EndpointAddress  address = new EndpointAddress("http://localhost/ProviderService/Wcf/WCF_DEMO.svc");
            BasicHttpBinding binding = new BasicHttpBinding();

            ChannelFactory <IDemo> factory = new ChannelFactory <IDemo>(binding, address);

            IDemo channel = factory.CreateChannel();

            string result = channel.Echo("Tony");

            Console.WriteLine(result);
            Console.ReadLine();
        }