Home > Backend Development > PHP Tutorial > javascript - What is the problem with Uncaught SoapFault exception when calling the interface?

javascript - What is the problem with Uncaught SoapFault exception when calling the interface?

WBOY
Release: 2023-03-02 14:10:01
Original
1878 people have browsed it

1. When calling the interface, the error is reported as follows

2,

<code>Fatal error:  Uncaught SoapFault exception: [HTTP] Could not connect to host in D:\xampp\htdocs\price\index1.php:36
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://218.93.1...', 'http://tempuri....', 1, 0)
#1 D:\xampp\htdocs\price\index1.php(36): SoapClient->__call('GetDXCSList', Array)
#2 D:\xampp\htdocs\price\index1.php(36): SoapClient->GetDXCSList('2016-10-21')
#3 {main}
  thrown in D:\xampp\htdocs\price\index1.php on line 36
</code>
Copy after login
Copy after login

3, the source code is as follows

<code><?php

$client = new SoapClient("http://218.93.114.150:12004/WebServiceJGT.asmx?WSDL");

echo "<pre class="brush:php;toolbar:false">";


var_dump($client->GetDXCSList('2016-10-21'));


echo "
";
Copy after login
Copy after login
<code>?></code>
Copy after login
Copy after login

Reply content:

1. When calling the interface, the error is reported as follows

2,

<code>Fatal error:  Uncaught SoapFault exception: [HTTP] Could not connect to host in D:\xampp\htdocs\price\index1.php:36
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://218.93.1...', 'http://tempuri....', 1, 0)
#1 D:\xampp\htdocs\price\index1.php(36): SoapClient->__call('GetDXCSList', Array)
#2 D:\xampp\htdocs\price\index1.php(36): SoapClient->GetDXCSList('2016-10-21')
#3 {main}
  thrown in D:\xampp\htdocs\price\index1.php on line 36
</code>
Copy after login
Copy after login

3, the source code is as follows

<code><?php

$client = new SoapClient("http://218.93.114.150:12004/WebServiceJGT.asmx?WSDL");

echo "<pre class="brush:php;toolbar:false">";


var_dump($client->GetDXCSList('2016-10-21'));


echo "
";
Copy after login
Copy after login
<code>?></code>
Copy after login
Copy after login

Could not connect to host, isn’t it obvious?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template