EasyManua.ls Logo

BEA WebLogic - Page 279

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-21
public class RFC implements com.bea.jws.WebService
{
/**
* @common:control
*/
private resources.RFCControl RFCControl;
static final long serialVersionUID = 1L;
/**
* @common:operation
*/
public void RFC_CUSTOMER_GET(RFCControl.RFC_CUSTOMER_GET 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
RFCControl.RFC_CUSTOMER_GET(input);
Calendar
cal_end=Calendar.getInstance(TimeZone.getTimeZone("EST")); //create end
calendar
System.out.println("<<<< end: "+ cal_end.getTimeInMillis());
Display the end time of execution to the WEBLOGIC CONSOLE
diff=cal_end.getTimeInMillis()-cal_start.getTimeInMillis();
//Calculating the difference (execution time)
System.out.println("<<<< EXECUTION time in Milliseconds:" +diff);
//Displaying the execution time to the WEBLOGIC Console
//writing to file
out.write( "start time: "+ cal_start.getTimeInMillis()+"\n");
out.write("end time: "+cal_end.getTimeInMillis()+"\n");
out.write("execution time : "+diff+"\n");
out.close(); //closing file

Table of Contents