namespace Dude {// Allow easy reference System namespace classes using System; using System.Xml.Serialization; using System.Web.Services.Protocols; using System.Web.Services; // This "class" exists only to house entry-point class MainApp2 : SoapClientProtocol { public MainApp2() { Console.WriteLine("in constructor"); this.Url = "http://janesh:7001/soap/servlet/rpcrouter"; } [System.Web.Services.Protocols.SoapMethodAttribute(RequestNamespace="swifta" , ResponseElementName="soapReadResult")] public void soapRead(String queue) { String[] s= { "err","wer" }; Console.WriteLine("begin soapRead"); try { this.Url = "http://janesh:7001/soap/servlet/rpcrouter"; object[] result = this.Invoke("engine.concat()" , s ); Console.WriteLine("in soapSend" + result[0]); } catch(Exception ex) { Console.WriteLine(ex.ToString()); Console.WriteLine("caught exception" + this.Url); } } } class MainApp { // Static method "Main" is application's entry point public static void Main() { // Write text to the console Console.WriteLine("Hello World using C#!"); // (new MainApp2()).soapSend(); MainApp2 app2 = new MainApp2(); app2.soapRead("testqueue@router1"); Console.WriteLine("after method call"); } } }