title: Soap Issue - SoapFault exception: [Client] looks like we got no XML document
body: <p>Ive looked at similar errors and i think its most likely due to a BOM character but to be honest most of the other coding is in a different context and i just dont understand it, im not that familiar with soap and just use it to pull the data then format it in php.</p>
  
  <p>My code is simple:</p>
  
  <pre><code>$activityClient = xpmClient::getModuleInstance('activity', $remoteSessionId, 'xxx.5pmweb.com');
  $filter = new stdClass();
  $count = 300;
  $offset = 0;
  $activityList = $activityClient-&gt;getList($filter, $offset, $count);
  </code></pre>
  
  <p>Now the server error shows:</p>
  
  <pre><code>&gt; PHP Fatal error:  Uncaught SoapFault exception: [Client] looks like we got no XML document in xxx/caching.php:59\nStack trace:\n  
  \#0 xxx/caching.php(59): SoapClient-&gt;__call('getList', Array)\n  
  \#1 xxx/caching.php(59): xpmClient-&gt;getList(Object(stdClass), 0, '371')\n  
  \#2 /xxx/reports.php(296): include('/xxx/...')\n  
  \#3 {main}\n  thrown in /xxx/caching.php on line 59
  </code></pre>
  
  <p>Line 296 on <code>report.php</code> is an include for the <code>caching.php</code> file, line 59 of that file is  </p>
  
  <pre><code>$activityList = $activityClient-&gt;getList($filter, $offset, $count);
  </code></pre>
  
  <p>This worked for months without issue so im not sure what changed today. Any ideas how to strip the BOM and still get my data into <code>$activityList</code> as an object so i can access the information?</p>
  
  <pre><code>edit//
  </code></pre>
  
  <p>The preg replace doesnt work, i guess thats because once i call $activityList the server gives a fatal error and doesnt process anything after that so im trying to fix it AFTER its broke rather than before.</p>
  
  <pre><code>How would i go about doing __getLastResponse()
  </code></pre>
  
  <p>Ive read the manual but dont understand how to structure it, im pretty sure i need a try catch for the reasons i said preg replace didnt work but i tried a few variations and its doing nothing, im pretty sure the structure is wrong, any pointers or ideas?</p>