WDSL连接超时(1006)

时间:2019-03-08 07:27:12

标签: php nusoap wds

如果我消耗WDSL格式的数据,请使用带有php编程的Nusoap Libary遇到问题。我收到了这样的错误:HTTP错误:无法打开与服务器http://x.x.x.x/aaa.php的套接字连接,错误(10060):连接尝试失败,因为一段时间后连接方未正确响应,或者建立的连接失败因为连接的主机无法响应。

这是我的代码

<?php

require 'nusoap/src/nusoap.php';

$wsdl="https://x.x.x.x/x.php?wsdl";
$username = "aa";
$password  = "bb";

$client =new nusoap_client($wsdl,true);
$client->setCredentials($username,$password);
$proxy = $client->getProxy();
$error  = $client->getError();

if ($error) 
{
    echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
}

$result = $client->call("GetSOAPLPelaut", array("type" => "Main"));

if ($client->fault) 
{
    echo "<h2>Fault</h2><pre>";
    print_r($result);
    echo "</pre>";
} 
else 
{
    $error = $client->getError();
    if ($error) 
    {
        echo "<h2>Error</h2><pre>" . $error . "</pre>";
    } 
    else 
    {
        echo "<h2>Main</h2>";
        echo $result;
    }
}

echo "<h2>Request</h2>";
echo "<pre>" . htmlspecialchars($client->request, ENT_QUOTES) . "</pre>";
echo "<h2>Response</h2>";
echo "<pre>" . htmlspecialchars($client->response, ENT_QUOTES) . "</pre>";

也许有人对此有解决方案?

0 个答案:

没有答案