0

This is the error I get:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://subdomain.example.com:105/Example/Example.asmx?WSDL' : failed to load external entity "http://subdomain.example.com:105/Example/Example.asmx?WSDL"

as a result of this request:

$client = new SoapClient('http://subdomain.example.com:105/Example/Example.asmx?WSDL');

WHAT I TRIED:

  1. Accessing this exact resource from my localhost or web browser also works.

  2. Accessing other resources which don't have :105 works (if that could matter).

  3. Tried to do socket_create_listen(105) but gotten "Permission denied" error. Then tried to enable Port 105 via WHM by adding it firewall to the list of ports (IPv4, IPv4, TCP and UDP). All that still didn't work and there was no response from port 105.

  4. allow_url_fopen is switched On.

  5. default_socket_timeout is set to 300.

  6. Tried this answer: https://stackoverflow.com/a/7118802 (parameters that I changed are URL and port - which I changed to 105. Other parameters I've left literally identical, maybe that was a mistake?)

  7. As per some other SO answers, tried using https instead, doesn't work. Tried adding www. but that URL doesn't even exist.

  8. Tried echoing file_get_contents() as per this answer: https://stackoverflow.com/a/14729295/525445 - it gives me a blank screen.

  9. Tried this: Fatal error: Uncaught SoapFault exception: [WSDL] which has resulted in

Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host

  1. Tried fetching it with cURL, as suggested here: https://stackoverflow.com/a/5311925/525445 The response I got is bool(false)
Community
  • 1
  • 1
CodeVirtuoso
  • 6,318
  • 12
  • 46
  • 62

1 Answers1

0

I had the exactly same problem today. In my case, the reason lied some steps higher. It's a magento installation and it didn't work, because i didn't whitelist api calls (even though I whitelisted my IP, what strangely wasn't enough). For me, the fix:

if (file_exists($maintenanceFile) && !in_array($ip, $allowed) && !strstr($_SERVER['REQUEST_URI'], 'v2_soap')) {
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}

did it.

Should you NOT use magento, this could be nonetheless interesting for you, as it shows, that the reason can lay on a index or a htaccess file, layers above the wdsl itself. With the browser i could access the address, just like you. So maybe there's a controll switch in your system, that kills the request.

xanobius
  • 148
  • 7