CodeIgniter Forums
Nusoap CI Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: Nusoap CI Library (/thread-1815.html)



Nusoap CI Library - El Forum - 06-28-2007

[eluser]Unknown[/eluser]
I’ve created a sort of pseudo-library for the NuSoap PHP Library… It basically works as a NuSoap loader.

File structure:

application
|
|--libraries
|
|--Nusoap_core.php
|--Nusoap.php

Where Nusoap_core.php is the original Soap Library from Sourceforge, and Nusoap is my library class that looks like this:

Code:
<?php

//exit if direct access attempted
if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
* NuSoap Loader for the Code Igniter Framework
*
* Currently Only Supports a client in Proxy mode.
*
* Usage: (from inside any CI controller or model)
*         $this->load->library('Nusoap');
*        $proxy = $this->nusoap->getProxy('wsdl_url');
*
* @author slynn1324
* Last Modified :  06-27-2007
*/

class Nusoap
{
    
    /**
     * @name Nusoap
     * @return Nusoap
     *
     * Constructor, loads the nusoap_core package.
     *  Note: Nusoap_core.php is a copy of nusoap.php,v 1.108 2007/06/22 19:38:44
     *               from Sourceforge CVS
     *
     *
     */
    
    
    function Nusoap()
    {
        /* Import The Base Nusoap Package */
        require_once('Nusoap_core.php');    
    }
    
    /**
     * @name getProxy
     * @param $wsdl_url - URL of Web Service wsdl
     * @return NuSoap Proxy
     *
     * Returns a proxy for the Web Service at the specified wsdl url
     */
    function getProxy($wsdl_url)
    {
        $soapClient = new nusoap_client($wsdl_url, 'wsdl');
        return $soapClient->getProxy();    
    }
}
?>

This is just a simple library at this point that will only return a proxy to the web service with the given wsdl location, however, it should be very easy to expand.


Nusoap CI Library - El Forum - 07-02-2007

[eluser]frenzal[/eluser]
looks like they changed class names in the latest version, took me a while to work out why it wasn't working Smile now the soapclient is just called soaplicent, so this'll do the trick:

function getProxy($wsdl_url)
{
$soapClient = new soapclient($wsdl_url, 'wsdl');
return $soapClient->getProxy();
}


Nusoap CI Library - El Forum - 07-02-2007

[eluser]Unknown[/eluser]
The latest "stable" release it is called "soapclient", however the newest code in CVS it is changed to nusoap_client to avoid the conflict with the php5 soap library (whose client is called soapclient). I would strongly recommend getting the latest code out of cvs, as there have been MANY bug fixes and improvements since the latest full release (which was nearly 2 years ago!).


Nusoap CI Library - El Forum - 12-06-2007

[eluser]bigg-media[/eluser]
nusoap library for CI

http://codeigniter.com/wiki/CI_Nusoap_Library


Nusoap CI Library - El Forum - 12-11-2007

[eluser]WolfgangA[/eluser]
[quote author="bigg-media" date="1196985697"]nusoap library for CI

http://codeigniter.com/wiki/CI_Nusoap_Library[/quote]

I am actually looking for adding nusaop to CI so your link looks helful.
However, as suggested in another thread where you put this link too, it would be great if you would open a support thread.
Also some more information would be useful, since the wiki does not contain any and the download contains just one file.

Thanks

Wolfgang


Nusoap CI Library - El Forum - 02-14-2008

[eluser]Nathan Pitman (Nine Four)[/eluser]
Yea it would be great to see some simple examples added to the Wiki entry. Great work!