|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53068 Soap header object without attributes
Submitted: 2010-10-14 18:04 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: goetas at lignano dot it Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.3 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
32 - 30 = ?
Subscribe to this entry?

 [2010-10-14 18:04 UTC] goetas at lignano dot it
when soap server handles the soap header, the object version of the header does not contain it's attributes.

Test script:
class testSoap{
	protected $auth;
	public function login($data){
	public function getLogin(){
		return $this->auth;

$server = new SoapServer('test.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE));
$server->setObject(new testSoap());
$cl = new SoapClient('',
	 array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true)

$xml = "<gs:login xmlns:gs=\"\"><logdata name='user' password='pwd' /></gs:login>";

$cl->__setSoapHeaders(array(new SoapHeader('', '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] => 


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jun 03 22:03:41 2023 UTC