Artem
Artem

Reputation: 6760

Making GWT RPC calls to an external service for which you don't have code

I would like to make a small program that scrapes information from a 3rd-party GWT-enabled website. Is it possible to somehow call this RPC directly? What would I need to reverse-engineer to do this (i.e. hopefully not the entire low-level protocol).

I am hoping I could somehow just call this from within my own server-side GWT or Servlet app.

Upvotes: 4

Views: 1253

Answers (2)

Sripathi Krishnan
Sripathi Krishnan

Reputation: 31528

It is possible... but you would have to go through their code to understand how the serialization/deserialization works.

Classes of interest are

  1. RPC.java
  2. ClientSerializationStreamWriter -> ServerSerializationStreamReader are the classes involved in making a GWT request.
  3. ServerSerializationStreamWriter -> ClientSerializationStreamReader are the classes involved in creating and interpreting a response.

I am trying out a similar thing as an academic project, and I will add more information if I can decipher these classes.

Upvotes: 1

Jason Hall
Jason Hall

Reputation: 20920

I'm pretty sure GWT makes it difficult to do cross-site requests, for the sake of security.

Any solution you come up with will probably be hacky (and not flexible to future changes), and since you're presumably doing it without the consent of the site in question, probably a bad idea to begin with.

Is there some reason you can't ask the site to publish their data using a REST API?

Upvotes: 0

Related Questions