i am new with ember and i am try to connect restfull communication with jersey server please help me
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(); }
});
This syntax is old. What tutorial are you following?
Actully i am using emberjs with jersey server and i am new with this technology please help me
Can you give me a specific page where you got the above code from?
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