Page 1 of 1

OpenKM 5 Web Service Error

PostPosted:Thu Oct 07, 2010 6:32 am
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,

Re: OpenKM 5 Web Service Error

PostPosted:Sat Oct 09, 2010 7:19 am
by pavila
OKMRepository has no isValid() method. May be you would to say "hasNode()" ?

Re: OpenKM 5 Web Service Error

PostPosted:Mon Oct 11, 2010 9:28 am
by Viral Raithatha
Sorry for wrong writing it is not OKMRepository but it is OKMFolder.

Re: OpenKM 5 Web Service Error

PostPosted:Thu Oct 14, 2010 8:16 am
by Viral Raithatha
Please reply of my question if possible.

If you don't get my question then let me know.

Thank you :-)

Re: OpenKM 5 Web Service Error

PostPosted:Sat Oct 16, 2010 7:58 am
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

Re: OpenKM 5 Web Service Error

PostPosted:Fri Oct 22, 2010 2:47 pm
by Linsche
I also think this would be a useful function.

Thanks for explaination :)

Re: OpenKM 5 Web Service Error

PostPosted:Fri Oct 22, 2010 5:37 pm
by jllort
For what you want to use it ... explain us, and we'll implementing if we considering it's useful.

Re: OpenKM 5 Web Service Error

PostPosted:Sat Oct 23, 2010 10:29 am
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.

Re: OpenKM 5 Web Service Error

PostPosted:Sat Oct 23, 2010 2:25 pm
by jllort
I've add in our roadmap ( it might be in general ws )

Re: OpenKM 5 Web Service Error

PostPosted:Mon Oct 25, 2010 5:44 pm
by pavila
May be you are looking for the method from OKMRepository:
Code: Select all
boolean hasNode(String token, String path)