pentaho/pentaho-kettle · error · IllegalArgumentException

Can not find operation: + operationName

Error message

Can not find operation:  + operationName

What it means

WsdlUtils.getSOAPBindingUse(Binding, String) resolves the SOAP use (literal/encoded) for a specific operation by first fetching the binding's BindingOperation. If binding.getBindingOperation(operationName, null, null) returns null — no such operation in this binding — an IllegalArgumentException 'Can not find operation: <name>' is thrown before any use attribute can be read.

Solutions

  1. Copy the exact <operation name="..."> string from the <binding> element of the WSDL.
  2. Check case sensitivity — operation lookup is an exact string match.
  3. Ensure the operation is present in the binding section, not just in portType; if missing, regenerate/fix the WSDL.
  4. Re-fetch the current WSDL in case the operation was renamed.

Example fix

// before
String use = WsdlUtils.getSOAPBindingUse(binding, "getPrice"); // actual name: GetPrice
// after
String use = WsdlUtils.getSOAPBindingUse(binding, "GetPrice");
Defensive patterns

Strategy: validation

Validate before calling

// Check the operation exists in the binding first
if (binding.getBindingOperation(operationName, null, null) == null) {
  throw new IllegalArgumentException("Operation '" + operationName + "' not in binding; available: "
    + binding.getBindingOperations() != null ? binding.getBindingOperations().toString() : "none");
}

Try / catch

try {
  String use = WsdlUtils.getSOAPBindingUse(binding, opName);
} catch (IllegalArgumentException iae) {
  if (iae.getMessage() != null && iae.getMessage().startsWith("Can not find operation:")) {
    logError("Unknown operation '" + opName + "' — check binding section of WSDL", iae);
  }
  throw iae;
}

Prevention

When it happens

Trigger: Calling getSOAPBindingUse with an operationName that does not match any <operation name="..."> under the given <binding>: typo, wrong case, or the operation exists in the portType but was omitted from the binding section.

Common situations: Typo or case mismatch in the operation name passed to the Web Service Lookup step; WSDL binding omits operations present in portType; using the fully-qualified name instead of the local operation name; stale WSDL after service update.

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


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

Appendix: source

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

  }

  /**
   * Get the SOAP Use type for the specified operation.
   *
   * @param binding
   *          A WSDL Binding instance.
   * @param operationName
   *          The name of the operation.
   * @return Either 'literal' or 'encoded'.
   * @throws RuntimeException
   *           If the use type cannot be determined.
   */
  protected static String getSOAPBindingUse( Binding binding, String operationName ) {

    BindingOperation bindingOperation = binding.getBindingOperation( operationName, null, null );

    if ( bindingOperation == null ) {
      throw new IllegalArgumentException( "Can not find operation: " + operationName );
    }

    // first try getting the use setting from the input message
    BindingInput bindingInput = bindingOperation.getBindingInput();
    if ( bindingInput != null ) {
      ExtensibilityElement soapBodyElem =
        WsdlUtils.findExtensibilityElement( bindingInput, SOAP_BODY_ELEMENT_NAME );
      if ( soapBodyElem != null ) {
        if ( soapBodyElem instanceof SOAP12BodyImpl ) {
          return ( (SOAP12BodyImpl) soapBodyElem ).getUse();
        } else {
          return ( (SOAPBody) soapBodyElem ).getUse();
        }
      }
    }

    // if there was no input message try getting the use from the output message
    BindingOutput bindingOutput = bindingOperation.getBindingOutput();

View on GitHub (pinned to f3058517a1)