In many cases ADF and JDeveloper automatically creates connections ( like a ADF WS DataControl ) which could not be changed after deployment, you need to do this before deployment or change the EAR.
With PS5 you can change these connections in the "Configure ADF Connections" menu option on the application deployment ( EM ). This is also possible with WLST where you can change and persist the attributes of the application connection MBean.
If you want to do this you need to do the following steps
- Have a WebLogic domain which has a configured MDS repository.
- Add some listeners to the web.xml ( for the MBean support).
- Enable MDS ( else the connection details won't be persisted ).
- Add an ADF Connection on the Web Service entry when you use a Web Service Proxy.
In this blogpost I will show you the steps how to make this work and change in this example the endpoint of a web service.
We start for example by adding an ADF WS DataControl.
This will always add a ws connection to the connection.xml file in the ADF META-INF Folder.
This is also possible on a Web Service Proxy when you don't use an ADF WS DataControl.
Select the service and right click on Create ADF Web Service Connection.
Click on OK
Prepare your Application for allowing to change your ADF Connections.
First we need to add the ADFConnectionLifeCycleCallBack and the ADFConfigLifeCycleCallBack listeners to the web.xml. This enables the ADF Connection Mbean support.
Enable User Customizations ( across sessions using MDS ) and Enable Seeded Customizations.
We are ready to deploy our application.
You should see the MDS and Connections Tabs when you deploy from JDeveloper.
Optional look at the connections.
After deployment we change the WSDL URL and endpoint in the Enterprise Manager.
First select your application deployment.
Here we can see our connection. Because we enabled MDS on the application we can change the connection else you won't see the Edit , Delete buttons.
Change the WSDL URL by clicking on the Edit button. Click on OK and apply the changes. The new URL is stored in the MDS repository.
Also click on Advanced Connection Configuration where we also need to change the endpoint address and click on Apply.
We are ready to test the application with the new WSDL url and endpoint.
You can also change these with WLST,
for this you need to go the System MBean Browser of EM to find your mbean for example oracle.adf.share.connections:ApplicationName=YourApp,Location=WLSserver,name=ADFConnections,beantype=Runtime,type=ADFConnections,Application=YourApp