Skip to main content

Exposing View Objects from ADF Library as Web Service

While working on large projects, you may split business components among multiple projects to improve the modularity and re-usability of the code. Obviously you can share business components between multiple model projects by packaging them in ADF library. While doing so, you may want to expose view objects from an ADF library as web service through an application module that reside in a consuming project. Though this is pretty straight forward task, you need to be aware of one point while packaging view objects in ADF library that may be later exposed as web service from another project. The point here is that,  you need to generate Service Data Object for view object  in the owning project itself. In other words you cannot expose view objects from ADF library as web service  if the view objects in ADF library are not having Service Data Object generated.
To generate SDO for a view object:

  1. Go to the project that you want to share as ADF library.
  2. Open the view object in the editor. 
  3. Choose Java tab and , click edit icon.
  4. In the Java Options dialog,  select Generate Service Data Object Class and click OK. You are done.

Now you can package the view object in ADF library and consuming project can expose this view object as web service when you service enable the application module


Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…