7. Configuring RESTful WebService

Follow the below steps to configure RESTful WebService.

7.1 Create Data Sources for RESTful WebService

  1. Login to Oracle Weblogic 12c console (http://hostname:port/console).

  2. On successful login, the following window is displayed.

  3. Click Domain Name > Services > Data Sources. The following window is displayed.

  4. Click ‘Lock & Edit’ button on the left panel. Click ‘New’ on right panel and select ‘Generic Data Source’.

  5. The following window is displayed.

  6. Specify the following details:
    • Enter Data source Name
    • Enter the JNDI Name as ‘jdbc/ofsllWSDS’.
    • Select ‘Oracle’ as Database Type.
  1. Click ‘Next’. The following window is displayed.

  2. Select the Database Driver ‘Oracle's Driver(Thin) for Services connections;Versions:Any’.
  3. Click ‘Next’. The following window is displayed.

  4. Click ‘Next’. The following window is displayed.

  5. Enter the Database details.
  6. Click ‘Next’. The following window is displayed.

  7. Click ‘Test Configuration’. On completion, displays a confirmation message as ‘Connection test succeeded’.
  8. Click ‘Next’. The following window is displayed.

  9. Select target Server as ‘WebService_ManagedServer’.
  10. Click ‘Finish’ to activate the changes.

7.2 Deploy RESTful WebService

  1. Login to Web Logic application server enterprise manager (e.g.:http://hostname:port/em)

  2. Enter valid login credentials. The following window is displayed.

  3. Click ‘Deployment’ in the left panel.
  4. Select ‘Lock & Edit’ option in the lock drop-down list available in the header. The following window is displayed.

  5. Select ‘Deploy’ from the Deployment drop-down list. The following window is displayed.

  6. The following window is displayed.

  7. Browse to the folder containing the WebService. Eg: C:/OfsllRestEAR.ear
  8. Click ‘Next’. The following window is displayed.

  9. Select the server on which the WebService needs to be deployed.
  10. Click ‘Next’. The following window is displayed.

  11. Select the option ‘Install and start application (servicing all requests)’.
  12. Check the context root and click ‘Next’.The following window is displayed.

  13. Click ‘Deploy’. On successful deployment, the following window is displayed.

  14. Click ‘Close’. Post deployment, you need to activate the changes by selecting ‘Active Changes’ option from ‘Edit Session’ drop-down list as indicated in step 4 above.

To Identify the RESTful Webservice URL

  1. Login to WebLogic Server 12c console (http://hostname:port/console).
  2. Click ‘Deployments’ Under Configuration tab and select ‘OfsllRestEAR’ services. The following window is displayed.

  3. Click ‘Testing’ tab and expand ‘OfsllRestWS’. The following window is displayed.

  4. You can view the 'OfsllRestful' Services URL as shown.