Note that there are some explanatory texts on larger screens.

plurals
  1. POjava rest client: jax-rs & automatic type mapping
    primarykey
    data
    text
    <p>Here is what I am trying to do:</p> <p>Create an interface (as an example):</p> <pre><code>@Path( "/" ) public interface Bubbles { @Get @Path( "blowBubble" ) @Produces( "text/plain" ) Bubble blowBubble(); } </code></pre> <p>Said interface should be deployed as a restful web service. I don't particularly care too much about the server side at this point, I mainly concerned with the client. </p> <p>What I am looking for is a library where I can:</p> <p>1) Implement the interface, <strong>without the interface knowing the full URL (knowing the server and port is obviously necessary</strong> (it is in the interface after all)</p> <p>2) Automatically map 'Bubble' to json across the wire. No adding JAXB to it, no building type converters, etc <strong>automatically</strong></p> <p>My problem is that the 2 libraries I have used do 1 or the other, but not both :(</p> <p>The Restlet library does 2 but not 1, CXF does 1 but not 2.</p> <p>Are there any libraries that do both? </p> <p>I have submitted bugs for both and the CXF dev's seem adamant that 2 should not be a feature - I don't understand why.</p> <p>Thanks in advance.</p> <p><strong>EDIT #1:</strong></p> <p>To clarify my intent, I would like to use REST as the backing transport mechanism for SOA java. This transport should, IMO be transparent; if you have an annotated service interface to adhere to, then the client and server should not need to know anything about each other. They should operate on the contract. Furthermore, this API should be non-intrusive; example: I find that annotating business Objects\Entities with JAXB <strong>IS intrusive</strong> (what if I can't modify the source?).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload