使用 PHP 和 WSDL 下载数据不起作用,但在 SoapUI 中它可以工作



我正在尝试使用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:xampphtdocstestindex.php:53 Stack trace: #0 C:xampphtdocstestindex.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,

这是他们的系统问题。问题已解决。

最新更新