I'm using SOAP API v2 for Magento. I have a problem with product creation.
All fields are correctly set, but custom attributes that I've defined. These fields remains empty when I show it in panel. This is my code:
var mservice = new Mage_Api_Model_Server_Wsi_HandlerPortTypeClient();
string mlogin = mservice.login("me", "*************");
catalogProductCreateEntity newProduct = new catalogProductCreateEntity();
newProduct.name = "Title here";
newProduct.description = "Blabla bla bla";
newProduct.short_description = "blalblalbla";
newProduct.weight = "0";
newProduct.status = "1";
newProduct.price = "13.50";
newProduct.tax_class_id = "2";
associativeEntity[] AdditionalAttributes = new associativeEntity[1];
associativeEntity AdditionalAttribute = new associativeEntity();
AdditionalAttribute.key = "ean13";
AdditionalAttribute.value = "978883226238";
AdditionalAttributes[0] = AdditionalAttribute;
newProduct.additional_attributes = AdditionalAttributes;
try
{
mservice.catalogProductCreate(mlogin, "simple", "4", "93bffellag44fh1ll24-x", newProduct, null);
}
catch (Exception merror)
{
Console.WriteLine("Errore soap magento: " + merror.Message);
Console.Read();
}