Page 1 of 1

Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Tue Sep 03, 2013 1:38 pm
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

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Wed Sep 04, 2013 6:48 pm
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.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Wed Sep 11, 2013 6:31 am
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.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Thu Sep 12, 2013 6:15 am
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?

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Thu Sep 12, 2013 10:04 am
by vinodkanhe
Hi,
yes, i have generated client SOAP stuff from the OpenKM 6.2.4 WSDL.
Will try to reproduce this on latest nightly build and keep you updated on same.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Thu Sep 12, 2013 12:13 pm
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.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Sat Sep 14, 2013 5:50 pm
by jllort
You can download night build at http://integration.openkm.com/ which is build from latest 6.2 branch ( on future will be 6.2.5 )

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Wed Sep 18, 2013 11:49 am
by vinodkanhe
Hi,
I was able to get latest 6.2 branch night build from http://integration.openkm.com/.
The issue with Search service was not reproducible on this build, and search results were perfect.

Can you please let me know the tentative date of releasing 6.2.5.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Fri Sep 20, 2013 10:07 am
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.

Re: Issue with OpenKM 6.2.4 WSDL webservice

PostPosted:Fri Sep 27, 2013 12:39 pm
by vinodkanhe
Thanks.