I have a webservice that is going to receive a request, perform an action in java, and then return a response as standard.
The client expecting the response however, is expecting the HTTP response to have two characters appended to the end of the message (any, it does not matter, currently just \n\n, and for reasons unknown to me – it’s legacy code), outside of the headers and body.
Presently it is done by sending the HTTP message first to a proxy, which appends the characters and forwards the message, but does anyone know of a way that this can be done in java without the need for a proxy?
I.e. – Can I access the full HTML response to edit it before it is sent?
Edit: The client is not a browser, but an application sending SOAP messages.
We ended up using apache-cxf interceptors, as we only needed the full SOAP message in the end. By adding an outgoing interceptor that converted the SoapMessage content to a string, added the two characters and set the content again, our issue was fixed.
Thanks anyway!