drmgg4411 2019-06-28 11:41
浏览 100

调用方法“服务器无法处理请求”时出现肥皂错误。

Having this wsdl url

https://backoffice.voipinnovations.com/Services/APIService.asmx?wsdl

Trying to call the SendSMS API method, getting the following error

Fatal Error: Uncaught SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object. at VIBackOffice.Services.APIService.SendSMS(String login, String secret, String sender, String recipient, String message)

This is how i do it with PHP

$client = new SoapClient('https://backoffice.voipinnovations.com/Services/APIService.asmx?wsdl', ["trace" => 1]);
$params = [
"login"     => 'login',
"secret"    => 'secret',
"sender"    => 'sender',
"recipient" => 'recipient',
"message"   => 'message'
];

$result = $client->SendSMS($params);
//or
$result = $client->__soapCall("SendSMS", $params);
//or even
$result = $client->SendSMS('login', 'secret', 'sender', 'recipient', 'message');

Whatever i tried, it failed with that error. Is it the way i form my request body, or is it the service's API?

Edit: Using single quotes for param keys worked.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 CreateBitmapFromWicBitmap内存释放问题。
    • ¥30 win c++ socket
    • ¥15 CanMv K210开发板实现功能
    • ¥15 C# datagridview 栏位进度
    • ¥15 vue3页面el-table页面数据过多
    • ¥100 vue3中融入gRPC-web
    • ¥15 kali环境运行volatility分析android内存文件,缺profile
    • ¥15 写uniapp时遇到的问题
    • ¥15 vs 2008 安装遇到问题
    • ¥15 matlab有限元法求解梁带有若干弹簧质量系统的固有频率