• Issue with OpenKM 6.2.4 WSDL webservice

  • 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.
 #25274  by vinodkanhe
 
Hi,

I have configured OpenKM 6.2.4 with tomcat.
I have created a user "test" having ROLE_USER from admin tab.
while obtaining authentication token using "test" users credentials to access the folders and document list via WDSL webservice, iam getting RepositoryException, but the same is working for default user "okmAdmin" and iam aslo able to view the document and folder list.
While investigating in OpenKM, i found out there was no folder for user "test" under /okm:trash, /okm:personal, /okm:mail but folder for user "okmAdmin" were available under above mentioned locations.

Below is the sample code iam using to access the web service :
Code: Select all
authURL = new URL(OKMAuth_Service.class.getResource("."), baseUrl+"/OKMAuth?wsdl");
folderURL = new URL(OKMFolder_Service.class.getResource("."), baseUrl+"/OKMFolder?wsdl");
documentURL = new URL(OKMDocument_Service.class.getResource("."), baseUrl+"/OKMDocument?wsdl");
OKMAuth_Service authService = new OKMAuth_Service(authURL, new QName("http://ws.openkm.com", "OKMAuth"));
OKMAuth auth = authService.getOKMAuthPort();
authToken = auth.login("test", "test");
here is the stack trace of exception :
Code: Select all
com.openkm.ws.client.auth.RepositoryException_Exception: 1b450df3-c179-49e9-8944-bd556eaf54b7 : /okm:trash
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
	at $Proxy30.login(Unknown Source)
	at TestOpenKM.main(TestOpenKM.java:30)
Here is my environment details :
Java 1.6
Tomcat bundle 7.0.27
OpenKM 6.2.4
 #25310  by jllort
 
First time user login from UI are created some nodes. The problem is that you're connecting with webservices with a user who never has been logged from UI and these internal folders are not created. This is a know bug which seems in community has already not been solved. Try login first in UI with user and then use in webservices that should solve it.
 #25359  by vinodkanhe
 
After logging in through UI, the issue is resolved.
Thanks, for the help.

Iam getting exception with Search service this time :
Here is my code sample :
Code: Select all
String url = "http://localhost:8080";
URL authURL = new URL(OKMAuth_Service.class.getResource("."), url+"/OpenKM/services/OKMAuth?wsdl");
URL searchURL = new URL(OKMAuth_Service.class.getResource("."), url+"/OpenKM/services/OKMSearch?wsdl");
OKMSearch okmSearch = new OKMSearch_Service(searchURL, new QName("http://ws.openkm.com", "OKMSearch")).getOKMSearchPort();
OKMAuth okmAuth = new OKMAuth_Service(authURL, new QName("http://ws.openkm.com", "OKMAuth")).getOKMAuthPort();
String token = okmAuth.login("okmAdmin", "admin");
QueryParams params = new QueryParams();
params.setDomain(1);
params.setName("audit");
params.setPath("/okm:root/Test/");
List<QueryResult> results = okmSearch.find(token, params);;
for(QueryResult qResults : results) {
         System.out.println(qResults.getDocument().getAuthor());
}
Here is the stack trace :
Code: Select all
com.openkm.ws.client.search.RepositoryException_Exception: Path Not Found: 5daa4454-cfff-4e66-a5e7-ea202f8fe59c : /okm:root/References
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
	at $Proxy33.find(Unknown Source)
	at TestOpenKM.main(TestOpenKM.java:74)

While investigating through debugging OpenKM 6.2.4 code exception is being thrown from
Code: Select all
com.openkm.module.db.stuff.SecurityHelper.checkRead(line no 84)
com.openkm.dao.SearchDAO.findFoldersInDepth(line no: 540)
om.openkm.module.db.DbSearchModule.prepareStatement(line no : 197) 
Also in this method com.openkm.module.db.stuff.DbAccessManager.isGranted which is called from com.openkm.module.db.stuff.DbAccessManager.isGranted the user name retrieved from com.openkm.spring.PrincipalUtils.getUser() was anonymousUser, but the token used was of okmAdmin user.
 #25377  by pavila
 
Have you generated the client SOAP stuff from the OpenKM 6.2.4 WSDL ? Can you reproduce the problem with the last night build?
 #25392  by vinodkanhe
 
Hi,

I wasn't able to locate last night build.
So, i checked out code from : http://svn.code.sf.net/p/openkm/code/br ... 6.2/openkm and created a build out of it.
The issue was not reproducible on this build, and search results were perfect.
Can you provide me with the location of last night build so that i can try reproducing the issue on same, or its not required now since i have created a war from the latest code base for 6.2 branch.
 #25526  by pavila
 
Sorry, but we do have any prevision. If this new version is working fine, I think we can release it soon.

Still waiting for community feedback.

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.