[英]PHP : SOAP-ERROR: Parsing WSDL
我正在尝试使用soapClient()访问SOAP API,但是我遇到了以下错误。
SoapFault Object
(
[message:protected] => SOAP-ERROR: Parsing WSDL: No element with name '10100/Processes/OrderView/OrderView_v1_0?wsdl'
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => C:\xampp\htdocs\api\soap\client.php
[line:protected] => 37
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => C:\xampp\htdocs\api\soap\client.php
[line] => 37
[function] => SoapClient
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => https://example.com:443/orders/v1/orderview?wsdl
[1] => Array
(
[trace] => 1
[stream_context] => Resource id #4
[cache_wsdl] => 0
)
)
)
)
[previous:Exception:private] =>
[faultstring] => SOAP-ERROR: Parsing WSDL: No element with name '10100/Processes/OrderView/OrderView_v1_0?wsdl'
[faultcode] => WSDL
)
下面是我的代码:
$header = 'Authorization:'.$tokenType.' '.$accessToken;
$streamContext = array('http' => array("header" => $header , 'user_agent' => 'PHPSoapClient' ));
$streamContext['ssl'] = array(
"verify_peer" => false,
"verify_peer_name" => false,
"allow_self_signed" => false
);
try{
$client = new SoapClient('https://example.com:443/orders/v1/orderview?wsdl', array(
"trace" => 1,
"stream_context" => stream_context_create($streamContext),
'cache_wsdl' => WSDL_CACHE_NONE
));
var_dump($client->__getFunctions());
exit;
使用php_curl()可以正常工作并获得响应,但是在尝试与soapClient连接时出错。
C:\\ xampp \\ htdocs \\ api \\ soap \\ client.php的第37行做什么? 那可能不是问题所在,但可能有助于理解错误消息。
从参数数组中删除stream_context参数是否有效?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.