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

tfennelly do-not-reply at jboss.com
Sun Aug 2 04:49:42 EDT 2009


Hey Ron, sorry for not replying to this.... I got distracted after your email and forgot to come back to it then :)

Anway... not sure I follow :)

As I see it, the issue on the client side will not be with "text/*" mime types since it seems to me that the issue is that the "text/*" types are coming back "wrapped" as a binary type in an InvocationResponse and the fact that it's "text/plain" underneath has been lost.  I hope that makes sense :)

So it seems to me like the Server to Client Marshal/Unmarshal process is missing a piece of info and an additional client side step.  From memory, I think the http jbrserver-to-jbrclient response process for e.g. "text/plain" is as follows:


  | 1. [serverapp] return a String ("text/plain") response payload 
  |     2. [jbrserver] wrap "text/plain" response payload in an InvocationResponse (serialized String I think)
  |         3. [jbrserver] change content-type to "application/something" because it's an InvocationResponse.
  |             4. [jbrserver] marshal response to client
  |             5. [jbrclient] unmarshal response from server
  |         6. [jbrclient] return payload from InvocationResponse - content-type is "application/something"
  |     7. [clientapp] Use  binary response (serialized String I think)???
  | 

So I was thinking there was a piece of info missing in the InvocationResponse that tells the JBR Client that the payload is actually a serialized object and the base content type is "text/plain".


  | 1. [serverapp] return a String ("text/plain") response payload 
  |     2. [jbrserver] wrap "text/plain" response payload in an InvocationResponse
  |         3. [jbrserver] change content-type to "application/something" because it's an InvocationResponse - store "base-content-type" = "text/plain".
  |             4. [jbrserver] marshal response to client
  |             5. [jbrclient] unmarshal response from server
  |         6. [jbrclient] extract payload from InvocationResponse - it's a serialized object... base-content-type = "text/plain"
  |     7. [jbrclient] Deserialize payload to String - set response content-type back to "text/plain"
  | 8. [clientapp] Use  String response ("text/plain")
  | 

Hope I'm making sense Ron :)

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

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



More information about the jboss-user mailing list