question

hybridplane avatar image
0 Likes"
hybridplane asked

Why is my question still not visible ?

TITLE: C# - Error adding multiple KType items to ItemCompatibilityList I'd like to manually specify parts compatibility using the Ktype vehicle specification number and Ebay motors Germany. The Ebay Features Guide says it possible to add multiple KType numbers but the Ebay production server disagrees. Ebay Features Guide says: [link text][1] List your part with an ItemCompatibilityList, consisting of name-value pairs for each K type vehicle number that applies. KType 27959 bla bla bla It's possible to add 1 Ktype field but the Ebay Production Server returns the following error if I try to add multiple KType numbers: "You can't use multiple values for one and the same name field: KType:15666|KType:15667". Here's my code: string_array_KType = Convert.ToString(MainWindow.get.hashtable_EAN_to_KType[string_EAN]).Split(','); eBay.Service.Core.Soap.ItemCompatibilityType[] item_compatibility_type_array = new eBay.Service.Core.Soap.ItemCompatibilityType[string_array_KType.Length]; eBay.Service.Core.Soap.NameValueListType[] name_value_list_type_array = new eBay.Service.Core.Soap.NameValueListType[string_array_KType.Length]; StringCollection[] string_collection_KType_array = new StringCollection[string_array_KType.Length]; item.ItemCompatibilityList = new eBay.Service.Core.Soap.ItemCompatibilityListType(); item.ItemCompatibilityList.Compatibility = new ItemCompatibilityTypeCollection(); eBay.Service.Core.Soap.NameValueListTypeCollection name_value_list_type_collection = new NameValueListTypeCollection(); eBay.Service.Core.Soap.ItemCompatibilityTypeCollection item_compatibility_type_collection = new eBay.Service.Core.Soap.ItemCompatibilityTypeCollection(); eBay.Service.Core.Soap.ItemCompatibilityListType item_compatibility_list_type = new eBay.Service.Core.Soap.ItemCompatibilityListType(); item_compatibility_list_type.Compatibility = new ItemCompatibilityTypeCollection(); for (int i = 0; i < string_array_KType.Length; i++) { name_value_list_type_array[i] = new eBay.Service.Core.Soap.NameValueListType(); string_collection_KType_array[i] = new StringCollection(); name_value_list_type_array[i].Name = "KType"; string_collection_KType_array[i].Add(string_array_KType[i]); name_value_list_type_array[i].Value = string_collection_KType_array[i]; name_value_list_type_collection.Add(name_value_list_type_array[i]); item_compatibility_type_array[i] = new eBay.Service.Core.Soap.ItemCompatibilityType(); item_compatibility_type_array[i].NameValueList = new NameValueListTypeCollection(); item_compatibility_type_array[i].NameValueList = name_value_list_type_collection; item_compatibility_type_array[i].CompatibilityNotes = ""; item_compatibility_list_type.Compatibility.Add(item_compatibility_type_array[i]); } item.ItemCompatibilityList.Compatibility = item_compatibility_list_type.Compatibility;
compatibilityktypecompatibilitynotesnamevaluelisttypecollectionitemcompatibilitylisttypenamevaluelisttype
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.