{"record":{"id":"d6e4fc024f63d95f","repo":"pentaho/pentaho-kettle","slug":"could-not-load-wsdl-file-e-getmessage","errorCode":null,"errorMessage":"Could not load WSDL file:  + e.getMessage()","messagePattern":"Could not load WSDL file:  \\+ e\\.getMessage\\(\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/Wsdl.java","lineNumber":82,"sourceCode":"   * @param serviceQName\n   *          Name of the service in the WSDL, if null default to first service in WSDL.\n   * @param portName\n   *          The service port name, if null default to first port in service.\n   */\n  public Wsdl( URI wsdlURI, QName serviceQName, String portName ) throws AuthenticationException {\n    this( wsdlURI, serviceQName, portName, null, null );\n  }\n\n  public Wsdl( URI wsdlURI, QName serviceQName, String portName, String username, String password ) throws AuthenticationException {\n\n    this.wsdlURI = wsdlURI;\n    try {\n      _wsdlDefinition = parse( wsdlURI, username, password );\n    } catch ( AuthenticationException ae ) {\n      // throw this again since KettleException is catching it\n      throw ae;\n    } catch ( WSDLException e ) {\n      throw new RuntimeException( \"Could not load WSDL file: \" + e.getMessage(), e );\n    } catch ( KettleException e ) {\n      throw new RuntimeException( \"Could not load WSDL file: \" + e.getMessage(), e );\n    }\n    if ( serviceQName == null ) {\n      _service = (Service) _wsdlDefinition.getServices().values().iterator().next();\n    } else {\n      _service = _wsdlDefinition.getService( serviceQName );\n      if ( _service == null ) {\n        throw new IllegalArgumentException( \"Service: \"\n          + serviceQName + \" is not defined in the WSDL file \" + wsdlURI );\n      }\n    }\n\n    if ( portName == null ) {\n      _port = getSoapPort( _service.getPorts().values() );\n    } else {\n      _port = _service.getPort( portName );\n      if ( _port == null ) {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/Wsdl.java#L64-L100","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm the WSDL URL is correct and returns valid XML (open it in a browser; inspect the RuntimeException's cause for the underlying error)","Check network/proxy settings so the runtime can reach the host hosting the WSDL","Fix the WSDL itself if it is malformed or imports unresolvable XSDs","If authentication is required, supply correct username/password so the server stops returning error pages"],"exampleFix":"// before\nWsdl wsdl = new Wsdl(new URI(\"http://host/service?wsdl\"), null, null, null); // 404 page\n// after\nWsdl wsdl = new Wsdl(new URI(\"http://host/correct/path?wsdl\"), user, pass, null);","handlingStrategy":"try-catch","validationCode":"try (InputStream in = new URL(wsdlUri.toString()).openStream()) {\n  if (in.read() == -1) throw new IllegalStateException(\"Empty WSDL at \" + wsdlUri);\n}","typeGuard":null,"tryCatchPattern":"try {\n  Wsdl wsdl = new Wsdl(uri, user, pass, svcQName);\n} catch (RuntimeException e) {\n  logError(\"WSDL load failed for \" + uri + \": \" + e.getMessage(), e.getCause());\n  throw new KettleException(e);\n}","preventionTips":["Ping the WSDL URL with curl/browser before configuring the transform","Check that the response Content-Type is XML, not an HTML error page","Pre-download the WSDL and validate it locally before pointing the step at it","Configure proxy/VPN access if the endpoint is behind a corporate network"],"tags":["wsdl","network","parse-error","webservices"],"backgroundTag":"file-read-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}