/// <summary>
		/// use stub to assignment a Product to a Catalog via web services
		/// </summary>
		/// <param name="Assignments">Array of TAssignProductToCatalog_Input</param>
		/// <returns>ArrayList of TAssignProductToCatalog_Return</returns>
		public ArrayList assignProductToCatalog(TAssignProductToCatalog_Input[] Assignments) 
		{
			TAssignProductToCatalog_Return[] Assignments_out = stub.assignProductToCatalog(Assignments);

			ArrayList result = new ArrayList();

			for(int i = 0; i < Assignments_out.Length; i++)
			{
				TAssignProductToCatalog_Return Assignment_out = Assignments_out[i];

				if (Assignment_out.Error == null) 
				{
					Console.WriteLine("successfully assigned: " + Assignment_out.Catalog + "/" + Assignment_out.Product);
					result.Add(Assignment_out);
				} 
				else 
				{
					Console.WriteLine("an error occured (Epages Error):\n" + Assignment_out.Error.Message);
				}
			}

			return result;
		}
Ejemplo n.º 2
0
 /// <remarks/>
 public System.IAsyncResult BeginassignProductToCatalog(TAssignProductToCatalog_Input[] Assignments, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("assignProductToCatalog", new object[] {
                 Assignments}, callback, asyncState);
 }
Ejemplo n.º 3
0
		/// <summary>
		/// assign a Product to a Catalog
		/// </summary>
		public void assignProductToCatalog()
		{
			TAssignProductToCatalog_Input Assignment_in = new TAssignProductToCatalog_Input();
			Assignment_in.Catalog = catalog;
			Assignment_in.Product = product;

			TAssignProductToCatalog_Input[] Assignments = new TAssignProductToCatalog_Input[]{Assignment_in};

			ArrayList Assignments_out = serviceClient.assignProductToCatalog(Assignments);

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

			TAssignProductToCatalog_Return Assignment_out = (TAssignProductToCatalog_Return)Assignments_out.ToArray()[0];
			Assert.AreEqual(product, Assignment_out.Product, "Product path");
			Assert.AreEqual(true, Assignment_out.assigned, "assigned?");
		}
Ejemplo n.º 4
0
 public TAssignProductToCatalog_Return[] assignProductToCatalog(TAssignProductToCatalog_Input[] Assignments) {
     object[] results = this.Invoke("assignProductToCatalog", new object[] {
                 Assignments});
     return ((TAssignProductToCatalog_Return[])(results[0]));
 }