pentaho/pentaho-kettle · error · IllegalArgumentException
Service: + serviceQName + is not defined in the WSDL file.
Error message
Service: + serviceQName + is not defined in the WSDL file.
What it means
Guard in the Wsdl constructor: a service QName was supplied, but the parsed WSDL definition contains no service under that name. The IllegalArgumentException names the requested service and the WSDL URI so the mismatch can be corrected.
Solutions
- Copy the exact service name and targetNamespace from the loaded WSDL into the configuration
- Dump available services from the Definition (getServices().keySet()) to see valid QNames
- Verify the locator actually fetches the intended WSDL (log the resolved URI)
- Update the transform metadata after any provider-side WSDL change
Example fix
// before
QName svc = new QName("http://old.example.com/", "MyService");
// after
QName svc = new QName("http://new.example.com/v2/", "MyServiceV2"); // from current WSDL Defensive patterns
Strategy: validation
Validate before calling
Definition d = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlUrl);
Set<QName> names = d.getServices().keySet();
if (!names.contains(serviceQName)) throw new IllegalArgumentException("Service not found; available: " + names); Try / catch
try {
Wsdl wsdl = new Wsdl(loc, serviceQName, portName, user, pass);
} catch (IllegalArgumentException e) {
logError("Service not in WSDL: " + e.getMessage());
throw e;
} Prevention
- Regenerate the service QName from the latest WSDL whenever it changes
- Diff old vs new WSDL targetNamespace after provider upgrades
- Pin to a frozen copy of the WSDL for stability across releases
- Log d.getServices().keySet() to discover valid QNames at runtime
When it happens
Trigger: new Wsdl(wsdlLocator, serviceQName, portName, ...) where serviceQName's namespace/local-part does not match any service definition in the located WSDL.
Common situations: Stale service name after WSDL regeneration; namespace mismatch (targetNamespace changed by the provider); wrong WSDL loaded by a misconfigured locator.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Port: + portName + is not defined in the service: +…
- Service: + serviceQName + is not defined in the WSDL file…
- Cannot find WSDL file: + _wsdlName
- Could not load WSDL file: + e.getMessage()
- Could not retrieve WSDL Operator for operation name: +…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5c955771ed42e304.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/Wsdl.java:161
}
public Wsdl( WSDLLocator wsdlLocator, QName serviceQName, String portName, String username, String password ) throws AuthenticationException {
// load and parse the WSDL
try {
_wsdlDefinition = parse( wsdlLocator, username, password );
} catch ( AuthenticationException ae ) {
// throw it again or KettleException will catch 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 );
}
_service = _wsdlDefinition.getService( serviceQName );
if ( _service == null ) {
throw new IllegalArgumentException( "Service: " + serviceQName + " is not defined in the WSDL file." );
}
_port = _service.getPort( portName );
if ( _port == null ) {
throw new IllegalArgumentException( "Port: " + portName + " is not defined in the service: " + serviceQName );
}
_wsdlTypes = new WsdlTypes( _wsdlDefinition );
_operationCache = new HashMap<String, WsdlOperation>();
}
/**
* Get the WsdlComplexTypes instance of this wsdl. WsdlComplex types provides type information for named complextypes
* defined in the wsdl's <types> section.
*
* @return WsdlComplexTypes instance.
*/
public WsdlComplexTypes getComplexTypes() {View on GitHub (pinned to f3058517a1)