title: GWT: Integrating 3rd party webservices and exposing via REST / gwt-RPC to gwt-client
body: <p>I'm a seasoned Java developer but new to GWT. </p>
  
  <p>Consider a 3rd party http POST based webservices api, not completely REST based since there's configuration of servlets, among other things, to invoke these services. I'm building gwt components extending the base gwt composites and using these 3rd party data services to fetch/mutate the data.</p>
  
  <p>In the normal java world, I'd have build a REST wrapper on these services and exposed them as Pojos  via JaxB Xml/Json. In GWT, however, I read GWT-RPC will be the fastest, given the serialization required. The data is expected to be large (several thousands, paginated). </p>
  
  <p>What's the best way to design the 'bridge' between the 3rd party data services and the gwt client components?</p>
  
  <ol>
  <li>I ruled out RequestFactory since we have a custom servlet provided by the 3rd party that fetches the webservices.</li>
  <li>Adding a rest wrapper adds a 3rd layer of indirection (3rd party api+rest+gwt-rpc serialization) that felt too heavy</li>
  </ol>
  
  <p>Suggestions for a low latency design, where I don't have to write too many wrapper classes for each service call (pojo)?</p>
  
  <p>I'd like to consider jaxb on the server side, making schema as the new contract, and converting them to JSON for gwt-client.</p>