Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Java business service

18 views

Published on

Java business service

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Java business service

  1. 1. Osama Mustafa pg. 1 Java Business Service (JBS) Java Business Service (JBS) is a service framework that allows custom business services to be implemented in Java and run from a Siebel application. If you have experience with java, you would likely to create Business service in java which you will find it easy. Scenario: We wanted a business service to convert Gorgerin Time to Hijri Time, We did it in java then created a JBS then implement it in Siebel. Steps : • Java Configuration in CFG. • Adding The required jar and jdk. • Creating the code and Exporting the jar file. • Creating Business service in Tools.
  2. 2. Osama Mustafa pg. 2 Contents Java Configuration in CFG ( Three Alternatives ). .........................................................................................3 Adding The required JAR and JDK.................................................................................................................4 Creating the code..........................................................................................................................................5 Create Business Service in tools....................................................................................................................7
  3. 3. Osama Mustafa pg. 3 Java Configuration in CFG ( Three Alternatives ). 1. You Can do it in Siebel Server Manager: create named subsystem JAVA for subsystem JVMSubSys with DLL="D:jdkjrebinserverjvm.dll", CLASSPATH="c:cpSiebel.jar;c:cpSiebelJI_enu.jar;c:cpExample.jar;.", VMOPTIONS="-Xrs -Djava.compiler=NONE" 2. Go to your CFG your working on Edit the Cfg with : [JAVA] DLL = D:jdkjrebinserverjvm.dll CLASSPATH = c:cpSiebel.jar;c:cpSiebelJI_enu.jar;c:cpExample.jar;. VMOPTIONS = -Xrs -Djava.compiler=NONE 3. In the Siebel client, navigate to the Administration - Server Configuration screen, Enterprises view select the Enterprise Server that you want to configure. click the Profile Configuration tab. Click New to create a new component profile and set the following parameters In the Profile Parameters list applet (the bottom applet), set the following values Set the Value of the JVM Classpath parameter. Set the Value of the JVM DLL Name parameter. Set the Value of the JVM Options record to any JVM-specific options that you would like to enable. Note: JDK 32 bit only and the required one for Siebel for example here is 1.6.0_24 32bit Name Value Profile JAVA Alias JAVA Subsystem Type JVMSubsys
  4. 4. Osama Mustafa pg. 4 Adding The required JAR and JDK. • Go to your Siebel path installation folder C:Siebel8.2.2.14.0ClientCLASSES And you will find Siebel.jar. This file you will add it to your Libraries on your IDE for example im working on Jdeveloper - Right click on your project - Don’t Forget To work the required JDK (1.6.0_24)
  5. 5. Osama Mustafa pg. 5 Creating the code • Here I will give you a template which you can work on: package com.siebel.eai.outbound.server.omnix; import com.siebel.common.util.Base64; import com.siebel.data.SiebelPropertySet; import com.siebel.eai.SiebelBusinessServiceException; public class Omnix extends com.siebel.eai.SiebelBusinessService { public static void main(String[] args){ Omnix omnix = new Omnix(); SiebelPropertySet input = new SiebelPropertySet(); SiebelPropertySet output = new SiebelPropertySet(); input.setProperty("result", "false"); try { omnix.doInvokeMethod("GregToHijry", input, output); } catch (SiebelBusinessServiceException e) { } String hijryDate = output.getProperty("hijryDate"); } @Override public void doInvokeMethod(String methodName, SiebelPropertySet input,SiebelPropertySet output) throws SiebelBusinessServiceException { if (methodName.equals ("GregToHijry")) { String hijryDate = "Hello"; input.getProperty("result"); output.setProperty("hijryDate", hijryDate); } else throw new SiebelBusinessServiceException("NO_SUCH_METHOD", "No such method"); } }
  6. 6. Osama Mustafa pg. 6 • After you test it and did your modification , Comment out the main() and export it. - Create a new Deployment Profile. - Export it as Example.jar or Omnix.jar. (This will be in class path in step 1).
  7. 7. Osama Mustafa pg. 7 Create Business Service in tools. • Create Business Service by Ctrl+N • Create the methods you mentios in Java.
  8. 8. Osama Mustafa pg. 8 • Create the Property (input/output) you defined in java. • Create Business service User Prop to define where the class is (@class) • Compile and Test the Business Service by simulator.

×