Exemple #1
0
    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"));
    }
Exemple #2
0
	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"));
	}