Posts tagged json-simple
The Oracle SOA Suite 11g HttpBinding or another way to call RESTful services from SOA Composite Applications
2I wanted to take a quick look at REST(ful) WebServices and see how those can be integrated into the SCA based SOA Composite Applications that we create with the Oracle SOA Suite. Currently, it does not have the HTTP binding that the 10.1.3 release of the SOA Suite used to have. So what are the alternatives?
In this article, I want to demonstrate a way of calling RESTful (simple http request based) services into a SOA Composite application. I show one way of doing so using the Google Translation Service, a RESTful service described at http://code.google.com/apis/ajaxlanguage/documentation/ and to be accessed at http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=hello%20world&langpair=en%7Cit. This service takes a string to translate and an indication of a source and a destination language. Though maybe not formally resource oriented enough to be called REST-style (or RESTful) service by some, it is a service that does not require SOAP or WS* but simply a HTTP Get request. So at least quite restful.
In this article I will use the work I did and described in the previous article: Leveraging RESTful Services from Java application using Jersey (Introduction). More >
Leveraging RESTful Services from Java applications using Jersey (Introduction)
3While researching for the Oracle SOA Suite 11g Handbook, I wanted to take a quick look at REST(ful) WebServices and see how those can be integrated into the SCA based SOA Composite Applications that we create with the Oracle SOA Suite. Currently, it does not have the HTTP binding that the 10.1.3 release of the SOA Suite used to have. So what are the alternatives? But first, how does one call a simple HTTP only (no SOAP/WS*) service from a piece of Java code? With as little programming and as much framework lifting as possible.
One of the frameworks available for RESTful operations is Jersey – a framework that should be more REST aware than plain HTTP communication oriented libraries like Apache HTTP Client, as well as offer some support for typical formats used in RESTful interactions, such as JSON, XML, RSS, CSV. So let’s create the simples Java application consuming a RESTful service – the Google Translation service – using the Jersey library.
Recent Comments