title: Remove BOM Character from soap response : SOAP: looks like we got no XML document
body: <p>Hi I am a beginning in creating webservices,</p>
  
  <p>I'm trying to create a web service by using soap protocol and I keep getting the following error:looks like we got no XML document.</p>
  
  <p>Here is below my web service  and output of response. As you will see i'm getting bom character (ï»¿ï»¿ï»¿) in begining of response.. i think that this the root cause of error getted that specify the xml is not valid.Please is there any way to remove those character  from my client. so i'm noticing that i've tried to override _doRequest method of SoapClient but no success. My wsdl file and sever script are all encoded in UTF-8 Without BOM.</p>
  
  <p>Any help to solve this issue will be very appreciated.</p>
  
  <p>regards.</p>
  
  <p>client: </p>
  
  <pre><code>try{
      ini_set("soap.wsdl_cache_enabled", "0");// disabling WSDL cache
      libxml_disable_entity_loader(false);
      if(!extension_loaded("soap")){ dl("php_soap.dll");  }
      $client2 = new SoapClient("http://www.payafrik.com/PayAfrikAPI.wsdl",array("wsdl_cache"=&gt;0,"trace"=&gt;1,"exception"=&gt;1));
      $slabrequest["email"]  = "tes@gmail.com";
      $slabrequest["description"] = "test";
      $slabrequest["montant"]    = 50000;
      $client2-&gt;slabAccount($slabrequest);
  }catch(Exception $e){ 
      var_dump( $e ); 
      echo "&lt;pre&gt;"; echo "Request :&lt;br/&gt;", htmlentities($client2-&gt;__getLastRequest()), "&lt;br/&gt;"; 
      echo "Response :&lt;br/&gt;", htmlentities($client2-&gt;__getLastResponse()), "&lt;br/&gt;";echo "&lt;/pre&gt;";
  }   
  </code></pre>
  
  <p>..
  Output of Response :
  <strong>ï»¿ï»¿ï»¿</strong>
  repSUCCESSuser4MonsieurGNACADJALoic 1RUE 1382LITTORAL1229COTONOU22921332680229972461401987-03-26loic.gnacadja@gmail.com646260ea6e66c61704c695e617f9b74alogin1309625000011242015-07-12 23:50:30</p>