php_fan Posted April 12, 2009 Share Posted April 12, 2009 Hi, I am trying to consume a SOAP response using the PHP-SOAP extension - I have got everything to work except the actual element values returned - below is an excerpt from the xml returned: <datasheet> <attributeGroup t="1" n="General Information" id="35"> <attribute n="Manufacturer">Brother Industries, Ltd</attribute> <attribute n="Manufacturer Part Number">MFC-9440CN</attribute> <attribute n="Manufacturer Website Address">www.brother-usa.com</attribute> <attribute n="Brand Name">Brother</attribute> <attribute n="Product Line">Multi-Function Center</attribute> <attribute n="Product Model">MFC-9440CN</attribute> and this is how manage to get the attribute values: $result = $client->__soapCall("GetProduct",$params); foreach($result->datasheet->attributeGroup[0]->attribute as $attr){ echo "<b>".$attr->n."</b>"."<br/>"; However, the element values such as Brother Industries, Ltd, MFC-9440CN, etc. are being returned as stdClass objects and I have no idea how to get the information - I have tried echo $attr but get an error stating that the stdClass object cannot be referenced as a string Any Help in this regard will be appreciated Thanks Quote Link to comment https://forums.phpfreaks.com/topic/153709-php-soap/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.