{"record":{"id":"63387413d68315a3","repo":"pentaho/pentaho-kettle","slug":"webservices-error0010-outputparsingerror","errorCode":"WebServices.ERROR0010.OutputParsingError","errorMessage":"WebServices.ERROR0010.OutputParsingError","messagePattern":"WebServices\\.ERROR0010\\.OutputParsingError","errorType":"error_code","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java","lineNumber":765,"sourceCode":"              // Prevent empty rows from being sent out.\n              //\n              if ( fieldsFound > 0 ) {\n                // Send a row in a series of rows on its way.\n                //\n                putRow( data.outputRowMeta, outputRowData );\n              }\n            }\n          }\n        }\n      }\n\n      if ( singleRow && fieldsFound > 0 ) {\n        // Send the single row on its way.\n        //\n        putRow( data.outputRowMeta, outputRowData );\n      }\n    } catch ( Exception e ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"WebServices.ERROR0010.OutputParsingError\", response.toString() ), e );\n    }\n  }\n\n  private Object[] createNewRow( Object[] inputRowData ) {\n    return inputRowData == null ? RowDataUtil.allocateRowData( data.outputRowMeta.size() ) : RowDataUtil\n      .createResizedCopy( inputRowData, data.outputRowMeta.size() );\n  }\n\n  private void compatibleProcessRows( InputStream anXml, Object[] rowData, RowMetaInterface rowMeta,\n                                      boolean ignoreNamespacePrefix, String encoding ) throws KettleException {\n\n    // First we should get the complete string\n    // The problem is that the string can contain XML or any other format such as HTML saying the service is no longer\n    // available.\n    // We're talking about a WEB service here.\n    // As such, to keep the original parsing scheme, we first read the content.\n    // Then we create an input stream from the content again.","sourceCodeStart":747,"sourceCodeEnd":783,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/webservices/WebService.java#L747-L783","documentation":"KettleStepException wrapping WebServices.ERROR0010.OutputParsingError, thrown by WebService.processRows when the StAX parsing of the SOAP response XML fails for any reason. The response content is included in the message. This is the catch-all for XML stream errors while extracting output fields.","triggerScenarios":"requestSOAP -> processRows: the XMLStreamReader throws on malformed or unexpected response XML — HTML error page instead of SOAP envelope, namespace/element mismatch with configured field mappings, or invalid characters in the payload.","commonSituations":"Server returns a SOAP fault or login page (200 status but non-SOAP body); configured output field names/namespace prefixes don't match the actual response; service returns data in a different structure than expected.","solutions":["Inspect the response text embedded in the exception message — determine what the server actually returned.","Check for a SOAP fault; fix the request (auth, parameters) if the server rejected it.","Verify the step's output field names and 'ignore namespace prefix' setting against the real response XML.","Confirm the response encoding matches what the step assumes."],"exampleFix":"// before\n// field mapped as \"result\" but response uses <ns:return>\n// after\n// set field name to \"return\" or enable 'ignore namespace prefix' so mapping matches the response element","handlingStrategy":"validation","validationCode":"// Sniff the raw response before parsing; reject non-SOAP bodies:\nString body = readResponseBody(response);\nif (!body.contains(\"<Envelope\") && !body.contains(\"<SOAP-ENV\")) {\n  throw new IllegalStateException(\"Non-SOAP response: \" + body.substring(0, Math.min(200, body.length())));\n}","typeGuard":null,"tryCatchPattern":"try {\n  // run transformation\n} catch (KettleStepException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"OutputParsingError\")) {\n    // message contains the raw response; inspect it for faults/HTML error pages\n  }\n}","preventionTips":["Verify output field mappings against a captured real response XML.","Set the namespace-prefix handling option to match the service.","Check for SOAP faults in the response before assuming success."],"tags":["kettle","webservice","xml","parsing"],"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"}