You don’t need to create an explicit document type, you can just map requestHeaders to a document in pipeline out named headers.
Then add a branch condition to act on the new attribute i.e. set the SWITCH property to ‘/headers/x-forwarded-for’.
add two sequences, one labelled $null and the other $default.
In the $default sequence add a map step, and then explicitly map ‘/headers/x-forwarded-for’ to clientIP. You will need to add the ‘x-forwarded-for’ attribute into the headers document as it is not typed. To do this right click on the headers document attribute in the ‘pipeline in’ section of your map step and select insert → string. Then name it ‘x-forwarded-for’, don’t forget to map it to clientIP before saving or changing view. Designer automatically cleans up any attributes which are not explicitly used!
I would have normally added some screenshots, but tech community is blocking uploads at the moment, maybe related to log4j heightened security.
regards,
John.
#Flow-and-Java-services#webMethods