1

i want get data from a webserver (.net) and display it into my website.

my code is :

$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection(); 

$user = array('UserName' => 'etc');
$pass = array('Password' => 'etc');

$result = $client->call('Board', $user, $pass);

print_r( $result );

and i get this error :

Warning: Illegal offset type in isset or empty in /home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php on line 7211

Array ( [faultcode] => soap:Server [faultstring] => Server was unable to process request. ---> String reference not set to an instance of a String. Parameter name: s [detail] => )

1 Answer 1

1
$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection(); 

$user = array('UserName' => 'etc', 'Password' => 'etc'); use like this its will work
//$pass = array('Password' => 'etc'); // wrong

$result = $client->call('Board', $user, $pass);

print_r( $result );
Sign up to request clarification or add additional context in comments.

1 Comment

Please add more info about why is wrong, not only mark/change it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.