pentaho/pentaho-kettle · error · RuntimeException
invalid element: + e.getNodeName()
Error message
invalid element: + e.getNodeName()
What it means
The WsdlOpParameter constructor maps a WSDL <part> (or element) DOM node to a parameter object. It recognizes nodes that either have an element-reference attribute or a name attribute; a node with neither throws RuntimeException "invalid element: <nodeName>". This indicates the WSDL contains an element shape the parameter mapper does not understand.
Solutions
- Open the WSDL at the referenced element and ensure it declares either name="..." (with type) or element="..." on the part/element.
- Regenerate the WSDL from the service tooling rather than hand-editing, so required attributes are emitted.
- Validate the WSDL with a validator (e.g., wsimport / xmlspy) to catch malformed elements before loading them in Pentaho.
- If the element is genuinely unsupported, refactor the WSDL contract to use standard document/literal wrapped style.
Example fix
<!-- before (invalid: part has no name or element ref) --> <part xmlns="http://schemas.xmlsoap.org/wsdl/" type="xsd:string"/> <!-- after --> <part name="payload" type="xsd:string"/>
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the element node declares name or element-ref before constructing
if (!e.hasAttribute("element") && !e.hasAttribute("name")) {
throw new IllegalArgumentException("Element '" + e.getNodeName()
+ "' has neither 'element' nor 'name' attribute — fix the WSDL first");
} Try / catch
try {
WsdlOpParameter p = new WsdlOpParameter(e, wsdlTypes);
} catch (RuntimeException re) {
if (re.getMessage() != null && re.getMessage().startsWith("invalid element:")) {
logError("Unsupported WSDL element structure at <" + e.getNodeName() + ">; check name/element attributes", re);
}
throw re;
} Prevention
- Regenerate WSDLs from tooling instead of hand-editing
- Validate WSDL/XSD with a schema validator before loading
- Inspect the offending element's attributes in the raw WSDL
When it happens
Trigger: Constructing WsdlOpParameter from an org.w3c.dom.Element that lacks both WsdlUtils.ELEMENT_REF_ATTR (element=) and WsdlUtils.NAME_ATTR (name=) — e.g., a malformed or nonstandard <part>/<element> in the WSDL.
Common situations: Vendor-generated WSDLs with exotic constructs (e.g., parts declared only via type= with unusual attributes the parser doesn't expect); hand-edited WSDL where the name attribute was deleted; schema-level elements that are only referenced anonymously.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- AnalyticQueryMeta.Exception.UnableToLoadStepInfoFromXML
- Could not retrieve WSDL Operator for operation name: +…
- Error_0001
- ERROR_0001
- Error loading transformation executor details from XML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/979c3d1512792331.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/WsdlOpParameter.java:115
* Wsdl types abstraction.
*/
WsdlOpParameter( Element e, WsdlTypes wsdlTypes ) {
_mode = ParameterMode.UNDEFINED;
_isArray = isArray( e );
_isHeader = false;
if ( e.hasAttribute( WsdlUtils.NAME_ATTR ) && e.hasAttribute( WsdlUtils.ELEMENT_TYPE_ATTR ) ) {
setName( e.getAttribute( WsdlUtils.NAME_ATTR ), wsdlTypes );
_xmlType = wsdlTypes.getTypeQName( e.getAttribute( WsdlUtils.ELEMENT_TYPE_ATTR ) );
} else if ( e.hasAttribute( WsdlUtils.ELEMENT_REF_ATTR ) ) {
_xmlType = wsdlTypes.getTypeQName( e.getAttribute( WsdlUtils.ELEMENT_REF_ATTR ) );
_name = new QName( "", _xmlType.getLocalPart() );
} else if ( e.hasAttribute( WsdlUtils.NAME_ATTR ) ) {
setName( e.getAttribute( WsdlUtils.NAME_ATTR ), wsdlTypes );
_xmlType = getElementType( e, wsdlTypes );
} else {
throw new RuntimeException( "invalid element: " + e.getNodeName() );
}
// check to see if the xml type of this element is an array type
Element t = wsdlTypes.findNamedType( _xmlType );
if ( t != null && WsdlUtils.COMPLEX_TYPE_NAME.equals( t.getLocalName() ) ) {
_itemXmlType = getArrayItemType( t, wsdlTypes );
_isArray = _itemXmlType != null;
if ( _itemXmlType != null ) {
_itemComplexType = wsdlTypes.getNamedComplexTypes().getComplexType( _itemXmlType.getLocalPart() );
}
}
}
/**
* Get the name of this parameter.
*
* @return QName.
*/View on GitHub (pinned to f3058517a1)