|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36155 SoapServer: Possibility to have ONE function that handles all Soap requests
Submitted: 2006-01-25 10:31 UTC Modified: 2021-09-20 14:56 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tschlottke at virtualminds dot de Assigned: cmb (profile)
Status: Wont fix Package: SOAP related
PHP Version: 5.1.2 OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tschlottke at virtualminds dot de
New email:
PHP Version: OS:


 [2006-01-25 10:31 UTC] tschlottke at virtualminds dot de
It would be neat to implmentent a method to register ONE function that handles everything, no matter which function the client called.
This function could then do (for example) Session/Authentification-related stuff.
The soapserver should forward all parameters(as array) aswell as the function name called by the client(and maybe the namespace) and return all values returned by this function. So this function could handle it all.
Would be a neat thing...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-21 21:35 UTC]
-Package: Feature/Change Request +Package: SOAP related
 [2011-05-08 00:18 UTC] j dot romero dot 1214 at gmail dot com
You can create an Abstract Soap Server by creating a class with the magic method 
__class() to handle any request.

Of course, this isn't ideal in a web service world but it's a possible.

SERVER (AbstractSoap.php)
// class
class AbstractSoap {
	function __call($name, $args)
		return array('Operation'=>$name, 'Arguments' => $args);

// start server
$server = new SoapServer(null, array('uri'=>''));

CLIENT (client.AbstractSoap.php)
$client = new SoapClient(null,array("uri"=> "",	
"location" => "",));

$Authentication = new stdClass();
$Authentication->Username = 'user';
$Authentication->Password = 'password';

$Person = new stdClass();
$Person->FirstName 			= 'Javier';
$Person->LastName 			= 'Romero';

$response = $client->AddAccount($Authentication,$Person);
 [2021-09-20 14:56 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-09-20 14:56 UTC]
After 15 years without any feedback, except for a comment that
shows that this is already possible, I think we can close this as
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 18:03:37 2021 UTC