Answer the question
In order to leave comments, you need to log in
Why is it giving an error when making a request to the server via SOAP?
Hello.
I'm using SOAP to send requests to the server, but I'm getting an error.
The error itself is:
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in D:\OpenServer\domains\test\kargo\clilent-kargo.php:38 Stack trace: #0 [internal function]: SoapClient- >__doRequest('<?xml version="...', ' 89.208.1 ...', ' www.carg ...', 1, 0) #1 D:\OpenServer\domains\test\kargo\ clilent-kargo.php(38): SoapClient->__call('Tracking', Array) #2 {main} thrown in D:\OpenServer\domains\test\kargo\clilent-kargo.php on line
38
<?php
// проверяем наличие класса SoapClient
if (class_exists('SoapClient')){
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
// подключаемся к серверу
$client = new SoapClient(
'http://89.208.141.8/CargoMSK/ws/Web1C.1cws?wsdl',
array(
'login' => "web", // логин
'password' => "web", // пароль
'connection_timeout' => 1,
'cache_wsdl' => WSDL_CACHE_NONE
)
);
$a = array(
'login' => 'login',
'password' => 'pass',
'documents' => array(
'Key' => 'Documents',
'Properties' => array(
'Key' => 'DocumentType',
'Value' => 'Order',
'ValueType' => 'string'
),
'List' => array(array('Key' => '00-00000497004'))
),
'parameters' => array('Key' => 'parameters')
);
//print_r($client->__getFunctions());
$d = $client->Tracking($a);
print_r($d);
?>
print_r($client->__getFunctions());
$d = $client->Tracking($a);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question