ID: 35972
Updated by: [EMAIL PROTECTED]
Reported By: ckl at ecw dot de
-Status: Assigned
+Status: Bogus
Bug Type: SOAP related
Operating System: Win32
PHP Version: 5CVS-2006-01-11 (5.1.2) (snap)
Assigned To: dmitry
New Comment:
You should include files with class definition before starting
session.
The following modification makes it works fine
SOAPSMSServer.php5:
<?php
include_once("LogHandler.php5");
include_once("LogHandler.File.php5");
session_start();
...
Previous Comments:
------------------------------------------------------------------------
[2006-01-12 09:30:09] ckl at ecw dot de
The four files are located in http://wrclan9.ecw.de/bug.txt
Thanks in advance,
Christopher Klein
------------------------------------------------------------------------
[2006-01-12 09:12:22] [EMAIL PROTECTED]
Could you please provide full example with client, server, "Log5.php"
and 'SOAPSMSServer.wsdl'.
I created my own test-case, but it works fine for me.
------------------------------------------------------------------------
[2006-01-11 16:43:08] ckl at ecw dot de
Description:
------------
I get a strange problem when creating a web-service. The second call on
the web-service crashes.
Reproduce code:
---------------
<?php
include_once("Log.php5);
class SOAPSMSServer
{
function __construct() {
$this->objLog = new Log();
}
public function method1() {
$this->objLog->log("Method 1 called");
}
public function method2() {
$this->objLog->log("Method 2 called"); // << crashes
}
$soapServer = new SoapServer('SOAPSMSServer.wsdl');
$soapServer->setClass('SOAPSMSServer');
$soapServer->addFunction(array('method1','method2'));
$soapServer->setPersistence(SOAP_PERSISTENCE_SESSION);
$soapServer->handle();
?>
Expected result:
----------------
In my opinion the script should do following:
a) Client connects to SOAP-Server
b) Server executes __construct()
c) Server executes method1()
calls the log-method
d) Server executes method2()
calls the log-method
The client is ok - it works if I disable logging.
Actual result:
--------------
The error is:
"The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition "Log" of the
object you are trying to operate on was loaded _before_ unserialize()
gets called or provide a __autoload() function to load the class
definition"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35972&edit=1