Page 1 of 1

RemoteException when calling purgeTrash via webservice

PostPosted:Tue Nov 25, 2014 7:51 am
by raygrrr
Hi experts,

I am using web services to upload/delete files, everything works fine except that lately I also need to call 'purgeTrash' function via webservice, however I get the following errors which I don't get from other web service methods:

My code:
Code: Select all
OKMRepository oKMRepository = new OKMRepositoryProxy();

try {
	oKMRepository.purgeTrash(token);
} catch (AccessDeniedException  e) {
	System.err.println("AccessDeniedException: "+e.getMessage());
} catch (RepositoryException  e) {
	System.err.println("RepositoryException: "+e.getMessage());
} catch (DatabaseException e) {
	System.err.println("DatabaseException: "+e.getMessage());
} catch (RemoteException e) {
	System.err.println("RemoteException: "+e.getMessage());;
}
Concoles message:
Code: Select all
RemoteException: ; nested exception is: 
	java.net.ConnectException: Connection refused: connect
The point I couldn't figure out is that why I can delete folder via web service but not 'purgeTrash' method? is that because this method require different access right or something?

Many thanks for your help!

Ray

Re: RemoteException when calling purgeTrash via webservice

PostPosted:Wed Nov 26, 2014 12:35 pm
by jllort
What openkm version are you using ?
My suggestion is use http://wiki.openkm.com/index.php/SDK

Re: RemoteException when calling purgeTrash via webservice

PostPosted:Fri Nov 28, 2014 7:49 am
by raygrrr
thanks for your reply, we are using openkm version 5.1.7

thanks!

Re: RemoteException when calling purgeTrash via webservice

PostPosted:Sun Nov 30, 2014 11:08 am
by jllort
Version 5.1.X is not yet supported I suggest you upgrade to version 6.3.X
If you want to continue with this version, take a look at log file to see clearly the cause of the error. Anyway take in mind we will not do any patch on this version if there's some problem.