简体   繁体   中英

Object reference not set to an instance of an object

It tells me that Object reference not set to an instance of an object , when trying to call this SOAP API.

在此处输入图片说明

I am doing this way

$client = new    SoapClient("http://gateway.XXXXXXX/gateway/api/creditcards/creditcardAPI.asmx?wsdl");

$params = array("clsCreditCardAPIBE" => (Object) array(
   "Username" => 'blabla',
   "Password" => "Barrel of Oil",
   "ProviderPIN" => 500,
   "AccountID" => 1234
    .......
));


$response = $client->__soapCall("Initiate_Deposit", $params);

What am i doing wrong?

您必须先生成客户端,然后再开始使用它

$client = new SoapClient("http://yourdomain.com?wsdl");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM