![]() |
SOAP server in controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: SOAP server in controller (/showthread.php?tid=23044) |
SOAP server in controller - El Forum - 09-28-2009 [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? SOAP server in controller - El Forum - 09-29-2009 [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 SOAP server in controller - El Forum - 09-29-2009 [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. SOAP server in controller - El Forum - 06-09-2010 [eluser]abbasmn[/eluser] we had this issue, here how we fixed it: Code: class Ws_server extends Controller |