Is prefix in ExtractVariables XMLPayload.Namespaces optional?

The documentation states that the prefix attribute in <XMLPayload>/<Namespaces> for ExtractVariables policy is optional. However when I omiited this attribute in my policy I encountered the following error:

Error occurred while validation of bean Extract-From-SOAP.xml. Reason: - Required attribute prefix is missing in Namespace

I'm using 4.19.01.00 OnPrem Apigee. The line which fails the validation is similar to the following:

<Namespace>http://service.waynecorp.com/createAccount</Namespace>

Is the documentation incorrect or is there a defect in the validation? Any workarounds?

Solved Solved
0 4 248
1 ACCEPTED SOLUTION

The documentation is incorrect.

The prefix is required.

Without the prefix, there would be no way to refer to the namespace in the subsequent XPath.

We will get the documentation corrected.

View solution in original post

4 REPLIES 4

Are you using this namespace in your XPath expressions?

edit -

I have tried the same on on-prem 4.18.05 and it throws the same when I remove the prefix.

So, the docs might be incorrect. The only thing optional here is the Namespace tag.

Thanks @Siddharth Barahalikar. My thoughts as well. I just want someone from Apigee to provide an official answer on this and then either correct the documentation or the validation logic.


The documentation is incorrect.

The prefix is required.

Without the prefix, there would be no way to refer to the namespace in the subsequent XPath.

We will get the documentation corrected.