EasyManua.ls Logo

BEA WebLogic - Calling Complex Operations in a Workflow for a BAPI

BEA WebLogic
294 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents