Sterling OMS Writing First Java Program

By | 07/13/2017

Sterling OMS Writing First Java Program

Sterling OMS Writing First Java Program : In this session we are going to see how to write simple java program and deploying in Sterling OMS. We are working on creating video version of this tutorial.

IBM Sterling Tutorial : Prerequisites

  1. Eclipse installed and little knowledge on Eclipse (Creating Java Project, Export Jar, Adding Jars to classpath)
  2. Java JDK installed & Basic Knowledge on Java (Package, Class, Method)
  3. OMS Installed and able to login into application

Creating New Project in Eclipse

  • Install Eclipse
  • Open Eclipse
  • Create new Java Project
  • Give project name as SterlingCustom94

Sterling OMS First Java Program

  • In Eclipse go to java build path and add Jars from “<OMS Install Directory>\jar\smcfs\9.4”
  • In Eclipse go to java build path and add Jars from “<OMS Install Directory>\jar\platform_afc\9_4”
  • Under src create package com.oms94.test
  • Under package com.oms94.test create new file
  • Write following code in Java file & Save file make sure no compile time error

Export Jar and Add part of OMS

  1. Export project and create SterlingCustom94.jar file under C:\deploy\SterlingCustom94.jar
  2. Run below command from OMS bin folder (One time Activity)

install3rdParty.cmd customjar 1 -j C:\deploy\SterlingCustom94.jar -targetJVM EVERY

  • Jar file automatically copied into <Install Directory>\jar\customjar\1\SterlingCustom94.jar
  • Below lines get added in 3 files (APPDynamicclasspath.cfg, AGENTDynamicclasspath.cfg, and dynamicclasspath.cfg files)
  • VENDOR_JAR=<OMS Install Directoty>\jar\customjar\1\SterlingCustom94.jar
  • Next time you can export the custom jar directly into <Install Directory>\jar\customjar\1 from Eclipse
  • Perform Build and deploy

OMS Build & Deployment

  • Go to bin folder
  • Run command : deployer.cmd -t resourcejar
  • Run command : buildear.cmd -Dappserver=weblogic -Dwarfiles=smcfs,sbc -Dearfile=smcfs.ear -Dnowebservice=true -Ddevmode=true -Dnodocear=true -Dwls-10=true create-ear
  • Ear file gets created under <Install Directory>\external_deployments\smcfs.ear
  • Create new folder deploy and C:\
  • Run command : del C:\deploy\smcfs.ear (Clean up any existing file)
  • Run command : copy <Install Directory>\external_deployments\smcfs.ear C:\deploy\smcfs.ear
  • Deploy manually using weblogic console from folder C:\deploy\smcfs.ear

Create New Service in OMS

  • Go to Application Manager — General — Service
  • Create new service with name “SOP” and service group name as “Custom”
  • Select Option as “In a Synchronous Mode”

Create New Service

  • Add API from components tab and connect the start and end
  • Select Extended API radio button
  • API Name : SOP
  • Class Name : com.oms94.test.SOP
  • Medthod Name : print
  • Save

Configure Extended API in OMS

Using API Tester Call the Service

Call the Service from API tester

API Name : SOP

IsFlow : Y

Calling Service using API Tester


Result gets display in weblogic console. “Hi” from print() method got invoked and displayed.

Sterling OMS First Java Program Result

If you have any question or suggestion please email to :

Register with us to get more updates

IBM OMS Sterling Interview Questions

12 thoughts on “Sterling OMS Writing First Java Program

    1. admin Post author

      Thanks Ankush for your wonderful comments. This comments keeps as motivated to do more. Please share all your feedback on each post, we like to make change as per your comments. Thanks once again.

    1. admin Post author

      Thanks keep sharing your feedback on each post. Thanks again

  1. Pingback: Sterling OMS Template Customization - Learn IBM Sterling Order Management System

  2. Pingback: Sterling OMS Overriding - Learn IBM Sterling Order Management System

  3. PB

    Thanks admin

    This post was really helpful. Really doing a great job.
    Could you please provide details about hangoff table?

    1. admin Post author


      Hangoff table is any table created with parent child relation called as hang-off table. For example you have yfs_order_line and you create child table
      keeping yfs_order_line as parent. order_line_key column will be used as foreign key. 1 record from parent and child can have multiple records. Hope this helps !!!

  4. PB

    Hi admin

    Please share the video of this tutorial.

    Thanks in advance

    1. admin Post author

      We don’t have video for the same. Thanks


Leave a Reply

Your email address will not be published. Required fields are marked *