/// <summary>
		/// use stub to create a customer via web services
		/// </summary>
		/// <param name="customers">Array of TCreate_Input</param>
		/// <returns>ArrayList of TCreate_Return</returns>
		public ArrayList create(TCreate_Input[] customers) 
		{
			TCreate_Return[] customers_out = stub.create(customers);

			ArrayList result = new ArrayList();

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

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

			return result;
		}
Example #2
0
 /// <remarks/>
 public System.IAsyncResult Begincreate(TCreate_Input[] Customers, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("create", new object[] {
                 Customers}, callback, asyncState);
 }
Example #3
0
 public TCreate_Return[] create(TCreate_Input[] Customers) {
     object[] results = this.Invoke("create", new object[] {
                 Customers});
     return ((TCreate_Return[])(results[0]));
 }
Example #4
0
		/// <summary>
		/// test creation of a customer and check if method returns a true value
		/// </summary>
		public void create()
		{
			TCreate_Input[] customers = new TCreate_Input[]{customer_in};

			ArrayList customers_out = serviceClient.create(customers);

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

			TCreate_Return customer_out = (TCreate_Return)customers_out.ToArray()[0];
			Assert.AreEqual(alias, customer_out.Alias, "customer alias");
			Assert.AreEqual(true, customer_out.created, "created?");
		}