[jboss-user] [Remoting] - HTTPUnMarshaller and InvocationResponse objects

tfennelly do-not-reply at jboss.com
Wed Jun 10 09:37:04 EDT 2009


Hi there.

We encountered something that appears to be a bug when using JBR client to a JBR Server (http).

In the above scenario, the JBR server returns an InvocationResponse to the JBR client (if the user-agent starts with "JBossRemoting").  Everything works fine if we don't set a Content-Type header in the response metadata (or we set it to a binary type).  If it's set to a non-binary type however (e.g. text/xml), we get an error on the client side because the HTTPUnMarshaller only decodes the response stream as an InvocationResponse for non binary content types.

Could be wrong (of course), but the mechanism seems flawed.  If the HTTPMarshaller is going to wrap the response object payload in an InvocationResponse, then is it not effectively changing the content type?  In this situation, should it not be reseting the content type to octet-stream (or whatever) and storing the wrapped payload type (e.g. "text/xml") on the InvocationResponse.  Then on the client side, the HTTPUnMarshaller will decode the InvocationResponse properly and can reverse the Content-Type on the response metadata it receives before returning the wrapped payload etc etc

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236737#4236737

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236737



More information about the jboss-user mailing list