public string GetMap(string domainKey, bool useCompression) 
		{
			Hashtable parameters = new Hashtable() ;
			if (this.Context != null)
			{
				WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "GetMap", domainKey, useCompression, parameters);
				this.Context.EventManager.OnCallingWebService(this, e);
				if (e.Cancel)
				{
					this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
					return "";
				}
				domainKey = e.DomainKey;
				useCompression = e.UseCompression;				
			}
 
			object[] results = this.Invoke("GetMap", new object[] {
																	  domainKey,
																	  useCompression});

			if (this.Context != null)
			{
				parameters["result"] = results[0];

				WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "GetMap", domainKey, useCompression, parameters);

				this.Context.EventManager.OnCalledWebService(this, e2);

				results[0] = parameters["result"];			
			}

			return ((string)(results[0]));
		}
Esempio n. 2
0
 private void HandleCallingWebService(object sender, WebServiceCancelEventArgs e)
 {
     webServiceLogTextBox.Text = "Calling Web Service: " + e.Method + " (" + e.Url + ") \r\n" + webServiceLogTextBox.Text;
     Application.DoEvents() ;
 }
Esempio n. 3
0
 public void OnCallingWebService(object sender, WebServiceCancelEventArgs e)
 {
 }
		public string LoadProperty(string obj, string propertyName, string domainKey, bool useCompression) 
		{

			
			Hashtable parameters = new Hashtable() ;
			parameters["obj"] = obj;
			parameters["propertyName"] = propertyName;
			WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "LoadProperty", domainKey, useCompression, parameters);
			this.Context.EventManager.OnCallingWebService(this, e);
			if (e.Cancel)
			{
				this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
				return "";
			}
			domainKey = e.DomainKey;
			useCompression = e.UseCompression;
			obj = (string) parameters["obj"];
			propertyName = (string) parameters["propertyName"];

			object[] results = this.Invoke("LoadProperty", new object[] {
																			obj,
																			propertyName,
																			domainKey,
																			useCompression});

			parameters["result"] = results[0];

			WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "LoadProperty", domainKey, useCompression, parameters);

			this.Context.EventManager.OnCalledWebService(this, e2);

			results[0] = parameters["result"];

			return ((string)(results[0]));
		}
		public string LoadObject(string type, string identity, string domainKey, bool useCompression) 
		{
			Hashtable parameters = new Hashtable() ;
			parameters["type"] = type;
			parameters["identity"] = identity;
			WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "LoadObject", domainKey, useCompression, parameters);
			this.Context.EventManager.OnCallingWebService(this, e);
			if (e.Cancel)
			{
				this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
				return "";
			}
			domainKey = e.DomainKey;
			useCompression = e.UseCompression;
			type = (string) parameters["type"];
			identity = (string) parameters["identity"];

			object[] results = this.Invoke("LoadObject", new object[] {
																		  type,
																		  identity,
																		  domainKey,
																		  useCompression});

			parameters["result"] = results[0];

			WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "LoadObject", domainKey, useCompression, parameters);

			this.Context.EventManager.OnCalledWebService(this, e2);

			results[0] = parameters["result"];

			return ((string)(results[0]));
		}
Esempio n. 6
0
		public virtual void OnCallingWebService(object sender, WebServiceCancelEventArgs e)
		{
			if (!(m_RaiseEvents))
			{
				return;
			}
			if (!(m_RaiseBeforeEvents))
			{
				return;
			}
			if (!(m_RaiseWebServiceEvents))
			{
				return;
			}
			foreach (IObserver observer in m_Observers)
			{
				observer.OnCallingWebService(sender, e);
			}
			foreach (IObserver observer in m_ContextObservers)
			{
				observer.OnCallingWebService(sender, e);
			}
			this.Observer.OnCallingWebService(sender, e);
		}