pentaho/pentaho-kettle · error · RuntimeException

Could not load WSDL file: + e.getMessage()

Error message

Could not load WSDL file:  + e.getMessage()

What it means

Thrown from the Wsdl URI-based constructor when parse(wsdlURI, username, password) fails with a WSDLException or KettleException while fetching/parsing the WSDL document. The original cause is attached as the RuntimeException cause.

Solutions

  1. Confirm the WSDL URL is correct and returns valid XML (open it in a browser; inspect the RuntimeException's cause for the underlying error)
  2. Check network/proxy settings so the runtime can reach the host hosting the WSDL
  3. Fix the WSDL itself if it is malformed or imports unresolvable XSDs
  4. If authentication is required, supply correct username/password so the server stops returning error pages

Example fix

// before
Wsdl wsdl = new Wsdl(new URI("http://host/service?wsdl"), null, null, null); // 404 page
// after
Wsdl wsdl = new Wsdl(new URI("http://host/correct/path?wsdl"), user, pass, null);
Defensive patterns

Strategy: try-catch

Validate before calling

try (InputStream in = new URL(wsdlUri.toString()).openStream()) {
  if (in.read() == -1) throw new IllegalStateException("Empty WSDL at " + wsdlUri);
}

Try / catch

try {
  Wsdl wsdl = new Wsdl(uri, user, pass, svcQName);
} catch (RuntimeException e) {
  logError("WSDL load failed for " + uri + ": " + e.getMessage(), e.getCause());
  throw new KettleException(e);
}

Prevention

When it happens

Trigger: Constructing Wsdl with a wsdlURI whose document cannot be retrieved or parsed: invalid URI, unreachable host, non-WSDL content returned, or malformed XML; WSDLException and KettleException branches both raise this message.

Common situations: Wrong WSDL endpoint URL in the web services transform; server returns an HTML error page instead of WSDL; WSDL has schema/XSD imports that cannot be resolved; firewall or proxy blocking the request; TLS handshake failure.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/d6e4fc024f63d95f. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/Wsdl.java:82

   * @param serviceQName
   *          Name of the service in the WSDL, if null default to first service in WSDL.
   * @param portName
   *          The service port name, if null default to first port in service.
   */
  public Wsdl( URI wsdlURI, QName serviceQName, String portName ) throws AuthenticationException {
    this( wsdlURI, serviceQName, portName, null, null );
  }

  public Wsdl( URI wsdlURI, QName serviceQName, String portName, String username, String password ) throws AuthenticationException {

    this.wsdlURI = wsdlURI;
    try {
      _wsdlDefinition = parse( wsdlURI, username, password );
    } catch ( AuthenticationException ae ) {
      // throw this again since KettleException is catching it
      throw ae;
    } catch ( WSDLException e ) {
      throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e );
    } catch ( KettleException e ) {
      throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e );
    }
    if ( serviceQName == null ) {
      _service = (Service) _wsdlDefinition.getServices().values().iterator().next();
    } else {
      _service = _wsdlDefinition.getService( serviceQName );
      if ( _service == null ) {
        throw new IllegalArgumentException( "Service: "
          + serviceQName + " is not defined in the WSDL file " + wsdlURI );
      }
    }

    if ( portName == null ) {
      _port = getSoapPort( _service.getPorts().values() );
    } else {
      _port = _service.getPort( portName );
      if ( _port == null ) {

View on GitHub (pinned to f3058517a1)