Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

extracting multiple XPath that uses the same variable name

 

Hope this makes sense, thanks for any help in advance!

Solved Solved
1 4 438
1 ACCEPTED SOLUTION

From your explanation, this is what I understand

  1. you are using a RaiseFault step to populate a message into the error variable, and to put the flow into fault state
  2. within a faultrule, you are using ExtractVariables to extract values from.... the request variable
  3. you're observing that your proxy configuration is not working as you expect. The extratvariables is not getting the data.

one thing I am not clear on. You wrote

But currently for my RF I can see the request being populated correctly, ...

Let's just clarify: RaiseFault does not populate the request variable. It populates the error variable. It does not modify or affect the request variable. You can see err.status.code in the Apigee trace. That is a part of the error message.

After that clarification, I have one doubt. You say:

it captures the request that I want the source to get later for extracting some values.

So are you intending to use ExtractVariables on the message that gets populated by RaiseFault? In that case I believe you need to use <Source>error</Source> in your EV policy. You have <Source>request</Source>, which will hold the request as it was received from the client.

One more thing. You may already know this but it bears repeating: ensure that your content-type is correct. If you insert into the Payload of a message, some text that looks like XML, but you do not set the content-type header, then ExtractVariables may do nothing. If you are using XMLPayload within ExtractVariables, the first thing the policy execution does is look for the content-type header. If it is not an XML content type (like application/xml or text/xml) then ExtractVariables will do nothing further.

View solution in original post

4 REPLIES 4