2014-07-16 11:46
浏览 55

使用SoapClient PHP无法连接

I am trying to connect and use a WebService with PHP and SoapClient, but getting the following error

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Error cannot find parameter in /www/1/html/webservices/tuev-nord-ass/soapclientconnect.php:21 

I have SOAP already installed. But still dont know why i am getting this error. I am new to web services and might be doing mistake somewhere.

WSDL link:

My code:

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

$wsdl = '';

$options = array('trace' => true);
$client = new SoapClient($wsdl, 
'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. 
//some parameters to send
$result = $client->Login('Benutzer', 'Kennwort', 'KonzernID', 'Händler-Nr', 'DMS-ID');
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douyuben9434 2014-07-17 06:12

    Use a string indexed array for parameter:

    $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);
    点赞 打赏 评论

相关推荐 更多相似问题