Howtoconsumethiswebservicesoapclientinphp???Itriedthecodebelowandgavethefollowingerror.
Code
$client=newSoapClient('http://www.smsviaweb.com.br/SMSVIAWEB.asmx?wsdl');$params=array('Login'=>'xxxxx','Senha'=>'xxxxx','Telefone'=>'xxxxx','Mensagem'=>'xxxxx');$client->__soapCall("Envia", $params);
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 SMSVIAWEB.Envia (OBJMsgSMSVW OBJMsg) --- End of inner exception stack trace ---
getFunctions
array(6) {
[0]=>
string(38) "EnviaResponse Envia(Envia $parameters)"
[1]=>
string(50) "EnviaLoteResponse EnviaLote(EnviaLote $parameters)"
[2]=>
string(62) "ExecutaImportResponse ExecutaImport(ExecutaImport $parameters)"
[3]=>
string(38) "EnviaResponse Envia(Envia $parameters)"
[4]=>
string(50) "EnviaLoteResponse EnviaLote(EnviaLote $parameters)"
[5]=>
string(62) "ExecutaImportResponse ExecutaImport(ExecutaImport $parameters)"
}
array(9) {
[0]=>
string(37) "struct Envia {
OBJMsgSMSVW OBJMsg;
}"
[1]=>
string(127) "struct OBJMsgSMSVW {
string Login;
string Senha;
string IDCliente;
string Telefone;
string Mensagem;
string DataAgenda;
}"