CA API Management: Unable to return custom headers when using a 'Return Template Response to Requestor' assertion

Document ID : KB000016586
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

When using a 'Return Template Response to Requestor' Assertion you are not able to add additional Header information to the response.

Question:

How can custom headers be added to the response when using a 'Return Template Response to Requestor' assertion? 

 

Headers2.png

Environment:
This issue may occur in all versions of Gateway from 8.3 and above
Answer:

Custom headers can be added using the 'Manage Transport Properties' assertion. In this example we have put in the Name as "pmf" and Value as "TOMBRADY"

 Headers1.png

The most common reasons the headers would not be returned are:

 

1) The wrong target message has been chosen. Ensure the assertion is using the target as the response object.

2) The 'send immediately' check box is selected in the requested template response

assertion. When this is selected the response headers will be ignored. You will need to remove the check box to add the custom headers

Headers2.png