2

Is it possible to parse or deserialize a GWT-RPC response using C#? I can not seem to find any useful information about this ~serialized format.

I get the following response from the service and would like to use its content;

//OK[0,1,10,'Tjsknq4',4,6,9,'Tjsknq4',4,11,2,0,1,10,'TjsdwN4',4,6,9,'TjsdwN4',4,8,2,0,1,7,'TjskEwg',4,6,5,'TjskEwg',4,3,2,3,1,["java.util.ArrayList/3821976829","com.initka.onlineinfo.server.datamodel.DepartureInformation/3749734003","49 min","java.util.Date/1659716317","String1","844","A","22 min","String2","B","52 min"],0,6] Slightly modified

I understand that it´s used for communication between server and client side using Java and Javascript but can it be deserialized in C# as well or would it require the data model "DepartureInformation"?

A minified Javascript uses the response to populate a list based on the data in "java.util.ArrayList"/"DepartureInformation" and the output looks something like the following example;

  • 844, String2, B, 22 min
  • 844, String1, A, 49 min
  • 844, String2, B, 52 min
Stefan
  • 5,644
  • 4
  • 24
  • 31
  • 1
    GWP-RPC is a pretty much closed format. See here on SO about the same subject: http://stackoverflow.com/questions/6135590/gwt-rpc-data-format – Simon Mourier Aug 08 '12 at 09:36
  • 1
    That was a really nice post and the linked power point guided me to http://www.gdssecurity.com/l/t and GwtParse where the request payload is explained very well. Unfortunately, it doesn´t say much about the serialized response. Thanks a lot for the best resource so far! – Stefan Aug 08 '12 at 12:47

1 Answers1

0

I'd highly recommend switching from GWT-RPC to RestyGWT (https://resty-gwt.github.io/). It is a beautiful/simple REST based client for GWT. Once you switch, you just implement a C# REST-based webservice on the server side and all the json is serialized to a collection of "DepartureInformation" objects for you (assuming the property names match up).

corestruct00
  • 105
  • 8