php.net |  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
 [2007-07-31 12:10 UTC] m dot wharton at waracle dot com
Description:
------------
Hi,
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:
---------------
//SERVER:
ini_set('soap.wsdl_cache_enabled', '0'); 
$server = new SoapServer('http://dev.polygoogle.co.uk/services/wsdl/userManager.wsdl', array('classmap' => array('userLoginResponse' => 'userLoginResponse')));
$server->setClass('userManagerWrapper');
//CLIENT:
$classmap =  array('userLoginResponse' => 'userLoginResponse');
$client = new SoapClient('http://dev.polygoogle.co.uk/services/wsdl/userManager.wsdl',array('classmap' => $classmap));
$result = new userLoginResponse;
$result = $client->userLogin($user,$password);
//WSDL:
http://dev.polygoogle.co.uk/services/wsdl/userManager.wsdl



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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-01 11:07 UTC] dmitry@php.net
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.

thanks
 [2007-08-01 11:38 UTC] jani@php.net
Reopen if you find the cause.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC