I am trying to call catalogProductAttributeAddOption with V2 of Magento's API with compliance mode enabled but am getting:
call to undefined method stdClass::catalogProductAttributeAddOption()
My immediate observation was that this method is not present as soon as compliance mode is switched on. Therefore, I added (what I think are) the correct nodes to a wsi.xml file within a custom module:
<xsd:element name="catalogProductAttributeAddOptionRequestParam"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string"/> <xsd:element minOccurs="1" maxOccurs="1" name="attribute" type="xsd:string"/> <xsd:element minOccurs="0" maxOccurs="1" name="data" type="typens:catalogProductAttributeOptionEntityToAdd"/> </xsd:sequence> </xsd:complexType> </xsd:element>
This ensures that the method is displayed within the WSDL and matches the same pattern as other existing methods.
Now I am just trying to figure out where this method actually needs to be defined. Am I right in thinking there should be a Api2.php file within Catalog/Model where this should happen?
Is this method already defined somewhere to work without compliance mode which could be modified? I have searched globally and can't find a thing