Question

I have this kind of request which seems to be GWT-RPC format :

R7~"61~com.foo.Service~"14~MethodA~D2~"3~F7e~"3~B0e~Ecom.foo.data.BeanType~I116~Lcom.foo.Parameter~I5~"1~b~Z0~"1~n~V~"1~o~Z1~"1~p~Z1~"1~q~V~'

But it is not in line with protocol described here:

What exactly is this protocol ? Is it really GWT-RPC or something else (deRPC?) ?

Looking into gwt-2.5.1 source code, I notice it seems that following packages could be generating this kind of format:

  • com.google.gwt.rpc.client
  • com.google.gwt.rpc.server

Is this deRPC ?

Was it helpful?

Solution

Based on a quick glance through the deRPC classes in the packages you listed, it does indeed appear to be deRPC. Note that deRPC has always been marked as experimental, and is now deprecated, and that either RPC or RequestFactory should be used instead.

Details that seem to confirm this:

  • com.google.gwt.rpc.client.impl.SimplePayloadSink#RPC_SEPARATOR_CHAR is a constant equal to the ~ character, which appears to be a separator between different tokens in the sample string you provided.

  • Both com.google.gwt.rpc.client.impl.SimplePayloadSink andcom.google.gwt.rpc.server.SimplePayloadDecoder` have many comments that appear to depict the same basic format that you are seeing in there:

    • // "4~abcd in endVisit(StringValueCommand x, Context ctx) closely matches several tokens in the sample string - a quote indicating a string, an int describing the length, a ~ separator, then the string itself (this doesnt match everything, I suspect because you removed details about the service and the name of the method):

      • "3~F7e

      • "3~B0e

      • "1~b

    • Booleans all follow Z1 or Z0, as in your sample string

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top