Using ADF Connections to migrate applications across environments

Until PS5, changing the url to a web service was easy for an ADF web service data control . If you had any java proxies, you had to devise your own solution to migrating a web service connection across environments. There are different ways documented in the blogosphere. With the release of PS5, changing web service endpoints becomes a lot easier. Configuration options exposed in Enterprise Manager(EM) for any ADF application now allow you to edit or create new ADF Connections to be used in the deployed application. Besides simple Web Services, ADF BC Services, BAM Data Control connections, URL data control or even an Enterprise Scheduling Service configuration can be maintained in EM.
Lets go over some of the specifics of preparing your application to leverage this functionality. This can be typical Fusion Web Application or an Application with Human Task Based ViewController. We will consume a simple java web service and an ADF BC service in this application and deploy this to a SOA domain.

MyCompany Service

HR SDO Service

You can consume both services as Web Service Based Data Control in your application. If you do so, the adf connections are created in the connections.xml file automatically.  We will create java proxies for both services in a different application. Right Click on the service proxy in the application navigator to create the adf connection

Create SDO Connection

saveSDOConnectionService

Deploy the proxies to an adf library and include them in your application. Now comes the most important step. You have to copy the generated connections in the java proxy project to the connections.xml in your main application.

connections xml

 

MDS-Enable your application

As part of creating a SOA domain, an MDS repository is setup. If you are using a non SOA domain, you will have to configure an MDS repository before proceeding.

MDS Domain

If you dont already have, create a new SOA-MDS connection to the MDS repository in Resource Pallete for your Jdeveloper. You will need an existing database connection to your MDS schema configured in the resource pallete before you can create the SOA-MDS connection.

MDS DB Connection

SOA-MDS Connection

Now, add the SOA-MDS connection to your application

Add SOA-MDS Connection To App

Next, open the viewController project properties and select ADF View.  ADF-Faces Customization options have to be selected as shown below:

enable customization

Confirm the listener configuration in your ViewController web.xml as shown below. These are added by default if you create an ADF ViewController project or create a new Fusion Web Application.

Confirm Web XMl Callbacks

And finally, configure your MDS connection information in the adf-config.xml as shown below.

 

 Deploy Application

The application is now ready to be deployed. Start the deploy process from Jdeveloper. MDS Configuration will be displayed during the deploy:

Deploy MDS Tab

Deploy Connections Tabe

Once the deploy completes, login to EM and select your application. From the Application deployment menu, select ADF –> ADF Connections.

VerifyConnectioninEM

connectionDisplayedInEM

Your simple java web service and ADF BC services are displayed. Now, you can change your web services as you please.

ADF Connections migration can also be automated in your ant scripts. I’ll leave that topic for the next post.  Read up on Reference 3 till then.

  1. Reference: Fusion Developer’s Guide – Exposing Web Services Using the ADF Model Layer
  2. Reference: Monitoring and Configuring ADF Connections
  3. Reference: Metadata Services (MDS) Custom WLST Commands

vivek

Oracle Fusion Middleware Architect at FUSION Applied
Vivek is an Oracle Certified Fusion Middleware architect. He has over 18 years of experience implementing custom software solutions in the Financial, Health, and Government sectors. He is one of the founders of Fusion Applied.
vivek

Leave a Reply

avatar
  Subscribe  
Notify of