Beiträge getagged mit Jersey
Yet Another Try: A REST Client with Jersey and Scala
[UPDATE] I pushed the code as SJersey to Github. For usage examples check out the test code here [/UPDATE] The are many awesome REST frameworks out there, for Java and for Scala as well. Most of the concepts do cover the server side. Important I know, but where are the smart client side APIs/DSLs? There [...]
REST Client calls with Scala and Jersey (JAX-RS)
[UPDATE] this post is really old. I’ve written a new one: klick [/UPDATE] Usually client calls to Jersey (see API) are looking like this: ?View Code SCALA1 2 3 4 5 6 … WebResource resource = client.resource(baseURI); Units units = resource.path("units/" + id).accept(MediaType.APPLICATION_XML). get(Units.class); … Using many different HTTP method calls with changing paths is [...]
JSONContextResolver
Playing around with CouchDB (which is a great JSON document based database with REST access), Jersey (JAX-RS/JSR-311 implementation) and Scala I had to implement a custom ContextResolver to use JSON objects instead of XML. The Context Resolver Interface in Java is: package javax.ws.rs.ext; public interface ContextResolver<T> { T getContext(java.lang.Class<?> aClass); } I needed some time [...]

Twitter
Xing
Facebook