Welcome Guest, Not a member yet? Register   Sign In
Webservices
#2

[eluser]shaffick[/eluser]
I dont know...I imagine (if i remember nusoap correctly) it would go something like this.....maybe? just use it as a library. call it from your controllers, that's an option.

Code:
class SoapWoot {

    var $soapFile         = '/PATH_TO_NUSOAP/nusoap.php';
    var $wsdlUrl         = 'URL_TO_WEBSERVICES';
    var $wsdlOptions    = array('trace' => 1, 'exceptions' => 1);
    var $wsdlUsername    = '';
    var $wsdlPassword    = '';
    var $soapObj        = NULL;
    var $errorString  = NULL;
    // add more stuff here, maybe
    
    function SoapWoot() {
        
        require_once($this->soapFile);
        $proxy = new SoapClient2($this->$wsdlUrl, $this->wsdlOptions);  // for php5, use new SoapClient() for php < 5
        $this->soapObj = $proxy->GetProxy();
        $this->soapObj->setCredentials($this->wsdlUsername, $this->wsdlPassword);  // depends on the webservice used
    
    }
    
    function webServiceFunctionToCall($params) {
        // do stuff here
    }
    
}


Messages In This Thread
Webservices - by El Forum - 08-27-2008, 05:56 PM
Webservices - by El Forum - 08-27-2008, 07:10 PM
Webservices - by El Forum - 08-27-2008, 07:35 PM
Webservices - by El Forum - 08-27-2008, 08:02 PM
Webservices - by El Forum - 08-27-2008, 08:38 PM
Webservices - by El Forum - 08-28-2008, 02:35 PM
Webservices - by El Forum - 08-29-2008, 10:23 AM
Webservices - by El Forum - 03-27-2009, 03:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB