I have some interface description in text describing a RESTful webserver. I also have JAX-B annotated objects that I want to push and receive from that interface.
I’m not sure how much support for such a task is already implemented. There is some Jersey thing around, but is that still up to date?
Do I have to define a target URL, open a stream, serialize the xml object (maybe turning it into a string first?), and then write it to the stream?
Or is there some magic method that only expects a URL and the JAX-B object and maybe if I want to PUT,DELETE,POST or GET it?
JAX-RS is what you want to use in this case and Jersey is the reference implementation. JAXB is the default binding layer for JAX-RS. Below is an example of a RESTful service that supports
PUT,DELETE,POST, andGET:Below are links to the full example: