-
Notifications
You must be signed in to change notification settings - Fork 0
Using nusoap with CI
Category:Approaches This is how I used the nusoap client library within CI.
First I download nusoap:
I opened the zip file (nusoap-0.7.3.zip) and copied the lib folder to my [i]application/libraries[/i] folder.
I renamed the lib folder: [quote]application/libraries/[strong]lib[/strong][/quote] to [quote]application/libraries/[strong]nusoap[/strong][/quote]
Now I have a function in my controller called [color=green]soap_test[/color].
Code: [code] class MyController extends Controller { function test_soap(){ require_once(APPPATH.'libraries/nusoap/nusoap'.EXT); //includes nusoap // Same as application/libraries/nusoap/nusoap.php $n_params = array('name' => 'My Name', 'email' => 'my@email.adr'); $client = new nusoap_client('http://server.com/soap/server.php'); $result = $client->call('soapMethod', $n_params); echo $result; } } [/code]
- Original author: Derek Jones
- How to extend helpers: See User Guide
- Modified by: Thomas Stapleton (id, classes, selected country option and all option)
- Modified by: Bradley De-Lar (construct, setLayout example)