我正在设置对此link中配置的API的SOAP调用,但是当我在本地主机上运行索引时,会返回以下错误。
$_WsdlUri='http://api.connect-cargo.com/api.php?WSDL';
public static function _Call($method,$param){
//add by Marcius
$options = array(
'cache_wsdl' => 0,
'trace' => 1,
'stream_context' => stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
))
);
if(is_null(self::$_Server))
self::$_Server=new SoapClient(self::$_WsdlUri,$options);
return self::$_Server->__soapCall($method,$param);
}
}
127.0.0.1:53250 [500]:/-未捕获的SoapFault异常:[WSDL] SOAP错误:解析WSDL:缺少'shipmentData'的名称 在/var/www/html/SoapHodieSoapClient.php:41堆栈跟踪中:
0 /var/www/html/SoapHodieSoapClient.php(41):SoapClient-> SoapClient('http://api.conn ...',数组)
1 /var/www/html/SoapHodieSoapClient.php(57):SoapHodieSoapClient :: _ Call('shipmentData',Array)
2 /var/www/html/index.php(103):SoapHodieSoapClient-> shipmentData(Object(Shipment),
我看到了一些答案,并查看了php Wiki上的配置,但是我什么都没做。
SOAP-ERROR: Parsing WSDL: Couldn't load from - but works on WAMP
这是我的PHP版本:
PHP 7.2.24-0ubuntu0.18.04.1(cli)(建立:2019年10月28日12:07:07)(NTS )版权所有(c)1997-2018 The PHP Group Zend Engine v3.2.0,Copyright (c)1998-2018年Zend Technologies 与Zend OPcache v7.2.24-0ubuntu0.18.04.1,版权所有(c)1999-2018,Zend Technologies
有人可以帮助我,告诉我我做错了什么吗?