Persistance

From: Date: Fri, 17 Oct 2003 15:44:34 +0000
Subject: Persistance
Groups: php.soap 
Request: Send a blank email to php-soap+get-1118@lists.php.net to get a copy of this message
Ok, first, I do understand that, as of 0.7.5, PEAR::SOAP does not have persistance. I got to thinking why this hasn't been implemented (and how I might go about implementing it), when I came across this question: What would necessitate the use of persistent server-side objects? More specifically, is there something that session-based persistence can achieve that one cannot accomplish using SOAP headers and manually serializing the object at the end of the request? About 3 months ago, someone posted to the list that they wanted their client to do something like: $c->setKey( 'abc123' ); $key = $c->getKey(); Could this not just as easily be accomplished by sending the key in a SOAP header, having the SOAP server handle that header by setting it as an instance variable of the server-side object, then answering the request in the SOAP body? Seems to me if you needed to truly persist the object across requests, you could have the server's response include a Unique ID for the object. If you needed access to that specific object on subsequent requests, you could send the Object ID as a header, and then the server could handle de-serializing the object before handling the body of your request. So, persistence seems to be something that should be handled by the application developer, rather than the PEAR::SOAP library. I am wide open to feedback on this matter! == Will Green

« previous php.soap (#1118) next »