JAX-RS client / server application using JSON and Wink

I would like to implement the JAX-RS server (on WebSphere Application Server) and client applications using the JSON (Jackson Converter) format and the Wink provider.

  • Do I need to use JAXB annotations for my DTO class, which will be passed to and from the REST service and therefore must be serialized?

  • What type of response do I need to use, JSONObject, or my class type, for example MyClass or String in the message methods between the client / server?

When do we use JAXB annotations for domain classes in Rest services?

Your understanding / direction will be highly appreciated.

Thanks in advance, Erwin

+3
source share
2 answers

, .
:

  • 90% JAXB .
  • :

    @POST public MyClass myMethod (MyOtherClass mcls)

  • JAXB , .

+3

: Jackson JSON Apache Wink. , .

http://www.ibm.com/developerworks/java/library/wa-aj-jackson/index.html , Apache Wink Jackson.

0

All Articles