pentaho/pentaho-kettle · error · KettleStepException
Wsdl.Error.MissingSchemaException
Wsdl.Error.MissingSchemaException
Error message
Wsdl.Error.MissingSchemaException
What it means
WsdlTypes.findNamedElement(QName) first resolves the schema for the element's namespace URI. If no <schema> with that targetNamespace was collected while parsing the WSDL, a KettleStepException with message key Wsdl.Error.MissingSchemaException is thrown, because the element cannot be searched for without its schema.
Solutions
- Ensure all <xsd:import>/<xsd:include> schema locations referenced by the WSDL are reachable (network/proxy access) so their namespaces get registered.
- Compare the QName's namespace URI character-by-character against the schema's targetNamespace in the WSDL (trailing slash, http vs https).
- Download imported XSDs locally and rewrite the WSDL imports to local paths before loading.
- Verify the WSDL itself declares a schema for the namespace instead of relying on a remote default.
Example fix
// before
QName el = new QName("http://example.com/types", "Address"); // namespace with no schema in WSDL
wsdlTypes.findNamedElement(el);
// after — use the namespace that matches an actual <schema targetNamespace>
QName el = new QName("http://example.com/types/v1", "Address");
wsdlTypes.findNamedElement(el); Defensive patterns
Strategy: validation
Validate before calling
// Confirm a schema for the namespace exists before lookup
if (wsdlTypes.getSchema(elementName.getNamespaceURI()) == null) {
throw new IllegalArgumentException("No schema loaded for namespace: " + elementName.getNamespaceURI());
}
wsdlTypes.findNamedElement(elementName); Try / catch
try {
Element el = wsdlTypes.findNamedElement(qname);
} catch (KettleStepException kse) {
if (kse.getMessage() != null && kse.getMessage().contains("MissingSchema")) {
logError("Schema not loaded for namespace " + qname.getNamespaceURI() + " — check xsd:import reachability", kse);
}
throw kse;
} Prevention
- Make all xsd:import locations reachable at parse time
- Match namespace URIs exactly (trailing slash, http vs https)
- Bundle imported XSDs locally when behind firewalls
When it happens
Trigger: Calling findNamedElement with a QName whose namespace URI has no corresponding <xsd:schema targetNamespace="..."> in the loaded WSDL/schemas — e.g., an element defined in an imported schema that was not fetched or not parsed.
Common situations: The WSDL imports XSDs by URL and the import was not retrievable at parse time; the namespace URI is mistyped or differs by trailing slash; the element lives in a separate schema document that the WSDL parser did not load (no network access to imported XSDs).
Related errors
- Wsdl.Error.ElementMissingException
- Could not retrieve WSDL Operator for operation name: +…
- invalid element: + e.getNodeName()
- Invalid part count for fault!!
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/4d1ae2c0b1456d64.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/WsdlTypes.java:78
_elementFormQualifiedNamespaces = new HashSet<String>( getElementFormQualifiedNamespaces() );
_namedComplexTypes = new WsdlComplexTypes( this );
}
/**
* Find a named <element> in the types section of the WSDL.
*
* @param elementName
* Name of element to find.
* @return The element node.
* @throws KettleStepException
* If schema or element in schema can't be found for the given element name
*/
protected Element findNamedElement( QName elementName ) throws KettleStepException {
Element namedElement = null;
Schema s = getSchema( elementName.getNamespaceURI() );
if ( s == null ) {
throw new KettleStepException( BaseMessages
.getString( PKG, "Wsdl.Error.MissingSchemaException", elementName ) );
}
Element schemaRoot = s.getElement();
List<Element> elements = DomUtils.getChildElementsByName( schemaRoot, WsdlUtils.ELEMENT_NAME );
for ( Element e : elements ) {
String schemaElementName = e.getAttribute( WsdlUtils.NAME_ATTR );
if ( elementName.getLocalPart().equals( schemaElementName ) ) {
namedElement = e;
break;
}
}
if ( namedElement == null ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "Wsdl.Error.ElementMissingException", elementName ) );
}View on GitHub (pinned to f3058517a1)