SOAP-ERROR: Parsing WSDL 🔌 API

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://x?wsdl' / SoapFault

The SOAP client couldn’t download or parse the WSDL — network/TLS issues, wrong URL, authentication, or invalid XML.

Seen on: REST API

Meaning

PHP SoapClient, Java JAX-WS and .NET clients fetch the WSDL first. Corporate proxies, self-signed certificates, IP allowlists or WSDLs importing other unreachable XSDs commonly break it.

Common causes

  • WSDL URL unreachable (firewall, IP allowlist)
  • TLS certificate not trusted
  • WSDL needs authentication
  • Imported XSD/WSDL files unreachable

⚡ Quick fix

  1. Download the WSDL with curl from the same server
  2. Fix trust/proxy settings
  3. Save the WSDL locally and point the client to the file

Detailed fix by platform

PHP

  1. $client = new SoapClient(__DIR__ . '/service.wsdl', ['location' => 'https://api.example.com/soap', 'cache_wsdl' => WSDL_CACHE_NONE, 'trace' => true]);

How to diagnose

  1. Fetch — curl the WSDL
  2. TLS — Certificate trusted?
  3. Imports — External references

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.