System.Web.Services.Protocols.SoapException:服务器无法处理请求 - laravel

时间:2017-01-26 05:11:51

标签: laravel laravel-5 soap-client

我想将一些参数发送到Asp网络服务。但我收到此消息错误(我正在尝试使用我的localhost):

  System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
  at Service.SendSms(String cUserName, String cPassword, String cBody, String cSmsnumber, String cGetid, Int32 nCMessage, Int32 nTypeSent, String m_SchedulDate, String cDomainname, String cFromNumber, Int32 nSpeedsms, Int32 nPeriodmin, String cstarttime, String cEndTime)
  --- End of inner exception stack trace ---

我的代码:

  $parms['username'] = '***';
  $parms['password'] = '***';
  $parms['smsbody'] = 'test';
  $parms['smsNumber'] = '*****';
  $parms['Getid'] = '0';
  $parms['nCMessage'] = '1';
  $parms['cDomainName'] = '****';
  $parms['nTypeSent'] = '2';
  $parms['nSpeedsms'] = '';
  $parms['nPeriodmin'] = '';

  $client = new SoapClient("http://www.mehrafraz.com/webservice/service.asmx?wsdl");
  $status = $client->SendSms($parms); // error line

  dd($status);

0 个答案:

没有答案