ID:               34748
 Comment by:       andy at gleep dot org
 Reported By:      flobee at gmail dot com
 Status:           No Feedback
 Bug Type:         SOAP related
 Operating System: xp/*nix
 PHP Version:      5.1.0RC1
 New Comment:

The utf-8 is hard coded in soap.c so it's not even configurable.

[EMAIL PROTECTED] soap]$ grep -n utf *.c
php_encoding.c:763:                     soap_error1(E_ERROR, 
"Encoding: string '%s' is not a valid utf-8 string", str);
php_encoding.c:768:             soap_error1(E_ERROR,  "Encoding: string
'%s' is not a valid utf-8 string", str);
php_http.c:443:                
smart_str_append_const(&soap_headers,"Content-Type:
application/soap+xml; charset=utf-8");
php_http.c:451:                
smart_str_append_const(&soap_headers,"Content-Type: text/xml;
charset=utf-8\r\n");
soap.c:1444:                    sapi_add_header("Content-Type:
text/xml; charset=utf-8", sizeof("Content-Type: text/xml;
charset=utf-8")-1, 1);
soap.c:1460:                    sapi_add_header("Content-Type:
text/xml; charset=utf-8", sizeof("Content-Type: text/xml;
charset=utf-8"), 1);
soap.c:1859:                    sapi_add_header("Content-Type:
application/soap+xml; charset=utf-8", sizeof("Content-Type:
application/soap+xml; charset=utf-8")-1, 1);
soap.c:1861:                    sapi_add_header("Content-Type:
text/xml; charset=utf-8", sizeof("Content-Type: text/xml;
charset=utf-8")-1, 1);
soap.c:1988:            sapi_add_header("Content-Type:
application/soap+xml; charset=utf-8", sizeof("Content-Type:
application/soap+xml; charset=utf-8")-1, 1);
soap.c:1990:            sapi_add_header("Content-Type: text/xml;
charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);

This is causing me major problems with 5.1.2 but it's still like that
in 5.2.0


Previous Comments:
------------------------------------------------------------------------

[2006-09-13 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2006-09-05 18:24:09] even at phoniax dot no

I have the same problem in 5.1.4 on a CentOS server.

You can use this WSDL for testing: 
http://webservices.iptelefoni.no/?class=OrderManager&wsdl

The output from __getLastRequest outputs that it requests 
encoding in UTF-8.

Even when I PEAR's Soap Client (which _do_ send the correct 
encoding) the PHP 5.1.4 SoapServer returns the XML in utf8 
encoding.

Both server and client has been set the option for encoding 
to ISO-8859-1.

------------------------------------------------------------------------

[2005-10-14 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2005-10-06 15:30:36] [EMAIL PROTECTED]

And where can I find the a.wsdl ?

------------------------------------------------------------------------

[2005-10-06 15:22:06] flobee at gmail dot com

[server]
theServerClass {
 function __construct() { }
 function set($in) {
  return array('code'=>'€€€');
 }
}
$server = new SoapServer('a.wsdl',array('encoding'=>'ISO-8859-1'));
$server->setClass('theServerClass');
$server->handle();

[client]
$cli = new SoapClient('a.wsdl',
array('encoding'=>'ISO-8859-1','soap_version'=> SOAP_1_2, 'trace'=>
1));
$result = $cli->set('somthing');
print_r($cli->__getLastResponse());

...
xml-Response: <?xml version="1.0" encoding="UTF-8"?> 
but IS ISO-8859-1

set encoding to utf-8 the "€" will throw a SoapFault.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/34748

-- 
Edit this bug report at http://bugs.php.net/?id=34748&edit=1

Reply via email to