php-SoapClient:canned';t从外部实体加载(端点解析到另一个位置)
我有一个类似于以下内容的WSDL: 它有这样一条线:php-SoapClient:canned';t从外部实体加载(端点解析到另一个位置),php,load,entity,external,soap-client,Php,Load,Entity,External,Soap Client,我有一个类似于以下内容的WSDL: 它有这样一条线: <wsdl:import namespace="http://name/space/service/" location="ServiceName.wsdl"></wsdl:import> 因此,在初始化SoapClient时,我得到以下错误: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://provider.web
<wsdl:import namespace="http://name/space/service/" location="ServiceName.wsdl"></wsdl:import>
因此,在初始化SoapClient时,我得到以下错误:
PHP Fatal error: SOAP-ERROR: Parsing WSDL:
Couldn't load from 'https://provider.web-service.domain/path/ServiceName.wsdl' :
failed to load external entity "https://provider.web-service.domain/path/ServiceName.wsdl"
目前我正试图用我的WSDL提供程序解决这个问题,但是有解决这个问题的方法吗
我猜唯一的解决方案是为他们提供一条实际指向可访问资源的路径。事实上我对此无能为力
你的想法
相关的:
- php SoapClient:无法从外部实体加载;到
- php SoapClient:无法从外部实体(端点解析到另一个位置)加载
[1] https://provider.web-service.domain/path/ServiceName?wsdl
以下位置有两个WSDL
[2] https://provider.web-service.domain/path/ServiceName/another/diff/path/prefix_ServiceName.wsdl
[3] https://provider.web-service.domain/path/ServiceName/another/diff/path/ServiceName.wsdl
- [1] 决定[2];然后
- [2] 进口[3]
将[2]传递到SoapClient()时,它可以工作 在过去的几年中,我必须做的事情,如果你真的想花时间在这件事上,你可以做的是:为soapclient创建一个包装类,并预处理wsdl。e、 g
class SoapClientCompatibility extends SoapClient{
public function __construct($wsdl, $options){
// do things here, like:
// download the wsdl using curl
// modify/check it, then hand it over as the $wsdl to parent::__construct
}
}
class SoapClientCompatibility extends SoapClient{
public function __construct($wsdl, $options){
// do things here, like:
// download the wsdl using curl
// modify/check it, then hand it over as the $wsdl to parent::__construct
}
}