From:             m dot wharton at waracle dot com
Operating system: Red Hat EL4 2.6.9
PHP version:      5.2.3
PHP Bug Type:     SOAP related
Bug description:  SOAP classmapping intermittent

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.


-- 
Edit bug report at http://bugs.php.net/?id=42157&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42157&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42157&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42157&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42157&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42157&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42157&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42157&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42157&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42157&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42157&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42157&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42157&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42157&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42157&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42157&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42157&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42157&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42157&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42157&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42157&r=mysqlcfg

Reply via email to