我正在尝试连接并使用带有PHP和SoapClient的WebService,但收到以下错误
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Error cannot find parameter in /www/1/html/webservices/tuev-nord-ass/soapclientconnect.php:21
我已经安装了SOAP。但仍然不知道为什么我得到这个错误。我是Web服务的新手,可能在某处犯了错误。
WSDL链接:
http://www.schwackenet.de/awonline/de/service2/SNWebService.php?wsdl
我的代码:
<?php
ini_set("soap.wsdl_cache_enabled", "0");
ini_set('soap.wsdl_cache_ttl', '0');
$wsdl = 'http://www.schwackenet.de/awonline/de/service2/SNWebService.php?wsdl';
$options = array('trace' => true);
$client = new SoapClient($wsdl,
array(
'Benutzer' => 'desenbeck',
'Kennwort' => 'desenbeck',
'KonzernID' => '100',
'Händler-Nr' => 'INT31303',
'DMS-ID' => 'A13T2D19',
'encoding'=> 'ISO-8859-1'
)
);
//Returns list of available SOAP functions described in the WSDL for the Web service.
var_dump($client->__getFunctions());
//some parameters to send
$result = $client->Login('Benutzer', 'Kennwort', 'KonzernID', 'Händler-Nr', 'DMS-ID');
var_dump($result);
?>
答案 0 :(得分:0)
对参数使用字符串索引数组:
$param = array ('user' => 'test',
'password' => 'test',
'corporate_group_id' => 'test',
'dealer_number' => 'test',
'dms_id' => 'test',
'dms_image_url' => 'test',
'dms_keepalive_url' => 'test',
'dms_followup_url' => 'test');
//some parameters to send
$result = $client->Login($param);