title: PHP Parsing object(stdClass) Response
body: <p>I'm working with a wsdl file, and learning quite a lot from the whole process.</p>
  
  <p>I'm instantiating the SoapClient:</p>
  
  <pre><code>$webservice = new SoapClient("mainwsdl.wsdl");
  var_dump($webservice-&gt;AccountsGetXML()); 
  </code></pre>
  
  <p>Below is the response, and I'm still a little new with parsing data.</p>
  
  <pre><code>object(stdClass)#2 (3) {
    ["AccountsGetXMLResult"]=&gt;
    object(stdClass)#3 (1) {
      ["any"]=&gt;
      string(391) "&lt;AccountsWSDS xmlns=""&gt;&lt;ERRORS&gt;&lt;ERROR_ID&gt;1&lt;/ERROR_ID&gt;&lt;TABLE_NAME&gt;Accounts&lt;/TABLE_NAME&gt;&lt;TABLE_ID&gt;NoID&lt;/TABLE_ID&gt;&lt;ROW_ID&gt;-1&lt;/ROW_ID&gt;&lt;COLUMN_ID&gt;EXCEPTION&lt;/COLUMN_ID&gt;&lt;ERROR_TYPE&gt;E&lt;/ERROR_TYPE&gt;&lt;ERROR_CODE&gt;0&lt;/ERROR_CODE&gt;&lt;ERROR_TEXT&gt;Error connecting to database - please contact ABC Customer Services.  Msg: Object reference not set to an instance of an object.&lt;/ERROR_TEXT&gt;&lt;/ERRORS&gt;&lt;/AccountsWSDS&gt;"
    }
    ["rowCount"]=&gt;
    NULL
    ["pageCount"]=&gt;
    NULL
  }
  </code></pre>
  
  <p>I haven't played with object(stdClass) responses before.  Or if I have I've been oblivious to it.</p>
  
  <p>I figure I need to parse ["AccountsGetXMLResult"] for specific information, but also ["rowCount"] and ["pageCount"].</p>
  
  <p>I'm confused what the #2 (3) is all about.</p>
  
  <p>Anyway, here's my attempt at parsing the data.  I started with the AccountsGetXMLResult:</p>
  
  <pre><code>echo $webservice-&gt;AccountsGetXMLResult;
  </code></pre>
  
  <p>Here's what I got back.<br>
  <strong>PHP Notice:  Undefined property: SoapClient::$AccountsGetXMLResult in /apache/test.php on line 23</strong></p>
  
  <p>So clearly I'm in need of help with dissecting responses.</p>