Saving a response persistently

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Saving a response persistently

Jorge Zapata
This post was updated on .
Hi, I'm having problems to save a response that I obtain from a receive method, I have tried everything but still don't figure out a way to do this. My code is something like this:
  receive(action -> action.endpoint("receiveQueueEndpoint")
                .payload(new ClassPathResource("templates/10714155_RES.XML"))

I want to save the response that comes in this receive: first taking it to a variable. In order to do so I save the response with the following:
       variable("msg", "citrus:message(response.payload())");

So far it appears to be working as I'm able to see the display of my response, but now I'm struggling to take this variable into an xml file on my local files.

Any suggestions to do this?