我可以通过curl加载wsdl文件,但不能通过SoapClient加载.我不知道为什么


I am able to load an wsdl file through curl .but not through SoapClient. I am not sure why?

获取以下soap错误

"SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSource
Transaction_1.25.wsdl' : failed to load external entity 
"https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.25.wsdl

这是代码:

<?php
     $opts = array(
          'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false,                  'verify_peer_name'=>false)
       );
        // SOAP 1.2 client
       $params = array ('encoding' => 'UTF-8', 'verifypeer' => false, 'verifyhost' => false, 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' =>  1, "connection_timeout" => 180, 'stream_context' => stream_context_create($opts)       );
    $url = "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.26.wsdl";
      try{
         $client = new SoapClient($url,$params );
         var_dump($client);
     }
     catch(SoapFault $fault) {
          echo '<br>'.$fault;
     }
?>

我用这段代码列出了函数:

$url = "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.26.wsdl";
$client = new SoapClient($url);
var_dump($client->__getFunctions());

这就提供了一个功能:

array(1) {
  [0]=>
  string(50) "ReplyMessage runTransaction(RequestMessage $input)"
}