|
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
|
|
|
|
|