Class Question
| From: | Javier Szyszlican | Date: | Mon, 03 Jun 2002 05:53:52 +0000 |
| Subject: | Class Question | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-44@lists.php.net to get a copy of this message | ||
Hi,
I'm trying some things with phpsoap, but I cant get classes to work when they
are one inside another.
Server:
class interfaces_class {
function get() { return "hi"; }
}
class jffnms {
var $interfaces;
function jffnms() {
$this->interfaces = new interfaces_class();
}
}
$server = new SoapServer("urn:jffnms");
$server->setClass('jffnms');
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->handle();
Client:
$obj = new SoapObject ("http://server/soapserver.php","urn:jffnms");
$aux = $obj->interfaces->get();
var_dump($aux);
I'm geting :
Call to a member function on a non-objectSOAP-ENV:Server
In normal php I use:
$obj = new jffnms();
echo $obj->interfaces->get();
What I'm missing?
Is there any other way to do it?
Thanks...
Javier