Question

I'm trying to use nusoap to contact a distant webservice. i'm really disapointed because with soapUI it works. the url since i can see the functions proposed

Here is how i do

$this->_client = new SoapClient("urlwebservice?wsdl);
//at this line i can see all the method that i can use
echo '<pre>';print_r($this->_client->__getFunctions());echo '</pre>';
//this line doesn't work
$this->client->call('UpdateTest',array($myxml));

I can see this with the print_r of __getFunction [1] => UpdateLeadResponse UpdateTest(UpdateTest $parameters) Here is the stacktrace

#0 C:\WebSrv\htdocs\www.fgab.be\CallCenter\protected\modules\frontend\controllers\LeadController.php(192): GSoapClient->call('UpdateLead', Array)

1 [internal function]: LeadController->actionUpdate('IT1234')

2 C:\WebSrv\htdocs\yii\framework\web\actions\CAction.php(108): ReflectionMethod->invokeArgs(Object(LeadController), Array)

3 C:\WebSrv\htdocs\yii\framework\web\actions\CInlineAction.php(47): CAction->runWithParamsInternal(Object(LeadController), Object(ReflectionMethod), Array)

4 C:\WebSrv\htdocs\yii\framework\web\CController.php(308): CInlineAction->runWithParams(Array)

5 C:\WebSrv\htdocs\yii\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction))

6 C:\WebSrv\htdocs\yii\framework\web\filters\CFilter.php(40): CFilterChain->run()

7 C:\WebSrv\htdocs\yii\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain))

8 C:\WebSrv\htdocs\yii\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain))

9 C:\WebSrv\htdocs\yii\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))

10 C:\WebSrv\htdocs\yii\framework\web\CController.php(291): CFilterChain->run()

11 C:\WebSrv\htdocs\yii\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)

12 C:\WebSrv\htdocs\yii\framework\web\CWebApplication.php(282): CController->run('update')

13 C:\WebSrv\htdocs\yii\framework\web\CWebApplication.php(141): CWebApplication->runController('frontend/lead/u...')

14 C:\WebSrv\htdocs\yii\framework\base\CApplication.php(180): CWebApplication->processRequest()

15 C:\WebSrv\htdocs\www.fgab.be\CallCenter\index.php(13): CApplication->run()

16 {main}

thanks for your help because i turn arround

Was it helpful?

Solution

i found the solution

here is how i did it

$result = $cli->__soapCall('UpdateLead',array('UpdateLead'=>array("LogonInfo"=>array('Username' => Yii::app()->params['webservUser'], 'Password' => Yii::app()->params['webservPassword']),"LeadInfo"=>$lup)));

$lup is a class containing elements of object to update

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top