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

			ArrayList result = new ArrayList();

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

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

			return result;
		}
Exemplo n.º 2
0
		/// <summary>
		/// test creation of a Product and check if method returns a true value
		/// </summary>
		public void create()
		{
			TCreate_Input[] Products = new TCreate_Input[]{Product_in};

			ArrayList Products_out = serviceClient.create(Products);

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

			TCreate_Return Product_out = (TCreate_Return)Products_out.ToArray()[0];
			Assert.AreEqual(alias, Product_out.Alias, "product alias");
			Assert.AreEqual(true, Product_out.created, "created?");
		}
Exemplo n.º 3
0
 /// <remarks/>
 public System.IAsyncResult Begincreate(TCreate_Input[] Products, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("create", new object[] {
                 Products}, callback, asyncState);
 }
Exemplo n.º 4
0
 public TCreate_Return[] create(TCreate_Input[] Products) {
     object[] results = this.Invoke("create", new object[] {
                 Products});
     return ((TCreate_Return[])(results[0]));
 }