Jump to content

PHP Soap


php_fan

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/153709-php-soap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.