In order to run the Siebel sample, follow the instructions
below.
Before you begin
- Make sure you have a clean workspace.
- You need to obtain these files from your Siebel server administrator:
- Siebel.jar
- SiebelJI_enu.jar
About this task
After you import the sample:To create and run the
Siebel adapter sample:
Procedure
- If the Java™ EE icon,
, does not appear in the top right tab of the workspace,
you need to switch to the Java EE perspective. From the menu bar, select .
- The Select Perspective window opens. Select Java EE.
- Click OK. The Java EE perspective opens.
- Add required file dependencies:
- Siebel.jar and SiebelJI_enu.jar:
- Drag and drop Siebel.jar and SiebelJI_enu.jar from your file system to the connectorModule folder of the CWYEB_SiebelAdapter
connector project. Add these files to the classpath. You can do this
in the Properties view for the project.
- To associate the sample with your Siebel server, you need
to change the connection information in Bean implementation class.
Open up the AccountImpl.java in a Java editor, change the following section in
the code to use your Siebel server connection information.
/**
* @j2c.managedConnectionFactory class="com.ibm.j2ca.siebel.SiebelManagedConnectionFactory"
* @j2c.managedConnectionFactory-property name="adapterID" value="001"
* @j2c.managedConnectionFactory-property name="connectString" value="connectionString"
* @j2c.managedConnectionFactory-property name="languageCode" value="ENU"
* @j2c.managedConnectionFactory-property name="password" value="password"
* @j2c.managedConnectionFactory-property name="resonateSupport" value="true"
* @j2c.managedConnectionFactory-property name="siebelMetadataType" value="Siebel Business Objects"
* @j2c.managedConnectionFactory-property name="userName" value="userName"
* @j2c.connectionSpec class="com.ibm.j2ca.siebel.SiebelConnectionSpec"
* @generated
*/
- Testing the application:
- Select the Servers View, right-click WebSphere® Application Server v7.0, v8.0
or v8.5, and select Start.
- Select , and click Next.
- On theJ2C Java bean selection page, click Browse.
- On the Find J2C Bean page, Type A in the top text field, and AccountImpl - sample.siebel shows up in the Matching items field. Select AccountImpl - sample.siebel and click OK.
- Click Next.
- On the Deployment Information page, select Simple JSP, and click Next.
- On the Simple JSP Creation page, click New to launch the Web Project wizard.
- On the Web Project page, type a name in the Project name field (for example, TestWebProject).
- On the Deployment page, ensure that Target Runtime selected
is WebSphere Application Server v7.0 or v8.0. Select Add project to an EAR, and click Finish.
- On the Simple JSP Creation page, type a name in the
in the JSP folder field (for example, SampleJSP),
and click Finish..
- When the server is started, navigate to your <Web Project>/WebContent/SampleJSP/TestClient.jsp
- Right-click TestClient.jsp and select .
- The application opens in a web browser. Type a value
and click Invoke.
Results
You can see the results in the console: