By Juergenkress-Oracle on Jan 31, 2015
In preparation to one of my DOAG 2014 talks „Java WebApps and Services in Oracle Cloud" I created a new trial account for Oracle Java Cloud Service (http://cloud.oracle.com) two weeks ago. Now was the time to create a RESTful Service and deploy it to the cloud and make it accessible to public.
Last time I tried the Oracle Cloud I used exclusively JDeveloper, this time I made my experience with Netbeans. From my point of view Netbeans has pretty good support for generating RESTService from Database tables. In a couple of minutes it is possible to create CRUD Operations and make it accesible by a REST endpoint. No matter what content type you prefer, by using JAXB XML and JSON content types are both automatically available.
Step 1: Create an Oracle Java Cloud Service trial account (fee less for 30 days)
Step 2: Download and install Netbeans Version 8.01 (http://www.netbeans.org)
Step 3: Make sure to install the Oracle Cloud plugin (1.5) in Netbeans
Step 4: Download and Install (just unpack) Oracle Java Cloud Service - Saas Extension SDK (release 184.108.40.206 Find it here.
Step 5: Next add your Oracle Cloud account as Cloud Provider to Netbeans (Goto „Services" Tab and provide your cloud account details)
Step 6: Add a WebLogic Service Instance under ‚Services Tab', so you are able to test the RESTService locally prior to deploying to Oracle Cloud. (I am not going into detail in this post for that task)
Step 7: Make sure to deploy your DB Schema objects plus data into Oracle Database Cloud Service (when subscribing to Java Cloud Service you will get the DB Service as well). See in my previous posts for more details.
HowTo develop RESTService with Netbeans
Everything is setup for cloud deployment. Now let's create a simple REST-Service on top of the HR DB Tables EMPLOYEES and DEPARTMENTS.
Step 1: Start Netbeans, Create new Project Wizard from Type „Maven / Web Application"
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.