Annotation of embedaddon/php/ext/soap/tests/bugs/bug38067.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #38067 (Parameters are not decoded from utf-8 when using encoding option)
! 3: --SKIPIF--
! 4: <?php require_once('skipif.inc'); ?>
! 5: --INI--
! 6: soap.wsdl_cache_enabled=0
! 7: --FILE--
! 8: <?php
! 9: function Test($param) {
! 10: global $g;
! 11: $g = $param->str;
! 12: return $g;
! 13: }
! 14:
! 15: class TestSoapClient extends SoapClient {
! 16: function __construct($wsdl, $opt) {
! 17: parent::__construct($wsdl, $opt);
! 18: $this->server = new SoapServer($wsdl, $opt);
! 19: $this->server->addFunction('Test');
! 20: }
! 21:
! 22: function __doRequest($request, $location, $action, $version, $one_way = 0) {
! 23: ob_start();
! 24: $this->server->handle($request);
! 25: $response = ob_get_contents();
! 26: ob_end_clean();
! 27: return $response;
! 28: }
! 29: }
! 30:
! 31: $client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl',
! 32: array('encoding' => 'ISO-8859-1'));
! 33: $str = 'test: Ä';
! 34: $res = $client->Test(array('str'=>$str));
! 35: echo $str."\n";
! 36: echo $res."\n";
! 37: echo $g."\n";
! 38: ?>
! 39: --EXPECT--
! 40: test: Ä
! 41: test: Ä
! 42: test: Ä
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>