--TEST--
Bug #47273 (Encoding bug in SoapServer->fault)
--SKIPIF--
--INI--
unicode.script_encoding=ISO-8859-1
unicode.output_encoding=ISO-8859-1
--FILE--
EOF;
$request2 = <<
EOF;
class SoapFaultTest
{
public function test1() {
// Test #1
return 'Test #1 exception with some special chars: Äßö';
}
public function test2() {
// Test #2
//throw new SoapFault('Server', 'Test #2 exception with some special chars: Äßö');
throw new Exception('Test #2 exception with some special chars: Äßö');
}
}
$server = new SoapServer(null, array(
'uri' => "http://127.0.0.1:8080/test/",
'encoding' => 'ISO-8859-1'));
$server->setClass('SoapFaultTest');
try {
$server->handle($request1);
} catch (Exception $e) {
$server->fault("Sender", $e->getMessage());
}
try {
$server->handle($request2);
} catch (Exception $e) {
$server->fault("Sender", $e->getMessage());
}
?>
--EXPECT--
Test #1 exception with some special chars: ÃÃö
SenderTest #2 exception with some special chars: ÃÃö