Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

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

$
0
0

Hi laurentsd, I faced a problem about using com.vmware.vise.usersession.UserSessionService for getting user session from vSphere Client, when I take the getUserSession() method from UserSessionService to develop our plugin in vSphere Client, the vSphere Client log reports the information like this:

 

[2017-04-17T18:03:19.392+08:00] [INFO ] http-bio-9443-exec-8          com.vmware.vsphere.client.security.util.Util                      getUserSession called on an inactive session.

[2017-04-17T18:03:19.393+08:00] [ERROR] http-bio-9443-exec-8          com.emc.vsi.services.usersession.UserSessionInfoServiceImpl       UserSession is null

 

Obviously from com.vmware.vise.usersession.UserSessionService you get the user session is null. I wonder why it would lead to such a result and how can I get the user session correctly from vSphere Client using the method?

 

We use the html-client-sdk(version: 6.5.0, build: 5097204), and our code implement like this:

1.PNG

2.PNG

Also we inject UserSessionService  by OSGI bundle like this:

3.PNG

4.PNG


Viewing all articles
Browse latest Browse all 2218

Trending Articles



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