• OpenKM 5 Web Service Error

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #6737  by Viral Raithatha
 
Hi,

I am using OpenKM 5.0 web services.
In OKMRepository web services one method isValid(token, fldPath) is giving me error.

Case:
I have three folder under okm:root named folder1, folder2, folder3.
when i use isValid(token, "/okm:root/folder1") it is return true, but
when i use isValid(token, "/okm:root/folder5") it is give error to me SoapException.

I have notice that when any folder is exist at that time it will return me true but when i pass folder name which is not
exist at that time it will give me error instead of return false.

Thank you,
 #6760  by pavila
 
OKMRepository has no isValid() method. May be you would to say "hasNode()" ?
 #6837  by jllort
 
You've got a wrong idea WS is runinng right

That's the code
Code: Select all
public boolean isValid(@WebParam(name = "token") String token,
			@WebParam(name = "fldPath") String fldPath) throws PathNotFoundException,
			AccessDeniedException, RepositoryException, DatabaseException {
		log.debug("isValid({}, {})", token, fldPath);
		FolderModule fm = ModuleManager.getFolderModule();
		boolean valid = fm.isValid(token, fldPath);
		log.debug("isValid: {}", valid);
		return valid;
	}
the idea is when you've got some path, you testing if it's folder, but if you put some wrong path the is thrown a PathNotFoundException exception, that's the idea.

The ide isValid(String) method is working with some valid paths you don't know are folders or other, not to know if paths exists or not in repository this method is not implemented. If you need it talk to us, and we'll put in general purpose class
 #6903  by jllort
 
For what you want to use it ... explain us, and we'll implementing if we considering it's useful.
 #6904  by Viral Raithatha
 
I was expecting IsValid() to return true or false by checking whether folder (or document) exists or not at particular path. So it would be great if some method for this purpose is provided.

Thanks in advance.
 #6906  by jllort
 
I've add in our roadmap ( it might be in general ws )
 #6916  by pavila
 
May be you are looking for the method from OKMRepository:
Code: Select all
boolean hasNode(String token, String path)

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.