Part of the EllisLab Network
x
 
Create New Page
 View Previous Changes    ( Last updated by laytone )

Using nusoap with CI

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

First I download nusoap:

http://sourceforge.net/project/downloading.php?group_id=57663&use_mirror=internap&filename=nusoap-0.7.3.zip&12547277;

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

I renamed the lib folder:

application/libraries/lib

to

application/libraries/nusoap

Now I have a function in my controller called soap_test.

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;
     
}

Categories: