I’m just a new guy to use webMethods.
i want to use PGP.exe to encrypt some files by java service.
But we tried so many times,just failed.
can webMethods invoke windows program?
Our code like this:
IDataCursor pipelineCursor = pipeline.getCursor();
String filepath = IDataUtil.getString( pipelineCursor, “filepath” );
String filename = IDataUtil.getString( pipelineCursor, “filename” );
String encode = IDataUtil.getString( pipelineCursor, “encode” );
pipelineCursor.destroy();
try{
Runtime rt = Runtime.getRuntime();
rt.exec("cmd.exe /k start pgp -e “+ filepath + filename +” "+encode);
}catch(Exception e){
}
// pipeline
IDataCursor pipelineflag = pipeline.getCursor();
IDataUtil.put( pipelineflag, “rtnflag”, errorMessage);
pipelineflag.destroy();