I get an PHP error eveyrtime I try to access to an object property from SOAP WSDL.
I guess it's supposed to return an associativeArray type, but I've tried to do a print_r and the stdClass is still there.
This is the WSDL structure for the product object:
<complexType name="catalogProductReturnEntity">
<all>
<element name="product_id" type="xsd:string" minOccurs="0"/>
<element name="sku" type="xsd:string" minOccurs="0"/>
<element name="set" type="xsd:string" minOccurs="0"/>
<element name="type" type="xsd:string" minOccurs="0"/>
<element name="categories" type="typens:ArrayOfString" minOccurs="0"/>
<element name="websites" type="typens:ArrayOfString" minOccurs="0"/>
<element name="created_at" type="xsd:string" minOccurs="0"/>
<element name="updated_at" type="xsd:string" minOccurs="0"/>
<element name="type_id" type="xsd:string" minOccurs="0"/>
<element name="name" type="xsd:string" minOccurs="0"/>
<element name="description" type="xsd:string" minOccurs="0"/>
<element name="short_description" type="xsd:string" minOccurs="0"/>
<element name="weight" type="xsd:string" minOccurs="0"/>
<element name="status" type="xsd:string" minOccurs="0"/>
<element name="url_key" type="xsd:string" minOccurs="0"/>
<element name="url_path" type="xsd:string" minOccurs="0"/>
<element name="visibility" type="xsd:string" minOccurs="0"/>
<element name="category_ids" type="typens:ArrayOfString" minOccurs="0"/>
<element name="website_ids" type="typens:ArrayOfString" minOccurs="0"/>
<element name="has_options" type="xsd:string" minOccurs="0"/>
<element name="gift_message_available" type="xsd:string" minOccurs="0"/>
<element name="price" type="xsd:string" minOccurs="0"/>
<element name="special_price" type="xsd:string" minOccurs="0"/>
<element name="special_from_date" type="xsd:string" minOccurs="0"/>
<element name="special_to_date" type="xsd:string" minOccurs="0"/>
<element name="tax_class_id" type="xsd:string" minOccurs="0"/>
<element name="tier_price" type="typens:catalogProductTierPriceEntityArray" minOccurs="0"/>
<element name="meta_title" type="xsd:string" minOccurs="0"/>
<element name="meta_keyword" type="xsd:string" minOccurs="0"/>
<element name="meta_description" type="xsd:string" minOccurs="0"/>
<element name="custom_design" type="xsd:string" minOccurs="0"/>
<element name="custom_layout_update" type="xsd:string" minOccurs="0"/>
<element name="options_container" type="xsd:string" minOccurs="0"/>
<element name="additional_attributes" type="typens:associativeArray" minOccurs="0"/>
</all>
</complexType>
and this is the code I'm trying:
$product = $proxy->catalogProductInfo($sessionId, 38882);
print_r($product->additional_attributes);
All the properties except the additional_attributes
(which is the one that returns the stdClass) one work perfectly.
The server returns the following when I try to access additional_attributes:
Notice: Undefined property: stdClass::$additional_attributes in /Applications/XAMPP/xamppfiles/htdocs/php_test/test.php on line 23