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
cal_end=Calendar.getInstance(TimeZone.getTimeZone("EST")); //create end
calendar
BEA WebLogic Adapter for SAP User's Guide
{
BAPI_MATERIAL_GET_DETAILControl.BAPI(input);
Calendar
Using WebLogic Workshop to Access Web Services
C-17
Need help?
Do you have a question about the WebLogic and is the answer not in the manual?