note 57969 rejected from function.soap-soapserver-setpersistence by betz
| From: | betz@php.net | Date: | Thu, 20 Oct 2005 11:58:46 +0000 |
| Subject: | note 57969 rejected from function.soap-soapserver-setpersistence by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-97294@lists.php.net to get a copy of this message | ||
Note Submitter: Silvio Ginter <Silvio dot Ginter at gmx dot de>
----
Hello,
even though using the SoapServer::setClass() function and the
SoapServer::setPersistence(SOAP_PERSISTENCE_SESSION) function, it won't work. The session is
created and the object stored in it, but it isn't used at the next request.
The following is the code for the php-file holding the SoapServer:
<?php
if (isset($_REQUEST['PHPSESSID'])) session_id($_REQUEST['PHPSESSID']);
session_start();
ini_set('soap.wsdl_cache_enabled', '1'); // Den WSDL Cache abschalten
require_once('pro_class.inc.php');
/* Erzeugt eine neue SoapServer Instanz. */
$server = new SoapServer('./wsdl/myvast_pro.wsdl', array ( 'soap_version'
=> SOAP_1_2,
'encoding' => 'utf-8' ) );
/* Bestimmt, dass alle öffentlichen Funktionen der Klasse 'pro_class' für den Client
erreichbar sein sollen */
$server->setClass('pro_class');
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
/* Behandelt den Soap Request des Clients. */
$server->handle();
?>
If anyone finds a fault in it, please contact me under my posted e-mail address.
Thx