{"record":{"id":"3e40224cfc7800c1","repo":"pentaho/pentaho-kettle","slug":"unable-to-determine-soap-use-for-operation-operationname","errorCode":null,"errorMessage":"Unable to determine SOAP use for operation:  + operationName","messagePattern":"Unable to determine SOAP use for operation:  \\+ operationName","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/WsdlUtils.java","lineNumber":162,"sourceCode":"        }\n      }\n    }\n\n    // if there was no input message try getting the use from the output message\n    BindingOutput bindingOutput = bindingOperation.getBindingOutput();\n    if ( bindingOutput != null ) {\n      ExtensibilityElement soapBodyElem =\n        WsdlUtils.findExtensibilityElement( bindingOutput, SOAP_BODY_ELEMENT_NAME );\n      if ( soapBodyElem != null ) {\n        if ( soapBodyElem instanceof SOAP12BodyImpl ) {\n          return ( (SOAP12BodyImpl) soapBodyElem ).getUse();\n        } else {\n          return ( (SOAPBody) soapBodyElem ).getUse();\n        }\n      }\n    }\n\n    throw new RuntimeException( \"Unable to determine SOAP use for operation: \" + operationName );\n  }\n\n  /**\n   * Get the Soap Action URI from the operation's soap:operation extensiblity element.\n   *\n   * @param operation\n   *          A WSDL Operation.\n   * @return Soap action URI as string, null if not defined.\n   */\n  protected static String getSOAPAction( BindingOperation operation ) {\n    ExtensibilityElement e = findExtensibilityElement( operation, SOAP_OPERATION_ELEMENT_NAME );\n    if ( e != null ) {\n      if ( e instanceof SOAP12Operation ) {\n        return ( (SOAP12Operation) e ).getSoapActionURI();\n      } else {\n        return ( (SOAPOperation) e ).getSoapActionURI();\n      }\n    }","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webservices/wsdl/WsdlUtils.java#L144-L180","documentation":"In getSOAPBindingUse, after finding the BindingOperation, the code looks for a <soap:body> extensibility element on the input (and output) to read the use attribute. If neither carries a recognizable SOAPBody element, it cannot determine the use and throws RuntimeException 'Unable to determine SOAP use for operation: <name>'. The operation exists but its SOAP body configuration is missing or nonstandard.","triggerScenarios":"The binding operation has no <soap:body> extensibility element on its input/output, or the element was not deserialized as a SOAPBody instance (e.g., different SOAP version/namespace extension).","commonSituations":"Hand-edited or tool-generated WSDL omitting <soap:body use=\"...\"/>; SOAP 1.2 operation sections using a namespace whose extension factory isn't registered; minimal WSDLs that leave off body configuration.","solutions":["Add <soap:body use=\"literal\"/> (or encoded) to the operation's <input> (and <output>) in the binding of the WSDL.","Regenerate the WSDL from the service tooling so the soap:body element is emitted for every operation.","Ensure the correct SOAP namespace/extension registry is used so soap:body is parsed into SOAPBody (SOAP 1.2 needs SOAP12Body handling).","As a workaround, inspect the raw WSDL to know the use and configure the step accordingly if the parser can be avoided."],"exampleFix":"<!-- before: input without soap:body -->\n<operation name=\"GetPrice\">\n  <input><soap:header message=\"tns:hdr\" part=\"auth\" use=\"literal\"/></input>\n<!-- after -->\n<operation name=\"GetPrice\">\n  <input>\n    <soap:body use=\"literal\"/>\n  </input>","handlingStrategy":"validation","validationCode":"// Ensure the operation's input/output declare a soap:body before resolving use\nBindingOperation op = binding.getBindingOperation(operationName, null, null);\nboolean hasSoapBody = op != null && op.getBindingInput() != null\n  && WsdlUtils.findExtensibilityElements(op.getBindingInput(), \"body\").stream()\n       .anyMatch(x -> x instanceof SOAPBody || x instanceof javax.wsdl.extensions.soap12.SOAP12Body);\nif (!hasSoapBody) throw new IllegalArgumentException(\"Operation '\" + operationName + \"' has no soap:body use configured\");","typeGuard":null,"tryCatchPattern":"try {\n  String use = WsdlUtils.getSOAPBindingUse(binding, opName);\n} catch (RuntimeException re) {\n  if (re.getMessage() != null && re.getMessage().startsWith(\"Unable to determine SOAP use\")) {\n    logError(\"Operation '\" + opName + \"' lacks a soap:body element in its binding\", re);\n  }\n  throw re;\n}","preventionTips":["Require <soap:body use=\"...\"/> on every binding operation input","Regenerate WSDLs with full soap:body configuration","Register SOAP 1.2 extension factories when applicable"],"tags":["wsdl","soap","binding","configuration"],"backgroundTag":"unexpected-response-shape","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"}