// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Net; public class TestTest { public static void Main(string[] args) { ServicePointManager.Expect100Continue = false; // to avoid .NET - Tomcat 5 bug TestService tst = new TestService(); CredentialCache auth = new CredentialCache(); NetworkCredential basic = new NetworkCredential("wsuser1", "hemmeligt"); auth.Add(new Uri(tst.Url), "Basic", basic); tst.Credentials = auth; tst.CookieContainer = new CookieContainer(); Console.WriteLine(tst.getUser()); int n = (int)(DateTime.Now.Ticks % 10000000); Console.WriteLine(n); tst.setV(n); for(int i = 0; i < 10; i++) { Console.WriteLine(tst.getV()); } } }