|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
Description: ------------ when soap server handles the soap header, the object version of the header does not contain it's attributes. Test script: --------------- server <?php class testSoap{ protected $auth; public function login($data){ $this->auth=print_r($data,1); } public function getLogin(){ return $this->auth; } } $server = new SoapServer('test.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE)); $server->setObject(new testSoap()); $server->handle(); ?> client <?php $cl = new SoapClient('http://sviluppo.netanday.it/wsdltest/test.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true) ); $xml = "<gs:login xmlns:gs=\"http://www.goetas.com\"><logdata name='user' password='pwd' /></gs:login>"; $cl->__setSoapHeaders(array(new SoapHeader('http://www.goetas.com', 'login', new \SoapVar($xml, XSD_ANYXML)))); echo $cl->getLogin(); ?> Expected result: ---------------- stdClass Object ( [logdata] => stdClass Object ( [name] => user [password] => pwd ) ) Actual result: -------------- stdClass Object ( [logdata] => )