Paras,
It is a user defined java service…unable to run it
I am pasting the code below:
[highlight=java]
// input from pipeline
IDataHashCursor pipelineCursor = pipeline.getHashCursor();
pipelineCursor.first( “GSG_ack_number” );
String GSG_ack_number = (String) pipelineCursor.getValue();
pipelineCursor.first( “transaction_number” );
String transaction_number =(String) pipelineCursor.getValue();
pipelineCursor.destroy();
// Build log file directory
// save in package’s pub directory
String Curr_Dir = System.getProperty(“user.dir”);
String File_Sep = System.getProperty(“file.separator”);
String This_Package =
Service.getPackageName ( Values.use( pipeline ) );
String Pub_Dir = Curr_Dir + File_Sep +
“packages” + File_Sep + This_Package + File_Sep + “pub”;
String Log_File = Pub_Dir + File_Sep + “log.txt”;
// Date for log file
Date currentDate = new Date();
SimpleDateFormat sdf;
sdf = new SimpleDateFormat( “yyy-MMM-dd hh:mm:ss zzz” );
String Date_String = sdf.format( currentDate );
// Write the file
try{
FileWriter log = new FileWriter( Log_File, true );
log.write( Date_String );
log.write( ", " );
log.write( transaction_number );
log.write( ", " );
log.write( GSG_ack_number );
log.write( System.getProperty(“line.separator”) );
log.close();
} catch( IOException e) {
System.out.println( e.toString() );
}
[/highlight]
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB