Q:

Additional attributes not working

I am trying to add the following 2 additional attributes through API. I am not getting any error, however it is not getting uploaded. It would be great if some one could give me a suggestion.
catalogProductAdditionalAttributesEntity AdAtrributeEntity = new catalogProductAdditionalAttributesEntity();

associativeEntity[] AdditionalAttributes = new associativeEntity[2];
associativeEntity AdditionalAttributeOne = new associativeEntity();
associativeEntity AdditionalAttributeTwo = new associativeEntity();

AdditionalAttributeOne.key = "color";
AdditionalAttributeOne.value = "green";
AdditionalAttributeTwo.key = "size";
AdditionalAttributeTwo.value = "xl";

AdditionalAttributes[0] = AdditionalAttributeOne;
AdditionalAttributes[1] = AdditionalAttributeTwo;

AdAtrributeEntity.single_data = AdditionalAttributes;
ProductEntity.additional_attributes = AdAtrributeEntity;

MyService.catalogProductUpdate(Mylogin, SKU, ProductEntity, null, null)

A:

I know this is older, but I found a solution.  'single_data' and 'multi_data' need to have an array inside it that has the arrays of attributes.
product_data = {
          'name' => self.get_attribute_value('name'),
          'description' => self.get_attribute_value('description'),
          'short_description' => self.get_attribute_value('short_description'),
          'weight' => self.get_attribute_value('weight'),
          'status' => self.get_attribute_value('status'),
          'categories' => compose_categories,
          'url_key' => self.get_attribute_value('url_key'),
          'price' => self.get_attribute_value('price'),
          'additional_attributes' => { 'single_data' => { items: compose_attribute_values }}
}

In the example, I named the additional array 'item', hoever, you can call it whatever you want.  I used 'item' because the API returns many values like that.  The additional attributes look something like this in PHP:
...
'additional_attributes' = array(
    'single_data' => array(
        'item' => array(
            [0] => array(
                'key' => 'some_attribute_code',
                'value' => 'some_attribute_value'
            )
            [1] => array(
                'key' => 'some_other_attribute_code',
                'value' => 'some_other_attribute_value'
            )
        )
    )
)
...

