I am trying to create product attributes by SOAPV2 with method catalogProductAttributeCreate / Magento Community ver. 1.7.0.2
I have already debugged /core/Mage/Catalog/Model/Product/Attribute/Api.php` where this API call, string attribute_code & array frontend_label are fields that may not be empty.
Magento returns fault code 104 (Incorrect attribute type) with this XML:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<catalogProductAttributeCreate xmlns="urn:Magento">
<sessionId xsi:type="xsd:string">a30c8633e591dad15a3eb67d8912f7c3</sessionId>
<data xsi:type="ns1:catalogProductAttributeEntityToCreate">
<attribute_code xsi:type="xsd:string">testattribute</attribute_code>
<scope xsi:type="xsd:string">store</scope>
<default_value xsi:type="xsd:string"/>
<frontend_label xsi:type="ns1:catalogProductAttributeFrontendLabelEntity">
<store_id xsi:type="enc:string">0</store_id>
<label xsi:type="enc:string">Test label</label>
</frontend_label>
</data>
</catalogProductAttributeCreate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Why does Magento returns fault code 104? How can I created a attribute by SOAPV2 XML?
UPDATE
Still one question left for method catalogProductAttributeUpdate similar to catalogProductAttributeCreate
The product attribute label is updating with value "0", I expect "testlabel".
What is the correct XML / SOAPV2 ?