Transports and Interfaces: Siebel Enterprise Application Integration > Integrating with Java >

About the JDB Business Service API


Aside from the business object and business component API, the primary point of integration with the Siebel application is by using business services.

There are several ways to invoke a business service. The simplest way is using the Siebel Java Data Bean directly, as shown in the following example. Alternatively, Siebel Tools provides a Code Generator which creates, for any business service, Java classes that invoke the business service. The generated code may invoke the business service either using the Siebel Java Data Bean or using the Siebel Resource Adapter. The creation and use of generated code is described in the next section. The Siebel Resource Adapter is part of the J2EE Connector Architecture, which is described in About the Siebel Resource Adapter.

Following is an example of invoking a business service directly using the Siebel Java Data Bean.

import com.siebel.data.SiebelDataBean;

import com.siebel.data.SiebelException;

import com.siebel.data.SiebelPropertySet;

import com.siebel.data.SiebelService;

public class BasicDataBeanTest {

public static void main(String[] args) throws SiebelException {

SiebelDataBean dataBean = new SiebelDataBean();

dataBean.login("siebel://mymachine:2321/siebel/SCCObjMgr_enu", "USER", "PWD", "enu");

SiebelService businessService = dataBean.getService("Workflow Utilities");

SiebelPropertySet input = new SiebelPropertySet();

SiebelPropertySet output = new SiebelPropertySet();

input.setValue("Please echo this");

businessService.invokeMethod("Echo", input, output);

System.out.println("Output: " + output.toString());

}

}

Transports and Interfaces: Siebel Enterprise Application Integration