Domain Portal

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label Web Services. Show all posts
Showing posts with label Web Services. Show all posts

Sunday, 29 July 2007

Web Service Invocation in Oracle ADF

Posted on 02:17 by Unknown
Some time ago I was blogging about how to access persistence layer through Web Service interface - Web Services and Oracle TopLink. I have mentioned, that I will extend developed sample and will show how it is possible to use Web Services in Oracle ADF View layer.

Frank Nimphius have posted this week how-to article on OTN - Using Web Services with Complex Return Types in ADF. In this article, Frank describes in detail how to include and use your Web Service in Oracle ADF application. I have decided to apply described steps and develop client application - WSTopLinkClient.zip for my previously developed sample Web Service - WSTopLink.zip.

In developed client application, data retrieved from Web Service, is shown in af:table component:


Data for all three columns is retrieved from Web Service, however labels for regionId attribute are provided from client application Model layer. In Oracle ADF, data from Web Service can be easily merged with data provided by Model layer.

When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.
Read More
Posted in ADF, TopLink, Web Services | No comments

Saturday, 21 July 2007

Invoking BPEL Process from Oracle ADF Application

Posted on 05:44 by Unknown
In today post I have decided to describe and show how application developed using Oracle ADF can fit into SOA (Service-Oriented-Architecture). SOA is important technology, because it allows developers to find common language with business analysts and as result to develop more useful systems. Simply speaking, SOA allows to participate in system development both parties - IT and non IT. IT folks develop technical things and non IT people are allowed to manage system logic. My goal is to show, how it looks in reality, and how it works with Oracle JDeveloper and Oracle SOA Suite. Sample applications are developed using Oracle JDeveloper 10.1.3.3 and BPEL process is tested on Oracle BPEL Process Manager 10.1.3.1.0. For those who will want to look further, I recommend to browse through Guides and Tutorials available on Oracle BPEL Process Manager 10.1.3.1.0 Information page.

Web application - SalaryBonusApplication.zip and synchronous BPEL process - SalaryBonusProcess.zip are provided as sample applications. Web application Model layer is implemented using Oracle ADF Business Components and is based on standard HR schema, in View layer ADF Faces components are used. Synchronous BPEL process access HR schema using Oracle TopLink.

Developed logic - in Web application users can search for particular employee and select him/her for salary update process. Salary update is based on current salary and applied bonus value. Salary update business logic is implemented in BPEL process. So, it's where we can see a power of SOA - salary update business logic can be changed at any time by non IT people, they will just need to modify defined process.

I will start from process part description. Implemented BPEL process diagram:


In first step, process receives input. In second step, conditional logic is applied and process output is calculated. When process output is known, data is transformed to be compatible with EMPLOYEES table structure from HR schema. After transformation step, employees data update in database is invoked and process is finished.

As it was described, salary update process is based on two parameters - current salary and applied bonus, however employee ID is also needed. Process parameters are described in XSD document:


Process logic is implemented in switch activity. Switch activity rule is based on bonus variable value:


When process output is calculated, data should be transformed in order to be stored in EMPLOYEES table. Transformation can be defined using Oracle JDeveloper wizard tool:


And finally, transformed data is used in database update through Invoke activity:


Yes, database table will be updated from BPEL process. And there is no magic, simply Oracle TopLink object-relational mapping functionality is used. Complete project structure view in Oracle JDeveloper navigator:


Process part description is completed, now we will move to Web application part. Web application contains two forms, first is Search Employees form:


Second form - Edit Employee Salary, can be opened for selected row:


Update Salary button here invokes BPEL process. Salary calculation is done outside of Web application, through Web Service submited values are passed to process where are modified and stored to database. In Web application refresh action is executed and updated values are shown:


You can notice, that salary value is increased by 100, this logic is defined in BPEL:


You may wonder, how BPEL process can be included into Web application developed using Oracle ADF. But it is simple, Oracle JDeveloper provides complete solution - you just need to provide WSDL URL and Data Control for available operations will be generated and displayed in Data Control pallette:


BPEL process is accessed through Web Service specified in DataControls.dcx file:


Action related to BPEL process is defined in page definition file in standard way:


Executed BPEL process instance can be explored from Oracle Enterprise Manager 10g BPEL Control window - executed process steps are represented in visual flow and values available in each step are provided:


When running sample application, don't forget to add adf-faces-impl.jar and jsf-impl.jar to application's WEB-INF\lib directory.
Read More
Posted in ADF, BPEL, SOA, Web Services | No comments

Sunday, 10 June 2007

Web Services in Oracle JDeveloper 11g

Posted on 06:46 by Unknown
I have received a comment for my previous post - Web Services and Oracle TopLink, about if to try similar sample on Oracle JDeveloper 11g Technical Preview release. Yes, it is interesting, just because you can compare and evaluate new powerful features that will bring JDeveloper 11g Production release. I have tested Web Services development support in 11g using developed sample application - WSTopLink11.zip, this sample implements annotation only Web Service. I have used the same business logic as for previous one.

For persistence layer I'm using JPA entity with two Named Queries - Countries.findAll and Countries.findByName. When creating EJB Session Bean, Web Service Endpoint Interface is declared in the same way as in JDeveloper 10.1.3:


Generated interface for EJB Session Bean contains @WebService annotation, that in fact allows to use EJB Session Bean as Web Service directly:


Developed application structure in Application navigator window:


Oracle JDeveloper 11g provides embedded tool, that allows to test developed Web Service without deploying it to the server - just right click on EJB Session Bean and select - Test Web Service:


HTTP Analyzer window will be opened, where you can choose available operations to test, provide values for parameters and browse through generated result. Four views are provided - SOAP structure, HTTP Content, Hex Content and Raw Message. In our case, queryCountriesFindAll() generates similar result:


And, for queryCountriesByName(parameter) only result that is correct for specified parameter is shown:

Read More
Posted in JDeveloper 11g, TopLink, Web Services | No comments

Sunday, 3 June 2007

Web Services and Oracle TopLink

Posted on 12:14 by Unknown
If you are Oracle TopLink developer and want to access persistence layer through Web Service interface, hopefully you will find an answer in this post. Developed sample - WSTopLink.zip, doesn't provide user interface, it will be tested on Oracle Application Server. I will post how to use Web Services in Oracle ADF Faces in my future posts. Current sample is based on standard HR schema and provides functionality of querying for all or one particular country. Below I will provide main aspects I have noticed, when developing access to TopLink persistence layer through Web Service.

1. You should create Oracle TopLink entity objects in the same way, like you create them always. But, when creating EJB Session Bean don't forget to include Web Service Endpoint interface.


2. When creating Java Web Service, don't check 'Autogenerate Service Endpoint Interface'. It's because endpoint interface is already generated and is represented by EJB Session Bean.


3. In the step 5 of 8 in Java Web Service dialog you can select methods accessible through Web Service. In developed sample I have enabled access only to two methods - findAllCountries and findCountryByName.


4. Finally, JDeveloper generates all needed files. Generated WSDL document should look similar in Design view:


5. Developed application structure in Application navigator window:


6. One important thing - WAR Deployment Profile Properties dialog. Deployment profile for Web Service is generated automatically, but Oracle TopLink configuration files aren't included into it by default. So, don't forget to include them.


7. Access to persistence layer through Web Service is done, it's time to test it. I have deployed developed application to Oracle Application Server and have tested using standard interface provided by AS.


8. Let's press 'Invoke' button - information about all countries available in database table will be returned.


9. I have defined two operations to be available. Second operation accepts parameter and provides information only for country specified in that parameter. For example, if parameter value is set to Albania and 'Invoke' button is pressed, information only for that country will be returned.


Result:

Read More
Posted in TopLink, Web Services | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Groovy - Multiple LOV's per Attribute in JDeveloper 11g
    I was blogging previously about multiple LOV's per attribute functionality. I was using RowImpl class for View object in order to calcu...
  • Workaround for Null Value Bug in ADF List Of Values 11g
    Those of you, who are using List Of Values (LOV) component in ADF 11g, most probably already have noticed bug related to Null value. Simple ...
  • The Best of IBM - IBM Bravo !
    Today I received IBM Bravo certificate, for my Top-Performance in IBM Global Business Services, during last year. This award is for my succe...
  • JDeveloper 11g Masterclass in Vilnius
    I'm posting update to my previous post - Oracle Forms to SOA workshop in Vilnius , where I was describing masterclass session I will do ...
  • External Transaction Service in Oracle TopLink
    I have developed sample application, in order to demonstrate how to use External Transaction Service (ETS), when Oracle TopLink is used in M...
  • After UKOUG'08
    This week I was on UKOUG'08 conference. I really have enjoyed high quality of its content and I have learned new technical things about...
  • Oracle Day'08 in Vilnius
    During this week, on October 30th, Thursday, there will be Oracle Day'08 event in Vilnius. Its a traditional Oracle event in my country,...
  • Many-to-Many mapping in Oracle TopLink
    This kind of mapping in relational world is constructed using three tables. However, in object world only two classes are used for many-to-m...
  • Hints for ADF 11g Application Credential and Policy Migration to Standalone WebLogic Servers
    Recently I was deploying our ADF 11g application on standalone WebLogic server. Deployment itself is straightforward, however it is little b...
  • Trip to US
    I'm in US this week, Connecticut. Here is the same weather as in Lithuania, it's winter with about -5 degrees in Celsius.

Categories

  • ADF
  • Apex
  • Apple
  • BPEL
  • Events
  • Forms
  • Groovy
  • JDeveloper 11g
  • Nomination
  • ODTUG Kaleidoscope
  • OFUG
  • Oracle Magazine
  • Oracle OpenWorld
  • Security
  • SOA
  • Spatial
  • TopLink
  • Traveling
  • Uncategorized
  • Vgo Software
  • Web Services
  • WebCenter
  • WebLogic
  • Workarounds

Blog Archive

  • ▼  2008 (72)
    • ▼  December (2)
      • Groovy - Multiple LOV's per Attribute in JDevelope...
      • After UKOUG'08
    • ►  November (3)
    • ►  October (9)
    • ►  September (4)
    • ►  August (9)
    • ►  July (6)
    • ►  June (10)
    • ►  May (4)
    • ►  April (5)
    • ►  March (7)
    • ►  February (5)
    • ►  January (8)
  • ►  2007 (65)
    • ►  December (6)
    • ►  November (7)
    • ►  October (6)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ►  June (6)
    • ►  May (5)
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile