コード例 #1
0
        protected virtual void SendRequest()
        {
            //throw new NotImplementedException("Override SendRequest and implement");
            WSHttpBinding binding = new WSHttpBinding();

            binding.SendTimeout    = new TimeSpan(1, 0, 0);
            binding.ReceiveTimeout = new TimeSpan(1, 0, 0);
            EndpointAddress address = new EndpointAddress("http://localhost:3344/ProxyServer.svc");
            ChannelFactory <IProxyServer> channelFactory = new ChannelFactory <IProxyServer>(binding, address);
            IProxyServer service = channelFactory.CreateChannel();

            _result = service.ProcessRequest(_request);
            EndRequest(null);
        }