0
votes
           $ns   = "auth";
           $wsdl = "(http://example.com/api?wsdl)";

        //Create our Auth Object to pass to the SOAP service with our values

            $rand = rand(11111111,99999999);
            $srt = 'ABCD';

            $auth->username = 'hopp_api_user';
            $auth->digestkey = sha1($srt);
            $auth->nonce =  $rand;
            $auth->request_time = date('Y-m-d H:i:s');

            $login    = new SoapVar($auth, SOAP_ENC_OBJECT);

            $authenticate = new SoapHeader($ns,'userauthentication',$login, false);

            $client = new SoapClient($wsdl,array('cache_wsdl' => 0,'trace'=>1));

            $client->__setSoapHeaders(array($authenticate));


            $aaass ->offer_id ='322';
            $aaass ->username ='user';

            $obje   = new SoapVar($aaass, SOAP_ENC_OBJECT);

            $aaa = $client->offerActivationByOfferID($obje);

//////////////////////////////////////////////////////////////////////////////

SoapFault exception: [SOAP-ENV:Client] Error cannot find parameter in /var/www/html/hutch-alco/application/controllers/TestController.php:65 Stack trace: #0 /var/www/html/hutch-alco/application/controllers/TestController.php(65): SoapClient->__call('offerActivation...', Array) #1 /var/www/html/hutch-alco/application/controllers/TestController.php(65): SoapClient->offerActivationByOfferID(Object(SoapVar)) #2 /var/www/html/hutch-alco/library/Zend/Controller/Action.php(513): TestController->sujithAction() #3 /var/www/html/hutch-alco/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('sujithAction') #4 /var/www/html/hutch-alco/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #5 /var/www/html/hutch-alco/application/bootstrap.php(51): Zend_Controller_Front->dispatch() #6 /var/www/html/hutch-alco/public/index.php(8): require('/var/www/html/h...') #7

i got this error...

Could anyone help me please..........

1
I have this same problem... been trying to solve it all day... did you find a solution?user2109254
I followed this example... when getting the same error as you. getrouty.com/…user2109254
hi i change my std class like this /n $std = new stdClass(); $std->login = $string; and also add soap version like this $client = new SoapClient($wsdl,array('cache_wsdl' => 0,'trace'=>1,'soap_version' => SOAP_1_2)); after that i change my webservice authentication class input param type to string. then it works fine. please try this.sujith

1 Answers

0
votes

Add this in code, for not use wsdl cache

ini_set("soap.wsdl_cache_enabled", "0");
ini_set('soap.wsdl_cache_ttl', '0');