o We change the SampleServiceImpl.java to get message as JSON data
o We created a JSNI MessageData object to convert javascript to Java
o The key for MessageData is extending the JavaScriptObject object
o We handled the data via the getMessage() JSNI representation
o The Sample.java GWT entry point was changed to handle JSON
o We added, the asArrayOfStockData() to parse the JSNI data returned
o Just to be sure, we look in the web.xml, we see the configuration
o We see in the SampleService.java, the @RemoteServiceRelativePath(“message”)
o We created a JSNI MessageData object to convert javascript to Java
o The key for MessageData is extending the JavaScriptObject object
o We handled the data via the getMessage() JSNI representation
o The Sample.java GWT entry point was changed to handle JSON
o We added, the asArrayOfStockData() to parse the JSNI data returned
o Just to be sure, we look in the web.xml, we see the
o We see in the SampleService.java, the @RemoteServiceRelativePath(“message”)
o I think we have enough to run the sample application
o Let us run it in GWT Super Dev Mode
o Select the sample jason project: samplejason00
o Right Click select: Run As — Web Application (GWT Super Dev Mode)
o Click the Development Mode Url: http://127.0.0.1:8888/Sample.html
o There we go!
o We are seeing in the page body: “message goes here”
o We did it! By doing a RPC to get JSON data
o Let us run it in GWT Super Dev Mode
o Select the sample jason project: samplejason00
o Right Click select: Run As — Web Application (GWT Super Dev Mode)
o Click the Development Mode Url: http://127.0.0.1:8888/Sample.html
o There we go!
o We are seeing in the page body: “message goes here”
o We did it! By doing a RPC to get JSON data
o Right on, right on!
o Go GWT and JSON!
o Cheers!