1

I have this code:

<?php
$login = '';
$password = '';
$session = new SoapClient("https://mybilling.telinta.com/wsdl/SessionAccountService.wsdl");

echo '<pre>';
print_r($session->__getFunctions());
$session_id = $session−>login($login, $password);

And this gives me this output:

Array
(
    [0] => int ping(string $session_id)
    [1] => string logout(string $session_id)
    [2] => string login(string $user, string $password)
)


Fatal error:  Call to undefined function login() in C:\.... on line 14

Why error is produced ?

fico7489
  • 7,931
  • 7
  • 55
  • 89
  • The code works on my pc. I could not find any error. – tino.codes Nov 10 '15 at 13:44
  • I find error, problem is that I copy code from pdf and some invisible character was before "l" in login. – fico7489 Nov 10 '15 at 13:58
  • From here: http://stackoverflow.com/questions/16102422/php-webservice-error-soapclient: Try this: `$session->__soapCall("login", $data);` Where `$data` is an array containing the parameters? – Antfie Feb 02 '16 at 14:32

1 Answers1

0

I had this problem when Soap was not enabled on php.

sudo apt-get install php7.4-soap 
sudo systemctl restart apache2

change 7.4 to your version or for other ways to enable Soap look stack over flow enable soap question

Leo
  • 1,495
  • 23
  • 41