php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38005 SoapFault faultstring doesn't follow encoding rules
Submitted: 2006-07-04 13:00 UTC Modified: 2006-07-10 07:42 UTC
From: afalak at poczta dot onet dot pl Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5CVS-2006-07-04 (CVS) OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: afalak at poczta dot onet dot pl
New email:
PHP Version: OS:

 

 [2006-07-04 13:00 UTC] 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 ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-10 07:42 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 04:01:30 2024 UTC