With JDeveloper 11gR2 you can now create database based web services using JAX -WS Provider. The key differences between this and the already existing PL/SQL Web Services support is: Based on JAX -WS Provider Supports SQL Queries for creati
- Based on JAX-WS Provider
- Supports SQL Queries for creating Web Services
- Supports Table CRUD Operations
This is present as a new option in the New Gallery under 'Web Services'
When you invoke the New Gallery option, it present you with three options to choose from:
In this entry I will explain the options of creating service based on SQL queries and Table CRUD operations.
SQL Query based Service
When you select this option, on 'Next' page it asks you for the DB Conn details. You can also choose if you want SOAP 1.1 or 1.2 format. For this example, I will proceed with SOAP 1.1, the default option.
On the Next page, you can give the SQL query. The wizard support Bind Variables, so you can parametrize your queries. Give "?" as a input parameter you want to give at runtime, and the "Bind Variables" button will get enabled. Here you can specify the name and type of the variable.
Finish the wizard. Now you can test your service in Analyzer:
See that the bind variable specified comes as a input parameter in the Analyzer Input Form:
CRUD Operations
For this, At Step 2 of Wizard, select the radio button "Generate Table CRUD Service Provider"
At the next step, select the DB Connection and the table for which you want to generate the default set of operations:
Finish the Wizard. Now, run the service in Analyzer for a quick check.
See that all the basic operations are exposed: