我正在尝试使用PHP和WSDL下载数据。
但是它不起作用:
$client = new SoapClient('https://uslugaterytws1.stat.gov.pl/wsdl/terytws1.wsdl');
我有错误:Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'https://uslugaterytws1.stat.gov.pl/wsdl/xsd0.xsd' in C:\xampp\htdocs\test\index.php:53 Stack trace: #0 C:\xampp\htdocs\test\index.php(53): SoapClient->SoapClient('https://uslugat...') #1
但是在SoapUI中,一切正常。我不知道为什么?
可能SoapUI会忽略此架构。可以在php中完成吗?
我有同样的问题-解决了!尝试添加到肥皂选项:
'keep_alive' => true,
'connection_timeout' => 5000,
'trace' => true,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,