Hi laurentsd, when I tired to get user session using the method getUserSession from com.vmware.vise.usersession.UserSessionService in Java service of our plugin package, but get the information from log file like this:
[2017-04-17T17:20:26.372+08:00] [INFO ] region-dm-8 com.vmware.vsphere.client.security.util.Util getUserSession called on a inactive(or missing) session.
[2017-04-17T18:03:19.393+08:00] [ERROR] http-bio-9443-exec-8 com.emc.vsi.services.usersession.UserSessionInfoServiceImpl UserSession is null
Following is our code implement:
And the method getUserSession returns null. So what can I do for getting the user session correctly in Java service?(We use the html-client-sdk for developing H5 plugin in vSphere Client, and the build number is 5097204).
Note: We have already injected UserSessionService in OSGI bundle like this: