Ejemplo n.º 1
0
		/// <summary>
		/// use stub to create a Order via web services
		/// </summary>
		/// <param name="Orders">Array of TCreate_Input</param>
		/// <returns>ArrayList of TCreate_Return</returns>
		public ArrayList create(TCreate_Input[] Orders) 
		{
			TCreate_Return[] Orders_out = stub.create(Orders);

			ArrayList result = new ArrayList();

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

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

			return result;
		}
Ejemplo n.º 2
0
 /// <remarks/>
 public System.IAsyncResult Begincreate(TCreate_Input[] Orders, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("create", new object[] {
                 Orders}, callback, asyncState);
 }
Ejemplo n.º 3
0
		/// <summary>
		/// test creation of a Order and check if method returns a true value
		/// </summary>
		public void create()
		{
			TCreate_Input[] Orders = new TCreate_Input[]{Order_in};

			ArrayList Orders_out = serviceClient.create(Orders);

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

			TCreate_Return Order_out = (TCreate_Return)Orders_out.ToArray()[0];
			Assert.AreEqual(alias, Order_out.Alias, "Order alias");
			Assert.AreEqual(true, Order_out.created, "created?");
		}
Ejemplo n.º 4
0
 public TCreate_Return[] create(TCreate_Input[] Orders) {
     object[] results = this.Invoke("create", new object[] {
                 Orders});
     return ((TCreate_Return[])(results[0]));
 }