Search code examples
magentomagento-soap-api

Magento & soap2: how to get custom attribute using catalogCategoryInfo function?


Function catalogCategoryInfo returns fixed size count of attribute. Not all attributes are seeing. How to get custom category attribute?

I added to wsdl.xml (catalog):

<complexType name="catalogCategoryInfo">
    <all>
         <element name="new_attribue" type="xsd:int" minOccurs="0" />                      
    </all>
</complexType>

and for wsi.xml (catalog):

 <xsd:complexType name="catalogCategoryInfo">
      <xsd:sequence>
         <xsd:element name="new_attribue" type="xsd:int" minOccurs="0" />
      </xsd:sequence>
 </xsd:complexType>

But it doesn't help.


Solution

  • Yep! I've got it.

    The problem was in soap cache. The function _instantiateServer in Mage_Api_Model_Server_Adapter_Soap class has ini_set('soap.wsdl_cache_enabled', '0') option which didn't work.

    The cache option of soap in php.ini has been turned on. I just turned it off.

    soap.wsdl_cache_enabled=0
    

    Now it works perfect!