Invoking the RESTful web services
The REST web services are becoming more and more popular, because of their simplicity over the SOAP and WSDL-based web services. This recipe will explore how to call the RESTful web services from the BPEL process.
Getting ready
We have prepared a RESTful web service that returns the weather conditions based on the city criteria. The web service is developed in JDeveloper and deployed to the Oracle SOA Suite server. We developed the RESTful web services with Jersey, which supports the JAX-RS (the Java API for the RESTful web services) specification covered by Java Specification Request 311.
We created the sample RESTful weather service with the following code:
@Path("RESTWeatherService") public class WeatherProvider { @GET @Path("/query") @Produces("text/xml") public String getWeatherInfo(@QueryParam("name") String name,@QueryParam("zip") String zip) { return "<weatherRes>Hello " + name + ". The weather in " + zip + " city cloudy. \n" +...