Groovy Script
Explanation
This script performs the following operations:- XML Parse: XML data coming from request body is parsed
- Header Check: Checks if SOAP Header field exists, creates if not
- Username Retrieval: Username information from authentication is retrieved
- Adding to Header: Username information is added to Header field
- Sending to Backend: Updated XML is sent to backend
This script should be run on the request line (Request Policy) because it uses the
requestBodyTextFromClient and requestBodyTextToTargetAPI variables.
