public TesterForm() { // // Required for Windows Form Designer support // InitializeComponent(); wsp = new DynamicWebServiceProxy(); methods = new ArrayList(); }
public WebServiceEnumerator(string wsdl) { _WSDL = wsdl; _DynamicProxy = new DynamicWebServiceProxy(WSDL); _Services = new WebServiceCollection(WSDL); }
/// <summary> /// /// </summary> /// <param name="values"></param> public void CallMethod(object[] values) { // Initialize the call DynamicWebServiceProxy wsp = new DynamicWebServiceProxy(); wsp.EnableMessageAccess = true; wsp.Wsdl = _theMethod.Parent.Parent.WSDL; wsp.TypeName = _theMethod.Parent.Name; wsp.MethodName = _theMethod.Name; wsp.Url = new Uri(_theMethod.Parent.Parent.EndPoint); foreach (object o in values) { wsp.AddParameter(o); } // Make the call try { object result = wsp.InvokeCall(); _listener.HandleCall(_theMethod, values, wsp.SoapRequest, wsp.SoapResponse, null); } catch(Exception ex) { // System.Console.WriteLine("Exception while invoking call: {0}", ex.Message); _listener.HandleCall(_theMethod, values, wsp.SoapRequest, wsp.SoapResponse, ex.InnerException); } }