java - CXF + polymorphic POST data -
my project has core , extended projects.
project classes can extend entities , add data them. core supposed support subclasses in rest api, exception not recognizing added fields.
for example:
core:
class student { private integer id; private string name; } interface studentservices { @path("/") @put public void savestudent(student student); }
and there implementation handles save operation. works well.
but want provide ability extend student class, projects , other won't:
project:
class studentext extends student { private string extradata; }
if send studentext in json server, system crushes unknown property exception. don't think disabling validation suffice - cxf still wont know want extended class.
tried generics didn't work:
public <t extends student> void savestudent(t student);
please me. regards, id
Comments
Post a Comment