Workday errors in plain English.

Submit an Error

Studio xpathF Fails With Namespace Prefix Has Not Been Declared Even Though the Response Declares It

✓ Verified Workday Studio 5 lookups
The error Unhandled Exception Error running <INTEGRATION_NAME>: Namespace prefix 'env' has not been declared

What does "Unhandled Exception Error running <>: Namespace prefix 'env'" mean in Workday Studio?

An Eval step used xpathF to read a value out of a SOAP response and Studio said the env prefix is undeclared. Prefixes declared in the XML document itself are not visible to the MVEL XPath functions, which need the bindings passed to them explicitly.

Quick fix

Add the missing prefix binding to the xpathF call, supplying the envelope prefix and its URI alongside the Workday prefix, then redeploy.

Permanent fix

Strip the SOAP envelope before you evaluate business data. If the step that consumes the response unwraps the body first, the expression only ever needs the Workday namespace, and envelope prefix mistakes cannot occur.

Troubleshooting

  1. Do not trust the document. Confirm what the expression itself declares, since a prefix written in the payload does nothing for the function evaluating the path.
  2. Pass every prefix the path uses as a binding argument, including the SOAP envelope prefix, not only the wd prefix for the Workday body.
  3. Verify each URI separately. The SOAP envelope namespace and the Workday service namespace are different values, and copying one binding twice produces the same message against a different prefix.
  4. Store the response and open it before the Eval step so you can read the real prefixes in use. A response routed through an earlier transform may have been re-serialized with different prefixes than you expect.
  5. Once the prefixes resolve, check the predicate separately. A path that resolves but returns nothing is a different problem from one that will not compile.
Was this helpful?

Related errors