JBoss development,
A new message was posted in the thread "Consistent handling of HTTP response header
across HTTP comp":
http://community.jboss.org/message/524484#524484
Author : andrzej sochal
Profile :
http://community.jboss.org/people/anso2
Message:
--------------------------------------------------------------
I am using jboss-4.2.1.GA as my application server and jbossesb-4.6. for my ESB. This does
not seem to be a configuration specific issue. I believe that the issue is in the
jboss-remoting.jar that comes with the application server. This is where the override
content type happens. I also checked newer versions of remoting and it looks like this is
still handled in the same way.
Take a look at org.jboss.remoting.transport.coyote.CoyoteInvoker (line 423 and 424)
String responseContentType = responseObject == null ? req.getContentType() :
WebUtil.getContentType(responseObject);
res.setContentType(responseContentType);
and the WebUtil looks like this:
public static String getContentType(Object param)
{
if(param instanceof String)
{
return HTML;
}
else
{
return BINARY;
}
}
So if your payload is String, it will always be text/html. This is causing issues when you
use JBR Gateway with web services where text/xml is expected.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/524484#524484