Ember rest with jersey server


#1

i am new with ember and i am try to connect restfull communication with jersey server please help me


#2

App.Store = DS.Store.extend({ revision: 12 });

DS.RESTAdapter.reopen({ url: ‘/{context path}/rest’ });

App.UserRoute = Ember.Route.extend({ model: function() { return App.User.find(); }

});


#3

This syntax is old. What tutorial are you following?


#4

http://emberjs.com/guides/


#5

Actully i am using emberjs with jersey server and i am new with this technology please help me


#6

Can you give me a specific page where you got the above code from?


#7

var record = this.get(‘store’).createRecord(App.User,user.toString()); this.get(‘store’).commit(); this is my rest adpapet code and my back end is jersey

@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public String createUser(User user) { try {

       System.out.println("in the post method" + user); 

}

when i change createUser argument type is String i have ot jsone like "user"{ "userName:‘dsdsdsds’} and i got exception at server side isorg.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field “user” (Class com.bs.voicesms.domain.User), not marked as ignorable