Ejemplo n.º 1
0
		/// <summary>
		/// use stub to create a customer via web services
		/// </summary>
		/// <param name="customers">Array of TUpdate_Input</param>
		/// <returns>ArrayList of TUpdate_Return</returns>
		public ArrayList update(TUpdate_Input[] customers) 
		{
			TUpdate_Return[] customers_out = stub.update(customers);

			ArrayList result = new ArrayList();

			for(int i = 0; i < customers_out.Length; i++)
			{
				TUpdate_Return customer_out = customers_out[i];

				if (customer_out.Error == null) 
				{
					Console.WriteLine("successfully updated customer: " + customer_out.Path);
					result.Add(customer_out);
				} 
				else 
				{
					Console.WriteLine("an error occured (Epages Error):\n" + customer_out.Error.Message);
				}
			}

			return result;
		}
Ejemplo n.º 2
0
 /// <remarks/>
 public System.IAsyncResult Beginupdate(TUpdate_Input[] Customers, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("update", new object[] {
                 Customers}, callback, asyncState);
 }
Ejemplo n.º 3
0
 public TUpdate_Return[] update(TUpdate_Input[] Customers) {
     object[] results = this.Invoke("update", new object[] {
                 Customers});
     return ((TUpdate_Return[])(results[0]));
 }
Ejemplo n.º 4
0
		/// <summary>
		/// test update of a customer and check if method returns a true value
		/// </summary>
		public void update()
		{
			TUpdate_Input[] customers = new TUpdate_Input[]{customer_update};

			ArrayList customers_out = serviceClient.update(customers);

			// test if update was successful
			Assert.AreEqual(1, customers_out.Count, "update result set");

			TUpdate_Return customer_out = (TUpdate_Return)customers_out.ToArray()[0];
			Assert.AreEqual(path + alias, customer_out.Path, "customer path");
			Assert.AreEqual(true, customer_out.updated, "updated?");
		}