Using nusoap with CI

Derek Jones edited this page Jul 5, 2012 · 7 revisions
Clone this wiki locally

Category:Approaches This is how I used the nusoap client library within CI.

First I download nusoap:;

I opened the zip file ( and copied the lib folder to my application/libraries folder.

I renamed the lib folder: [quote]application/libraries/lib[/quote] to [quote]application/libraries/nusoap[/quote]

Now I have a function in my controller called soap_test.


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('');
         $result = $client->call('soapMethod', $n_params);
         echo $result;