public static void Main() { var ch = new WebChannelFactory <IHogeClient> ( //new CustomBinding (new WebMessageEncodingBindingElement (), new HttpTransportBindingElement () { ManualAddressing = true }), new WebHttpBinding(), new Uri("http://localhost:8080")) .CreateChannel(); //new OperationContextScope ((IContextChannel) ch); //WebOperationContext.Current.OutgoingRequest.Method = "GET"; //OperationContext.Current.OutgoingMessageHeaders.To = // new Uri ("http://localhost:8080/Join?s1=foo"); Console.WriteLine(ch.Echo("really?")); Console.WriteLine(ch.Join("foo", "bar")); }
public static void Main () { var ch = new WebChannelFactory<IHogeClient> ( //new CustomBinding (new WebMessageEncodingBindingElement (), new HttpTransportBindingElement () { ManualAddressing = true }), new WebHttpBinding (), new Uri ("http://localhost:8080")) .CreateChannel (); //new OperationContextScope ((IContextChannel) ch); //WebOperationContext.Current.OutgoingRequest.Method = "GET"; //OperationContext.Current.OutgoingMessageHeaders.To = // new Uri ("http://localhost:8080/Join?s1=foo"); Console.WriteLine (ch.Echo ("really?")); Console.WriteLine (ch.Join ("foo", "bar")); }