#38005 [Asn->Csd]: SoapFault faultstring doesn't follow encoding rules

From: Date: Mon, 10 Jul 2006 07:42:52 +0000
Subject: #38005 [Asn->Csd]: SoapFault faultstring doesn't follow encoding rules
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99281@lists.php.net to get a copy of this message
ID: 38005 Updated by: dmitry@php.net Reported By: afalak at poczta dot onet dot pl -Status: Assigned +Status: Closed Bug Type: SOAP related Operating System: Windows 2000 PHP Version: 5CVS-2006-07-04 (CVS) Assigned To: dmitry New Comment: Fixed in CVS HEAD and PHP_5_2. Previous Comments: ------------------------------------------------------------------------ [2006-07-04 13:00:54] afalak at poczta dot onet dot pl Description: ------------ When encoding is set for both SoapClient and SoapServer (i.e. ISO-8859-1) parameters are encoded automatically. But this doesn't apply to SoapFault. Including any national character in fault string causes an error "Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document in ..." Reproduce code: --------------- [client] <?php $client = new SoapClient('a.wsdl' ,array('encoding' => 'ISO-8859-1') ); $res = $client->Test(); ?> [server] <?php function Test() { return new SoapFault('Test', 'This is our fault: Ä'); } $server = new SoapServer('a.wsdl', array('encoding' => 'ISO-8859-1')); $server->addFunction('Test'); $server->handle(); ?> [a.wsdl] //not important for this error Expected result: ---------------- Soap exception with message being SoapFault's parameter Actual result: -------------- Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document in ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38005&edit=1

« previous php.bugs (#99281) next »