soap_client调用不起作用,因为我可以连接我

时间:2014-03-19 13:30:58

标签: php nusoap

我试图使用nusoap联系远程网络服务。 我真的很失望,因为使用soapUI它可以工作。因为我可以看到提议的功能

这是我的工作方式

$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));

我可以使用__getFunction的print_r看到这一点     [1] =&gt; UpdateLeadResponse UpdateTest(UpdateTest $ parameters) 这是stacktrace

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

1 [内部功能]:LeadController-&gt; actionUpdate(&#39; IT1234&#39;)

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

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

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

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

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

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

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

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

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

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

12 C:\ WebSrv \ htdocs \ yii \ framework \ web \ CWebApplication.php(282):CController-&gt; run(&#39; update&#39;)

13 C:\ WebSrv \ htdocs \ yii \ framework \ web \ CWebApplication.php(141):CWebApplication-&gt; runController(&#39; frontend / lead / u ...&#39;)

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

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

16 {main}

感谢您的帮助,因为我转过身来

1 个答案:

答案 0 :(得分:0)

我找到了解决方案

这是我怎么做的

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

$ lup是一个包含要更新的对象元素的类