Quantcast
Channel: VMware Communities : Discussion List - VMware {code}
Viewing all articles
Browse latest Browse all 2738

Cannot get user session from com.vmware.vise.usersession.UserSessionService in Java

$
0
0

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:

1.PNG

1.PNG

 

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:

3.PNG

4.PNG


Viewing all articles
Browse latest Browse all 2738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>