We have a multi-node REST architecture, using CXF: Client calls Server 1 Server 1 looks up the host/url and calls a similar service on Server 2 Server 1 gets the Response from Server 2 and returns it to the client (no unmarshalling) For example, this is the call from Server 1 to 2:
public Response testBackup(final Long hostId, final String config) { // create server2Proxy based on hostId return server2Proxy.testBackup(config) } This works and allows us to avoid the unnecessary work of unmarshalling/remarshalling the response from Server 2. First question, is this an appropriate CXF implementation? One problem with this is we see a duplicate Date header from the Server 1 response: HTTP/1.1 200 OK Date: Thu, 04 Aug 2011 23:02:04 GMT Date: Thu, 04 Aug 2011 23:02:04 GMT Content-Type: application/xml;charset=UTF-8 Server: Apache-Coyote/1.1 Content-Length: 8587 When I run it on Tomcat, Tomcat chunks the response and duplicates the Transfer-Encoding and Server headers: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Date: Thu, 04 Aug 2011 22:44:36 GMT Transfer-Encoding: chunked Server: Apache-Coyote/1.1 Content-Type: application/xml;charset=UTF-8 Transfer-Encoding: chunked This normally could be ignored, however in one of our environments, The chunked response gets corrupted, not including the chunk size before each chunk, as required, and the client fails. Any ideas on this? We are on CXF 2.2.11. Thanks, Andrew