M
M
Mrcus4D2020-11-25 14:48:20
PHP
Mrcus4D, 2020-11-25 14:48:20

Error 500 when sending request to Soap API client?

<?php
$wsdl_url=' api.vtt.ru:8048/Portal.svc? singleWsdl '; //link to access the API
$login='Admin'; // login
$password='Demo'; // password
$data = load_data();
write_to_log("Product details received. Total items ".count($data->GetItemsResult->ItemDto));
function load_data()
{
global $wsdl_url, $login, $password;
$params=array("login" => $login , "password" => $password);
try
{
$client = new SoapClient($wsdl_url, $params, ['trace' => true]);
$dates = $client->GetItems($params);
return $dates;
catch (SoapFault $E)
{
write_to_log("Error: ".$E->faultstring);
die;
}
}

//var_dump($client->__getLastRequestHeaders());
//var_dump($client->__getLastResponse());
//var_dump($client->__getLastResponseHeaders());

?>

Everything seems to be correct, but it gives an error 500. I read on the Internet but did not find an answer to this ... Help me find the problem? why is it giving a 500 error

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question