Monday Jan 26, 2015

Passing User Context When Invoking ADF BC SOAP Web Services by Steven Davelaar

clip_image002

Introduction

ADF web applications often use session-scoped user context information that is also used in the ADF Business Components (ADF BC) layer. For example, the user language might be used to query language-specific data from the database. This article explains how this user context can be set up when accessing the ADF BC layer through its SOAP-based web service layer rather than through a web application.

Main Article

To access session information in the ADF BC layer, ADF developers typically use the ADFContext object. For example, when the preferred user language is stored on the HTTP Session under the key “userLanguage”, this information can be accessed in the ADF BC layer using the following statement:

String language = (String)ADFContext.getCurrent().getSessionScope().get("userLanguage");

This value can then be used in the prepareSession method of an application module method to set the user language in a database context package. This saves us the tedious work of passing in the user language as a bind variable to every database query.

When accessing an application module as a SOAP web service using the SDO service interface we need to set up the same data in the ADFContext to ensure the database queries can be executed correctly.This can be done by creating a SOAP Message Handler. A SOAP message handler provides a mechanism for intercepting the SOAP message and header in both the request and response of the Web service. To add a SOAP message handler to our ADF BC service interface, we add the HandlerChain annotation at the top of our application module SDO service class: Read the complete article here.

WebLogic Partner Community

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.

Blog Twitter LinkedIn Forum Wiki

Sunday Oct 26, 2014

Mobile Persistence Extension for Oracle MAF by Steven Davelaar

Introduction
Oracle has released Oracle Mobile Application Framework (MAF), the new cross-platform development framework for mobile applications that supersedes ADF Mobile. Oracle A-Team has upgraded its Mobile Persistence Extension to work with Oracle MAF. This mobile persistence extension adds significant value to Oracle MAF: it allows easy consumption of RESTful services, and provides a complete persistence layer that allows you to use the mobile application in offline mode. You can read and write data while not connected to the internet, and synchronize any pending data changes later when you are online again.


Oracle MAF product development has acknowledged the value of this extension and will incorporate the functionality of this extension in a new release of MAF that will become available later this year. This article introduces the new MAF release of this persistence extension that you can start using today. It discusses the enhanced REST-JSON wizard in great detail and provides download and getting started instructions at the end of this article.

Main Article
The Case for REST-JSON
With the availablity of Oracle SOA Suite 12c, it has become much easier to convert back-end SOAP web services to REST-JSON services. SOA Suite 12c is a release that focusses on “RESTifying” your back end services, and provides powerful declarative features to publish a RESTful API for mobile consumption. Here are some articles that provide more information about this functionality:

You might wonder why this is so important since Oracle MAF (and its predecessor ADF Mobile) provide strong support for consuming SOAP-based web services. Well, to make a simple and clear statement: if you are planning to build mobile applications, Oracle A-Team strongly recommends to communicate through REST-JSON services with your back-end applications. The reason for this is simplicity and performance. The REST architectural pattern is very easy to work with. The performance overhead with SOAP web services is bigger. XML payloads are more verbose than JSON, which means the size of the data packets sent over the wire is bigger. In the mobile client, XML parsing is a relatively expensive task compared to JSON payloads that can be used directly in JavaScript. So, if you have existing SOAP-based web services you want to consume in a mobile application, we recommend to transform these web services to RESTful services using Oracle Service Bus (OSB) 12c. For new web services that you still need to build, you might consider using JAX-RS which is a standard Java API that makes it fast and easy to disclose your back-end data and business logic through a RESTful API. Note that even if the back-end service is already in REST-JSON format it is still a good idea to virtualize access to it using OSB, decoupling your mobile application from the actual back-end service implementation.
A Sample HR REST API Created with EclipseLink/Toplink RESTful Data Services Read the complete article here.

WebLogic Partner Community

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.

Blog Twitter LinkedIn Mix Forum Wiki

Wednesday Apr 23, 2014

Going Mobile with ADF – Implementing Data Caching and Syncing for Working Offline Part II by Steven Davelaar

Introduction

When building ADF Mobile applications that go beyond displaying read-only data, you quickly find yourself programming Java code. If you want to use the on-device SQLite database to store data locally, for example to cache data or to enable working in off-line mode, the amount of code you have to write quickly increases, and while programming you probably realize that you are repeating the same coding patterns for each web service that you want to call to read or write data. This article introduces the second release a the ADF Mobile Persistence extension created by the A-team which avoids most of these coding patterns by using highly generic Java code driven by metadata. In addition, the few Java classes that are still needed are auto-generated for you, and a default mobile user interface can also be generated. This extension takes ADF Mobile development to the next level, effectively allowing you to create within a few minutes a fully functional ADF Mobile application that reads and writes data using a remote web service. In addition all data is stored locally on the device in the SQLite database, allowing you to use the application in offline mode. Basic data synchronization functionality is also provided to process transactions made in offline mode. This article explains how to use the three main wizards from this extension that do all the “magic”. At the bottom of this article, you can find a link to download the extension and links to some videos that illustrate the development process.

Main Article
In the first part of this article, Going Mobile with ADF - Implementing Data Caching and Syncing for Working Offline Part I, written in October 2013, we described the architecture and programming effort required to implement data caching and data syncing functionality to your mobile application.

We also introduced the first release of the A-Team ADF Mobile Persistence extension in this article. Since then we have enhanced this extension significantly by adding four powerful design-time wizards. After installing the new version of this extension, you will notice a new category “ADF Mobile” in the New gallery under Business Tier. Read the complete article here.

WebLogic Partner Community

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.

Blog Twitter LinkedIn Mix Forum Wiki

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
11
31
 
       
Today