I’am using Docker container to create a SOAP server inside it. My external PHP script trying to get response from SOAP server, but receive an error
SOAP-ERROR: Parsing WSDL: Couldn't load from... failed to load external entity.
If I’am getting http://domain.loc:8080/api/soap?wsdl from browser, I receive a correct WSDL.
PHP script is
try {
$client = new SoapClient('http://domain.loc:8080/api/soap?wsdl', [
'uri' => 'http://schemas.xmlsoap.org/soap/envelope/',
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
'soap_version' => SOAP_1_1,
'cache_wsdl' => WSDL_CACHE_NONE,
'connection_timeout' => 60,
'trace' => true,
'encoding' => 'UTF-8',
'exceptions' => false,
'verifypeer' => false,
'verifyhost' => false,
]);
$params = new SoapVar('<options>...</options>', XSD_ANYXML);
$result = $client->getSOAPMethod($params);
var_dump($client->__getLastRequest());
var_dump($result);
} catch (SoapFault $exception) {
echo $exception->getMessage();
}
How someone explain to me where is a trouble?