i want to implement SOAP in my Slim Application. I have a local server where i can get the WSDL.
When i try to submit the URL (http://local.uri.de/api/soap?wsdl=1) via postman, everything works fine an it returns the SOAP schema. Started with:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions.....
In my application i use SoapClient, and i add the URL and some parameters.
$soapOptions = array( 'soap_version' => SOAP_1_2, 'trace' => true, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS );
so it looks like:
new SoapClient($url, $soapOptions);
The Reponse i become is an 500 Error.
“description”: "SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://local.uri.de/api/soap?wsdl=1’ : failed to load external entity "http://local.uri.de/api/soap?wsdl=1"\n"
I checked SOAP and it was enabled.
Has anyone an idea why WSDL not work? Is there any important CORS settings or server settings?
I try the tool SoapUI and everything works like a charme. So the url is valid. But by using SoapClient in PHP the error above occur.