Re: [SOAP] some soap focus

From: Date: Tue, 08 Apr 2003 23:14:39 +0000
Subject: Re: [SOAP] some soap focus
References: 1 2 3 4  Groups: php.soap 
Request: Send a blank email to php-soap+get-533@lists.php.net to get a copy of this message
Jan Schneider wrote:
Quoting Shane Caraveo <shane@caraveo.com>:
What I really would like to see is a way to register functions or
methods
independent on the soap methods. Something like: $soap->addToMap('soap_method', array($my_object,
'method_of_my_object'));
Jan.
You can do that already by using a __dispatch array member in your objects. I don't remember the details off the top of my head, I'll try to get that documented in an example, though I think on of the examples already shows that.
Maybe I missed something but looking at the examples and the server code it looks like only the "in" and "out" members of the __dispatch property is used. The requested (soap) method is passed to SOAP_Server::callMethod() that in return executes call_user_func[_array] with this method name. Where can I specify what method to use instead of either a global function or a method of the server class? How do you create a soap server with method names that are reserved words in php? Jan.
I've had it in the back of my head to comment on this further, but you beat me to it. You're right, there is no way to do that right now. I'll look and see how much effort it will take to add the aliasing tonight. Shane

« previous php.soap (#533) next »