The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dialloma (72) [Avatar] Offline
Hello all,

I'm using GWT to develop a complex application using Server Side Code. But I want to develop my client side before developping the server side code. My client side code receive the XML file from server. So before I implement the server side code, I want to test my client side. So I want to know hows can I use a XML file in client side to simulate de response of server. Wich class can I use to do this, and how can I use it.

Thank you in advance
adam.tacy (269) [Avatar] Offline
Re: GWT and ressources files !
Hi Dialloma,

There are probably many ways you can do this (apart from reading a file directly using java io on the client side).

I would suggest you build your application with all the plumbing to talk to the server, except you would "return" your test XML file instead of a proper server side code response. By "returning" I mean something like:

a) Having the response as a string inside your server connecting code
b) Having the response as a string in an external class file you instantiate and access in your server connecting code
c) Have your server connect code actually talk to a server, but it returns your XML file rather than calculating a response

As said, many ways of skinning this cat, just depends on how much of your server connection code you want to build now - you're going to have to do it anyway....