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.
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
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.
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.
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.
Now, add the SOA-MDS connection to your application
Next, open the viewController project properties and select ADF View. ADF-Faces Customization options have to be selected as shown below:
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.
And finally, configure your MDS connection information in the adf-config.xml as shown below.
<persistence-config> <metadata-namespaces> <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/> <namespace path="/apps" metadata-store-usage="mstore-usage_2"/> </metadata-namespaces> <metadata-store-usages> <metadata-store-usage id="mstore-usage_1"> <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore"> <property name="metadata-path" value="C:/jdeveloperps5/jdeveloper/integration"/> <property name="partition-name" value="seed"/> </metadata-store> </metadata-store-usage> <metadata-store-usage id="mstore-usage_2" default-cust-store="true" deploy-target="true"> <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore"> <property value="dev_mds" name="jdbc-userid"/> <property value="welcome1" name="jdbc-password"/> <property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521"/> <property name="partition-name" value="soa-infra"/> <property name="repository-name" value="mds-soa"/> </metadata-store> </metadata-store-usage> </metadata-store-usages> </persistence-config>
Deploy Application
The application is now ready to be deployed. Start the deploy process from Jdeveloper. MDS Configuration will be displayed during the deploy:
Once the deploy completes, login to EM and select your application. From the Application deployment menu, select ADF –> ADF Connections.
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.
- Reference: Fusion Developer’s Guide – Exposing Web Services Using the ADF Model Layer
- Reference: Monitoring and Configuring ADF Connections
- Reference: Metadata Services (MDS) Custom WLST Commands
- Fusion Applied Training Mobile Apps Released - August 26, 2018
- Using RPA vs API based Integration - June 7, 2018
- Chatbots with DialogFlow and AWS Rest Services - May 9, 2018