Voting

: min(two, eight)?
(Example: nine)

The Note You're Voting On

Ariz Jacinto
16 years ago
If you want your SOAP client to be able to save and then retrieve the object properties, you need to set the SOAP server to be persistent by setting session.auto_start=0, invoking session_start(), and SoapServer->setPersistence(SOAP_PERSISTENCE_SESSION) in the following manner:

<?php
//set ini
ini_set("soap.wsdl_cache_enabled", 0);
ini_set("session.auto_start", 0);

//class file
require_once('MyClass.php');

//for persistent session
session_start();

//service
$server = new SoapServer('service.wsdl');
$server->setClass("MyClass");
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->handle();
?>

<< Back to user notes page

To Top