Category Archives: Java

Handling multiple actions for a POST method

When we go a bit ahead from the CRUD scope of REST, we often need to support several actions for a same resource. This is typically handled by a method POST and we need to implement a processing to route … Continue reading

Posted in JAX-RS, REST, Restlet | Tagged , , , , , | Leave a comment

Getting started with RestEasy

RestEasy is the REST framework of JBoss. It can be reached from the address http://. This framework implements the JAX-RS specification and allow to implement RESTful services. The latters can be deployed within any JavaEE Web container, not only the … Continue reading

Posted in REST, RestEasy | Tagged , , , | Leave a comment

Exception handling with Restlet

Restlet provides several approaches to handle exceptions on both client and server sides. You can choose to be close to the Restlet API itself or use a higher level approach based on custom exceptions and / or annotated exceptions On … Continue reading

Posted in Restlet | Tagged , , , , , | 2 Comments

Optimizing Restlet server applications

There are several ways to optimize Restlet applications. We can leverage features of the HTTP protocol itself like caching or compression but also at the level of third-party tools like Restlet converters and template engines. This allows to have an … Continue reading

Posted in REST, Restlet, Tips | Tagged , , , , | Leave a comment

Implementing a Spring custom namespace for Olingo

Spring is a lightweight container that implements dependency injection. It provides a convenient and extensible way to implement DSLs within its XML configuration to make easier configurations of particular issues. Olingo is a Java library that implements the Open Data … Continue reading

Posted in Olingo, Spring | Tagged , , , , | 2 Comments

Using batch requests when interacting with OData v4 services with Olingo

In previous posts, we described how to read data from OData v4 services with Olingo and how to update them. OData (and Olingo) provides a powerful feature to send several calls in a single one (batch requests). We will tackle … Continue reading

Posted in Java, Olingo, REST | Tagged , , , | 2 Comments

Updating data links of OData v4 services with Olingo

In a previous post, we saw how to update data of OData v4 services with Olingo (see https://templth.wordpress.com/2014/12/05/manipulating-data-of-odata-v4-services-with-olingo/). In the real world, data are linked together. Its also the case with OData entities. In the latter post, we dont cover … Continue reading

Posted in Java, Olingo, REST | Tagged , , , | Leave a comment

Manipulating data of OData v4 services with Olingo

In a previous post, we saw how to access data of OData v4 services with Olingo (see https://templth.wordpress.com/2014/12/03/accessing-odata-v4-service-with-olingo/). We will focus now on how to manipulate these data. We dont remind here how to configure Olingo in the project and … Continue reading

Posted in Java, Olingo, REST | Tagged , , , | 3 Comments

Accessing data of OData v4 services with Olingo

Olingo (http://olingo.apache.org) is a framework that implements the OData specification. Its provides support for its latest version, the version 4, for both client and server sides. We will describe here how to use the client side to retrieve data. Configure … Continue reading

Posted in Java, Olingo, REST | Tagged , , , | 6 Comments

Understanding and using CORS

Cross Origin Resource Sharing (CORS) allows to use Web applications within browsers when domains arent the same. For example, a site with domain test.org wants to execute AJAX requests to a Web application with domain domain mydomain.org using HTTP. Understanding … Continue reading

Posted in Cors, Restlet | Tagged , | Leave a comment