'How to add custom response header in spring boot soap service?

We recently migrated our Spring Boot SOAP service (that utilized ANT build) to Gradle build. The service runs fine when I try to run in Postman and also getting expected responses. However, I'm missing "X-service-id" and "X-service-name" in the response-headers after getting response. I tried using filters, interceptors to set the headers, but nothing seemed to work. So, I was wondering if there's a way to add/set custom response headers for spring boot application that uses SOAP api?

Any help or reference materials would be appreciated. Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source