• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nusoap CI Library

#1
[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.


Messages In This Thread
Nusoap CI Library - by El Forum - 06-28-2007, 10:27 AM
Nusoap CI Library - by El Forum - 07-02-2007, 03:48 AM
Nusoap CI Library - by El Forum - 07-02-2007, 07:35 AM
Nusoap CI Library - by El Forum - 12-06-2007, 12:01 PM
Nusoap CI Library - by El Forum - 12-11-2007, 07:02 PM
Nusoap CI Library - by El Forum - 02-14-2008, 10:16 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.