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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.