Page 1 of 1

OKMFolder Rename Problem

PostPosted:Fri Feb 11, 2011 4:40 am
by mike_m
Hi there

I am currently using OpenKM 5.0 (build: 4203) and trying to implement a Web Service client on OKMFolder.
I created the client using Eclipse Helios from my
http://office.uit.gr:8888/OpenKM/OKMAuth?wsdl
http://office.uit.gr:8888/OpenKM/OKMFolder?wsdl
and managed to do some operations first utilizing OKMAuth.login(), OKMFolder.create()...

But when it comes on OKMFolder.rename() I get the following error :
Code: Select all
Feb 11, 2011 6:19:22 AM gr.uit.eprotocol.ws.OkmProtocolDispatcherImpl getInstance
INFO: Binding with http://office.uit.gr:8888/OpenKM/OKMFolder
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode: 
 faultString: CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043: CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://endpoint.ws.openkm.com/}RepositoryException:<message>CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043: CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043</message>

CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043: CallbackHandler does not support: javax.security.auth.callback.NameCallback@6e580043
	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)
I also notice, that in any error case the thrown exception does not have an error message. To trap the exception I do something like:
Code: Select all
try{
  OKMFolderProxy folderProxy = new OKMFolderProxy();
  Folder nodeFolder = folderProxy.rename( renameRequest.getOkmToken(), 
					                       renameRequest.getOldPath(), 
					                       renameRequest.getNewPath());	
logger.info("Renamed : " + nodeFolder.toString() );
}catch(Throwable e){
   logger.severe( e.getMessage() );
  ...
}
Any Ideas?

Thanks in advance

Mike

Re: OKMFolder Rename Problem

PostPosted:Fri Feb 11, 2011 6:51 am
by mike_m
Same problem with
Code: Select all
 OKMFolder.move

Re: OKMFolder Rename Problem

PostPosted:Fri Feb 11, 2011 12:40 pm
by jllort
Take a look here :

http://openkm.svn.sourceforge.net/viewv ... iew=markup

Specially it
Code: Select all
BindingProvider bpAuth = (BindingProvider) okmAuth;
BindingProvider bpDocument= (BindingProvider) okmDocument;
bpAuth.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, host+"/OKMAuth");
bpDocument.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, host+"/OKMDocument"); 

Re: OKMFolder Rename Problem

PostPosted:Sat Feb 12, 2011 4:59 pm
by mike_m
I did not understand the difference between to what I did and what you provided.
Both we set up a different port on runtime to a given Web Service Client implementation.
The only difference is that I do it using proxy stub to the web service and not a reference to a rebound web service interface like you do.

Anyway...,
The problem caused because I lost the session token somewhere... So I was able to login and do some stuff, but the session token was laterly lost. Due to the fact that the default session callback message is not helpful (it should be something more obvious like "wrong session token id" instead of the scary "CallbackHandler does not support"), I lost enough time on debugging a very trivial thing...

The solution came from that post http://forum.openkm.com/viewtopic.php?f=4&t=4170

I Wrote the procedure for developing a Java Web Service Client analytically here:
http://wiki.openkm.com/index.php/User_talk:Svaitsis.gss


Thanks for your help.