Showing posts with label Jdeveloper. Show all posts
Showing posts with label Jdeveloper. Show all posts

Monday, August 2, 2010

Installing Oracle SOA Suite 11g PS2 on Linux

Prerequisites

Note: If any of the above links are broken, just google and you will find the appropriate link.

Installation
1. Setup the Database
Use this link to install and configure Oracle XE on your machine. Then connect as SYS and run the following commands.
     alter system set processes=200 scope=spfile
     alter system set sessions=200 scope=spfile
Restart the DB

2. Repository Creation
1. Unzip the downloaded RCU zip file. 
2. Run ./rcu under RCU_HOME/bin directory
3. Follow the wizard and provide the DB details
4. In the Select Components Screen, select SOA and BPM Infrastructure and click next
5. In the Schema Password Screen, select Use same password for all schemas and provide a password
6. Select the defaults in the next screens and finish.

3. Install Weblogic Server
1. chmod +x the downloaded Weblogic Server bin file
2. Run the bin file
3. In the wizard, provide a mw_home for the server to be installed and the complete the installation with the defaults in the other screens.

4. SOA Suite 11.1.1.2
1. Unzip the appropriate zip file and run ./runInstaller. When prompted provide a JRE home.
2. Specify the mw_home where the server was previously installed.
3. Make sure the Oracle Home Directory is inside the mw_home
4. Finish the installation

5. SOA Suite 11.1.1.3 Patch
1. Unzip the appropriate zip file and run ./runInstaller. When prompted provide a JRE home.
2. Select the same Oracle Middleware Home and Oracle Home Directory as specified previously.
3. Finish the installation

6. Configure SOA Suite and Create Weblogic Domain
1. Navigate to SOA_ORACLE_HOME/common/bin and run ./config.sh
2. Select Create a New Weblogic Domain
3. In the Domain Source Screen, select Generate a domain configured automatically to support the following products, then select Oracle SOA Suite, Oracle Enterprise Manager, Oracle WSM Policy Manager, Oracle JRF WebServices Asynchronous services, Oracle JRF and Weblogic Advanced Web Services Extension.
4. In the next screen, provide a domain name and location and click next.
5. Provide the admin credentials to be set and click next.
6. Select the desired JDK  and click next.
7. In the Configure JDBC Component Schema Screen, provide the correct values for the DB Connections.
8. Complete the installation with the defaults.

Wednesday, July 28, 2010

Invoking Method Binding Programmatically

The following code snippet can be used to invoke a method binding programmatically from java:

public void invokeMB(String mBinding){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ExpressionFactory ef = fctx.getApplication().getExpressionFactory();
    ELContext elCtx = fctx.getELContext();
    ValueExpression valueExp = ef.createValueExpression(elCtx,"#{bindings}",Object.class);
    JUFormBinding a = (JUFormBinding)valueExp.getValue(elCtx);
    OperationBinding op = (OperationBinding)a.getOperationBinding(mBinding);
    op.execute();
}

Invoking Web Services in Oracle ADF

There are two ways to invoke a Web Service in an ADF Application:
1. JAX-WS Proxy
2. Web Service Data Control

JAX-WS Proxy
Just by providing the wsdl to the Create WebService Proxy wizard you can easily generate the proxy to invoke the webservice. More details on this can be found on my earlier post.
Pros:
Gives more flexibility and control to the WebService consumer. The developer can create webservice request object and can invoke the webservice as required. The proxy can also be wrapped as a DataControl (right click on the client java file and select Generate Data Control) and used in ADF.
Cons:
Maintanence is hard. Generates many files to support the proxy and the proxy has to be regenerated if the WSDL stucture changes.

Web Service Data Control
In the New Gallery select Web Service Data Control and provide the wsdl location in the wizard to generate the Data Control. Once the DataControl is generated it can be used on like any other datacontrol and the webservice's operations can be performed in ease. For eg, a button click on a page / method on taskflow.
Pros:
Easy to create and use.
Cons:
Limited control over invoking the webservice.

Wednesday, July 30, 2008

Jdeveloper TP4 and integrated SOA Server


Download Jdeveloper Technology Preview 4 from OTN. Unzip the package in your system in such a way that there are no spaces in the path.

For ex. c:\Softwares\Jdeveloper 11g\ ------ this is incorrect
Make sure that java is also installed in a location where there is no spaces in the path.

Download and install Oracle Database XE if don't have one running on your system. You dont require a database if you are not going to configure SOA in the integrated oc4j server.

Follow the instructions mentioned in this pdf to set up the Integrated oc4j server with SOA configured. Before doing this edit \jdev\bin\jdev.conf and remove or comment the last AddVMOption. If you dont do this you wont be able to see the Configure SOA option in the Tools menu.