Modified this route, and was successful
route()
.from("/delorean")
.on(RequestMethod.GET).produces(MediaType.JSON.toString())
.to(Home.class).anotherPage();
Kept getting the same error with this one though
| Title: Open Source Libraries for Mobile Connectivity | |
| Persistence, Security, Connectivity. All 3 are an important part of an enterprise application. | |
| But how does this translate to the mobile environment. With a range a technologies to support | |
| and develop with, things can get messy quickly. In this session you will see how | |
| AeroGear solves these concerns and how it allows developers | |
| to access server side components using a common API across multiple platforms |
Modified this route, and was successful
route()
.from("/delorean")
.on(RequestMethod.GET).produces(MediaType.JSON.toString())
.to(Home.class).anotherPage();
Kept getting the same error with this one though
This gist relates to AEROGEAR-534, https://issues.jboss.org/browse/AEROGEAR-534
I created a node.js server that handles CORS and jsonp for my testing
###Cross Domain Support
To do cross domain request, i've modified aerogear.js a bit.
I've added a new settings variable, settings.crossdomain, that can be mixed. If set to true, it will default to CORS, to override to jsonp set settings.crossdomain.type = "jsonp"
| //FightCode can only understand your robot | |
| //if its class is called Robot | |
| var Robot = function(robot) { | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.ahead(100); |
| //Taken from the AeroGearExample | |
| tasksPipe = [todo pipe:^(id<AGPipeConfig> config) { | |
| [config name:@"status"]; | |
| [config endpoint: @"realm/status"]; //endpoint with no trailing slash | |
| [config type:@"REST"]; | |
| }]; | |
| //when i do the read, i get a 404, since the URL has a trailing slash on it | |
| [tasksPipe read:^(id responseObject) { |
| This is based off the most recent branch of the TODO app( my fork ) located here: https://github.com/lholmquist/TODO | |
| start jboss server | |
| run: mvn clean install on TODO app | |
| access TODO app at http://localhost:8080/todo | |
| log in with john/123 |
| //https://github.com/lholmquist/WoWAerogear if you have yeoman installed, you should be able to do yeoman server, might have to do yeoman build first though | |
| //excerpt from app.js | |
| pipeline.add( { | |
| name: "wowPipe", | |
| settings: { | |
| baseURL: "http://us.battle.net/api/wow/", | |
| endpoint: "achievement/2144", //this should be in the read method, need datamanager for that? | |
| jsonp: true, |
| //was - worked | |
| securePipe.read({ | |
| error: function( data, message ) { | |
| equal( message, "Error: Authentication Required", "Initial Page load Auth Failure" ); | |
| start(); | |
| } | |
| }); | |