Simple Indigo Client (Code-based)

Further to my earlier entry, here is the code equivalent for the client. This one uses no config whatsoever;
 
using System;
using System.ServiceModel;
 
namespace Gudge.Samples.SimpleCode
{
  [ServiceContract]
  interfaceISimple
  {
    [OperationContract]
    string Ping(string text);
  }
 
  interfaceISimpleChannel : ISimple, IProxyChannel { }
 
  classClient
  {
    staticvoid Main(string[] args)
    {
      BasicProfileBinding b = newBasicProfileBinding();
      Uri u = newUri ( "http://localhost:8080/simple" );
      ChannelFactory<ISimpleChannel> cf = newChannelFactory<ISimpleChannel>(u, b);
      ISimpleChannel sc = cf.CreateChannel();
      Console.WriteLine("{0}", sc.Ping("Hello, World!"));
    }
  }
}

Posted May 11 2005, 06:59 PM by martin-gudgin

Comments

Musings from Gudge wrote Simple Indigo Server (Code-based)
on 05-11-2005 9:00 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?