Workday errors in plain English.

Submit an Error

Content Is Not Allowed in Prolog When Delivering a CSV File

✓ Verified Workday Studio 4 lookups
The error com.capeclear.mediation.MediationException: application=<APP_NAME> - Failed to compile XPath expression /ns:entry/ns:link/@href in XPath handler for com.workday.esb.wcc.RepositoryDocumentsXMLStepImpl, reason: Failure converting a node of class com.capeclear.mediation.impl.DataHandlerSource: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

What does "com.capeclear.mediation.MediationException: Failed" mean in Workday Studio?

A step that expects XML has been handed something that is not XML, in this case a CSV file, and the parser rejects the very first character. The order of steps in the assembly is the usual cause: the message was converted or written to its file form before a later step that still expected the XML.

Quick fix

Move the Store step so it runs after every step that still needs the XML form of the message, then redeploy and rerun with a payload large enough to reproduce the original failure.

Permanent fix

Keep file writing steps at the end of the route, and branch rather than convert in place so the XML message survives for any step that still needs it. Always test with a realistic number of rows, because payload size decides which code path runs and a three row test proves very little.

Troubleshooting

  1. Read the reported position. Line 1 column 1 means the parser rejected the first byte, so the payload is not XML at all rather than being malformed XML.
  2. Identify the step named in the message and what it expects. A document repository or delivery step reads an XML response, so handing it a CSV file fails instantly.
  3. Walk the route from the start to that step and write down the message shape after each one. The point where the shape turns from XML into CSV is the boundary that matters.
  4. Look specifically at where the Store step sits. If it runs before a step that still needs XML, the message has already become the output file by the time that step reads it.
  5. Do not clear the assembly on a tiny test file. A small payload can stay inline while a larger one takes a different path, so reproduce with a realistic row count.
Was this helpful?

Related errors