Hi jllort ,
I divided the integration into 3 parts to make it fast integration.
the first part i design a custom applet (uploadtookm.jar) which contain a web start (.jlnp) ,this applet can be called from the we server.
uploadtookm.jar will contain jtree and JFileChooser,the jtree can be connected to the okm to select the uploading destination by using ftp or web drive (webdav) i userd (web drive)
the JFileChooser will select the needed document from the local disk which will be uploaded to openkm by using OKMWebservices class.
OKMWebservices ws = OKMWebservicesFactory.newInstance(host, username, password);
InputStream is;
CallableStatement callableStatement = null;
Connection conn = null;
try {
is = new FileInputStream(getuploadtxt.getText());
outputpath=lblup.getText();
com.openkm.sdk4j.bean.Document doc = new Document();
System.out.println("Uploading to openkm........");
System.out.println(outputpath);
doc.setPath(outputpath );
ws.createDocument(doc, is);
IOUtils.closeQuietly(is);
System.out.println("success out from okm");
System.out.println( (outputpath));
System.out.println( ws.getNodeUuid(outputpath));
URL="
http://localhost:8080/OpenKM/index.jsp? ... utputpath);
The second part from the oracle forum i used the penalization to setup the passed arguments which will be used in the applet as input:
http://localhost:8080/uploadtookm/dist/ ... ser_id=xxx
The third part i called oracle stored stored procedure from the applet to input UUID of the okm document
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@192.xxx.xxx.xxx:1521:EBSdatabase "apps", "xxxxxx");
conn.setAutoCommit(false);
String sql = "{call XXDPC_UPLOADTOOKM("+v_category_id+",'"+URL+"',"+pk1+",'"+entity+"',"+v_user_id+")}"; //passed value from part 2
System.out.print(sql);
callableStatement = conn.prepareCall(sql);
System.out.println("Uploaded to ERP success out ");
XXDPC_UPLOADTOOKM is a stored procedure which will call fnd_webattch.add_attachment
this is in very short explanation
thanks
Saleem