title: SOAP PHP Parsing Error?
body: <p>I'm communicating with a SOAP service created with EJB -- it intermittently fails, and I've found a case where I can reliably reproduce. </p>
  
  <p>I'm getting a funky ass SOAP fault that says "looks like we got not XML," however, when retrieving the last response I get what is listed below (and what looks like valid XML to me). </p>
  
  <p>Any thoughts?</p>
  
  <p><b>Soap Fault:</b></p>
  
  <pre><code>object(SoapFault)#2 (9) { 
      ["message:protected"]=&gt;  string(33) "looks like we got no XML document" 
      ["string:private"]=&gt;  string(0) "" 
      ["code:protected"]=&gt;  int(0) 
      ["file:protected"]=&gt;  string(40) "/Users/josh/Sites/blahblahblah/test-update.php" 
      ["line:protected"]=&gt;  int(26) 
      ["trace:private"]=&gt;  array(2) { 
          [0]=&gt;  array(4) { 
              ["function"]=&gt;  string(6) "__call" 
              ["class"]=&gt;  string(10) "SoapClient" 
              ["type"]=&gt;  string(2) "-&gt;" 
              ["args"]=&gt;  array(2) { 
                  [0]=&gt;  string(24) "UpdateApplicationProfile" 
                  [1]=&gt;  array(1) { 
                      [0]=&gt;  array(2) { 
                          ["suid"]=&gt;  string(36) "62eb56ee-45de-4971-9234-54d72bbcd0e4" 
                          ["appid"]=&gt;  string(36) "6be2f269-4ddc-48af-9d47-30b7cf3d0499" 
                      } 
                  } 
              } 
          } 
          [1]=&gt;  array(6) { 
              ["file"]=&gt;  string(40) "/Users/josh/Sites/blahblahblah/test-update.php" 
              ["line"]=&gt;  int(26) 
              ["function"]=&gt;  string(24) "UpdateApplicationProfile" 
              ["class"]=&gt;  string(10) "SoapClient" 
              ["type"]=&gt;  string(2) "-&gt;" 
              ["args"]=&gt;  array(1) { 
                  [0]=&gt;  array(2) { 
                      ["suid"]=&gt;  string(36) "62eb56ee-45de-4971-9234-54d72bbcd0e4" 
                      ["appid"]=&gt;  string(36) "6be2f269-4ddc-48af-9d47-30b7cf3d0499" 
                  } 
              } 
          } 
      } 
      ["faultstring"]=&gt;  string(33) "looks like we got no XML document" 
      ["faultcode"]=&gt;  string(6) "Client" 
      ["faultcodens"]=&gt;  string(41) "http://schemas.xmlsoap.org/soap/envelope/" 
  }
  </code></pre>
  
  <p><b>And the actual raw XML response using client->__getLastResponse():</b></p>
  
  <pre><code>&lt;env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'&gt;
      &lt;env:Header&gt; 
      &lt;/env:Header&gt;
      &lt;env:Body&gt;
          &lt;ns2:UpdateApplicationProfileResponse xmlns:ns2="blahblahblah"&gt;
              &lt;paramname&gt;status&lt;/paramname&gt;
              &lt;paramname&gt;location&lt;/paramname&gt;
              &lt;paramname&gt;timezone&lt;/paramname&gt;
              &lt;paramname&gt;homepage&lt;/paramname&gt;
              &lt;paramname&gt;nickname&lt;/paramname&gt;
              &lt;paramname&gt;firstName&lt;/paramname&gt;
              &lt;paramname&gt;languages&lt;/paramname&gt;
              &lt;paramname&gt;color&lt;/paramname&gt;
              &lt;paramname&gt;lastName&lt;/paramname&gt;
              &lt;paramname&gt;gender&lt;/paramname&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
              &lt;paramvalue&gt;XXX XXX&lt;/paramvalue&gt;
              &lt;paramvalue&gt;XXX&lt;/paramvalue&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
              &lt;paramvalue&gt;CA0008&lt;/paramvalue&gt;
              &lt;paramvalue&gt;XXX&lt;/paramvalue&gt;
              &lt;paramvalue&gt;&lt;/paramvalue&gt;
          &lt;/ns2:UpdateApplicationProfileResponse&gt;
      &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
  </code></pre>