Return to bug38004.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / bugs |
1.1 misho 1: --TEST-- 2: Bug #38004 (Parameters in SoapServer are decoded twice) 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->strA."\n".$param->strB."\n"; 12: return $g; 13: } 14: 15: class TestSoapClient extends SoapClient { 16: function __construct($wsdl) { 17: parent::__construct($wsdl); 18: $this->server = new SoapServer($wsdl); 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__).'/bug38004.wsdl'); 32: $strA = 'test & test'; 33: $strB = 'test & test'; 34: $res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); 35: print_r($res); 36: print_r($g); 37: ?> 38: --EXPECT-- 39: test & test 40: test & test 41: test & test 42: test & test