SOAP server in controller |
[eluser]steelaz[/eluser]
Right now I have this controller: Code: class Soap extends Controller As you can see, I'm loading /application/soap/qb_server.php and it handles SOAP requests. Everything works fine, but I would prefer to have SOAP functions as private methods in controller itself, I tried using $server->addFunction('function_name') instead of $server->setClass('qb_server'), but I understand it looks for functions in global scope?
[eluser]gon[/eluser]
This probably should be asked in the library forum (if there is any...) Anyway, maybe the addFunction method works the same way as call_user_func from native PHP, where you can pass the name of a global function, or an array containing an object and a method name. See the example #4 here: http://www.php.net/call_user_func
[eluser]steelaz[/eluser]
Thanks gon, but addFunction() only accepts string. Instead I changed setClass() to the name of my controller - $server->setClass('Soap') and it worked.
[eluser]abbasmn[/eluser]
we had this issue, here how we fixed it: Code: class Ws_server extends Controller |
Welcome Guest, Not a member yet? Register Sign In |