How to Create Web Service using Application Module custom method?

How to Create Web Service using Application Module custom method?

This article is about creating Web Service using Application Module Custom method. To make it simple I’m using hr database’s Employee table and created a method that has two parameters, Employee Id (Which employee information you want to access) and Column name (what information you want to get e.g.  first name, email id).

  1. Create method on Application module Impl class
    public String getEmpInfo(String empid,String column_name)
    {
        ViewObjectImpl vo=this.getEmployeesView1();
            Key key = new Key(new Object[] { empid });
            Row row=vo.getRow(key);
            String value=(String)row.getAttribute(column_name);
            return value;
        }

2.Go to App Module -> Web Service Tab -> Click on + icon to enable web service support to application module.

3.Add Web Service Name and click on Next button

4. You can include “Built-In Methods” for service Interface, in this tutorial I am using custom application module method.

5.To test web service right click on GetEmpInfoService.wsdl file and select Test Web Service


Output:-


 

About Manish Pandey

Manish is a Project Leader at Jagran Prakashan Ltd, focused on Jdeveloper Fusion Web Application(specifically Oracle ADF). He shares his knowledge through the OTN Jdev/ADF Forum. He has written more than 50 article about Oracle ADF and Jdeveloper.

Leave a Reply

Your email address will not be published. Required fields are marked *

*