Forum Discussion

maximojo's avatar
maximojo
Frequent Contributor
9 years ago
Solved

Modify response with request data

Hi all,   Newb question for you.    All I want to do is grab data from the request and add it to the response. In this case a transactionId from the request I want to transfer to the response tra...
  • maximojo's avatar
    9 years ago

    Actuall I think I figured it out.

     

    def request = new XmlSlurper().parseText(mockRequest.requestContent)
    def a = request.Body.Transaction.TransactionId
    context.transId = a

     

    So now my response uses the same TransactionId as the request.

     

    However if anyone has any better way to do this please let me know.

     

    m