|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42157 SOAP classmapping intermittent
Submitted: 2007-07-31 12:10 UTC Modified: 2007-08-01 11:38 UTC
From: m dot wharton at waracle dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.2.3 OS: Red Hat EL4 2.6.9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: m dot wharton at waracle dot com
New email:
PHP Version: OS:


 [2007-07-31 12:10 UTC] m dot wharton at waracle dot com
I was writing a number of soap services that deal with user management for a system I'm building. One of these services deals with loggin a user onto the system and returns an object, which holds details of the user and also an array with their access levels for various parts of the system.Now I set up all the complex types in the WSDL, and mapped the class successfully in the SOAP server. And it worked...most the time.
I found that the classmapping would work but every so often (it actually followed a pattern) the server would ignore the classmapping and the client would recieve a stdClass object. It worked every 14 requests, and then returns stdClass on the 15th. This pattern actually changed at one point, to being 010111 (where 1 is the classmap working) after modifying the WSDL. 

However I found that after setting soap.wsdl_cache_enabled=0 to 1 stopped the classmap working AT ALL, then when its set back to 0 again it works perfectly, no intermittant faults.

Reproduce code:
ini_set('soap.wsdl_cache_enabled', '0'); 
$server = new SoapServer('', array('classmap' => array('userLoginResponse' => 'userLoginResponse')));
$classmap =  array('userLoginResponse' => 'userLoginResponse');
$client = new SoapClient('',array('classmap' => $classmap));
$result = new userLoginResponse;
$result = $client->userLogin($user,$password);

Expected result:
I expected the result to be consistant, i.e. classmap working or not working. Not working every 15th request or following a pattern of either working or not seems like a caching bug or something.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-01 11:07 UTC]
Please provide a full reprodusable case (client and server code).
 [2007-08-01 11:20 UTC] m dot wharton at waracle dot com
Hi, I have the classmapping working now, the problem has stopped occurring and i Have no idea what caused it.

I will experiment and try to find the fault again.

 [2007-08-01 11:38 UTC]
Reopen if you find the cause.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 24 12:05:45 2022 UTC