470,833 Members | 1,354 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

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

Hello,

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

to:

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 ??

Thanks,

Sebastián Araya

Apr 4 '06 #1
1 6384
Sebastian Araya wrote:
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:


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

The following returns text/xml as the content type:
<?php
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:

<?php
print ' ';
header("Content-Type: text/xml");
?>
JW
Apr 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Stephen Chell | last post: by
reply views Thread by Blaine Everingham | last post: by
reply views Thread by circuit_breaker | last post: by
5 posts views Thread by mark kurten | last post: by
reply views Thread by Hans Kesting | last post: by
16 posts views Thread by MR | last post: by
reply views Thread by Daniel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.