Using WebLogic Workshop to Access Web Services
BEA WebLogic Adapter for SAP User’s Guide
C-17
Calling Complex Operations in a Workflow for a BAPI
You may want to perform more complex operations in your workflow for a Business
Application Programming Interface (BAPI). The following code represents sample Java
code used to calculate the execution time of the Web service. You can do similar coding for
benchmarking or other purposes.
import resources.BAPI_MATERIAL_GET_DETAILControl;
import java.io.*;
import java.lang.*;
import java.util.*;
public class JWSNAME implements com.bea.jws.WebService
{
/**
* @common:control
*/
private resources.BAPI_MATERIAL_GET_DETAILControl
BAPI_MATERIAL_GET_DETAILControl;
static final long serialVersionUID = 1L;
/**
* @common:operation
*/
public void
BAPI(BAPI_MATERIAL_GET_DETAILControl.BAPI_MATERIAL_GET_DETAIL input)
throws Exception {
File outFile=new File("RESULTS.txt"); //creating an output file
FileWriter out=new FileWriter(outFile); //creating a fileWriter for
the output file
long diff=0; //used to store the execution time
Calendar cal_start=Calendar.getInstance(TimeZone.getTimeZone("EST"));
//creating a start calendar
System.out.println("<<<< start: "+ cal_start.getTimeInMillis());
//Display the start time of execution to the WEBLOGIC CONSOLE
BAPI_MATERIAL_GET_DETAILControl.BAPI(input);
Calendar
cal_end=Calendar.getInstance(TimeZone.getTimeZone("EST")); //create end
calendar
Summary of Contents for WebLogic Server
Page 1: ...BEA WebLogic Adapter for SAP User s Guide DN3501342 0406 April 19 2006 ...
Page 8: ...viii BEA Systems Inc ...
Page 22: ...Component Information for the BEA WebLogic Adapter for SAP 1 10 BEA Systems Inc ...
Page 54: ...Creating an XML Schema 3 20 BEA Systems Inc ...
Page 163: ...Management and Monitoring BEA WebLogic Adapter for SAP User s Guide 7 45 ...
Page 164: ...7 46 BEA Systems Inc ...
Page 294: ...Using Staging BAPIs to Retrieve SAP BW Metadata D 14 BEA Systems Inc ...