PHP Soap Object Reference not set to an instance of an Object

Asked

Viewed 118 times

0

I am trying to log in to a URL and the following error appears:

Object Reference not set to an instance of an Object.

Follows the code:

<?php
$clientSoap = new SoapClient( "http://www1.snd.com.br/Plugins/Atma.Plugin.Misc.ServiceAPI/Controllers/ServiceAPIEndpoint.svc?singleWsdl" );
$params = array('Login' => array(
                    'Usuario'   => 'usuario',
                    'Senha'     => 'senha'));


$result = $clientSoap->__soapCall('Login', $params);

print_r($result);      

?>

I’ve changed and tested several ways and always gives the same error.

  • I may be wrong, but apparently the name of the function to be called to login is 'Loginrequest' and not 'Login'. Try and see if this works. You can also call the function with $clientSoap->Loginrequest($params)

  • @Viniciusgabriel made the changes also does not work

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.