Hi, Does the object you want to send implement Serializable ? It's required
Then in your case when not just define class MyObject extends Object implements Serializable { ... } Then, you will be able to carry MyObject and its child classes over RPC. regards didier On Dec 17, 5:22 am, Noor <baken...@gmail.com> wrote: > Using GWT RPC, we cannot send a variable of the type OBJECT. > > I am trying to do this > > Service Interface: > > Boolean SaveObjectIntoDatabase(Object Entity); > > ServiceAsync: > > void SaveObjectIntoDatabase(Object Entity,AsyncCallback <Boolean> > Callback); > > This is because if we are using hibernate on the back end , we can > just do > > e.g. public Boolean SaveObjectIntoDatabase(Object Entity) > { > Transaction tx = null; > > //here we can choose about the object nature > if (Entity.getClass().equals(A)) > { > Entity=(A)Entity; > } > > if (Entity.getClass().equals(B)) > { > Entity=(B)Entity; > } > //like this we can continue on saving an object > //this would be a generic fuction just for saving > hibernate object > //making life much easier than creating an function for > every type of Class > > try > { > tx=session.beginTransaction(); > tx.begin(); > session.update(Entity); > tx.commit(); > return true; > } > catch (Exception e) > { > tx.rollback(); > e.printStackTrace(); > return false; > } > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.