Hi Reamon,
I’m tring to integrate DBADAPTERS which is an integartion tool with webMethods.
DBADAPTERS is a middleware where I can integarte applications.
So I’m trying to call the adaptor by writing Java Code in webMethods.
I am new to webMethods eventhough I have some knowledge in Core Java.
There are many userdefined functions used here to run the adaptor,shut down the adaptor etc.When I searched for these functions they are actually present in Java.But I dont know why it is not accepting.When I run this code,I’m getting symbol not found.I’m giving the code below:
IDataCursor pipelineCursor = pipeline.getCursor();
String adaptorName = IDataUtil.getString( pipelineCursor, “adaptorName” );
Properties propertyObj = (Properties) IDataUtil.get( pipelineCursor, “propertyObj” );
pipelineCursor.destroy();
String successFlag = “TRUE”;
System.out.println(“About to invoke adapter”);
writeLog(“About to invoke adapter”);
try{
System.out.println("props = " + propertyObj);
RunAdaptor adaptor = new RunAdaptor(adaptorName, propertyObj);
// ShutdownRunAdaptor adaptor = new ShutdownRunAdaptor(adaptorName, propertyObj);
System.out.println(“Instance created”);
writeLog("Instance created ");
adaptor.run();
System.out.println("Adapter running... About to terminate");
writeLog("Adapter running... About to terminate");
adaptor.getController().terminate();
System.out.println("Adapter terminated");
writeLog("Adapter terminated");
}catch (Exception e){
successFlag = "FALSE";
ibe.printStackTrace();
writeLog("In 1st Catch Block");
throw new ServiceException("IbafException " + ibe.getMessage());
}catch (ClassCastException cce){
successFlag = "FALSE";
cce.printStackTrace();
writeLog("In 2nd Catch Block");
throw new ServiceException(" ERROR IN CREATING THE LOCALSOURCE;CHECK COMPONENT NAME AND LOGGING " + cce.getMessage());
}catch(Exception e){
successFlag = "FALSE";
e.printStackTrace();
writeLog("In 3rd Catch Block");
throw new ServiceException(" ERROR IN SETUP OF THE IBUSADAPTOR " + e.getMessage());
}
pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “successFlag”, successFlag );
pipelineCursor_1.destroy();
Please try running thsi code and let me know why the error is coming and how I can define these classes.For example writeLog is a method in class LogWriter.
But when I give LogWriter.writeLog…
ie;classname.method_name then also I’m getting the same error.
Is it because it is not able to find the Java Class?
What should be the path of JAVA_DIR in server.bat file?
Right now it is :
SET JAVA_DIR=C:\Program Files\Java\jdk1.5.0_07
Even if I need to use a jar file ,will simple giving it in the class_path will import these jars?