SOAP envelope change from Content-Type: text/xml to text/html

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

  I'm running PHP 5.2 on gentoo distribution. I'm testing SOAP new
extensions, but I'm facing a strange problem... I built a little class
and used setClass() and handle() to make PHP handle interconnectivity,
but for some ugly reason when I update a public method, the SOAP
envelope changed from:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8


HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1

  In other words, the Content-Type changed from XML to HTML !! Has
anyone hit with this ??


Sebastián Araya

Re: SOAP envelope change from Content-Type: text/xml to text/html

Sebastian Araya wrote:
Quoted text here. Click to load it

Perhaps that the method outputs some white space. Test case:

The following returns text/xml as the content type:
    header("Content-Type: text/xml");

The following throws a warning (headers already sent), but when warnings  
aren't displayed (e.g. because of the setting of the display_errors  
directive or the error_reporting level), it just results in the content type  
being set to text/html:

   print ' ';
   header("Content-Type: text/xml");


Site Timeline