jax ws - Resteasy Jackson POST -


i trying post on webservice using resteasy , jackson json bindings.

my client interface looks

@produces("application/json") @consumes(value = mediatype.application_json) public interface myclientproxy {      @post     @path("/messages/send")     clientresponse<fooresponse> send(@queryparam("foo") foo foo);     } 

and object foo like:

@jsonignoreproperties(ignoreunknown = true) public class foo implements serializable {      @jsonproperty     string bar;      public string getbar() {         return bar;     }      public void setbar(string bar) {         this.bar = bar;     } } 

but when run test, can see server post looking like:

{     "foo": "com.x.y.foo@1d75249c" } 

how come object foo not being serialized json?

i think need default constructor public foo() {} :

@jsonignoreproperties(ignoreunknown = true) public class foo implements serializable {      @jsonproperty     string bar;      public foo() {}      public string getbar() {         return bar;     }      public void setbar(string bar) {         this.bar = bar;     } } 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -