I had some time to dig into this over the last few days, and I can answer my own question with proof of concept. I wanted to post my code with the results here, but I've spent the last half hour ...
See more...
I had some time to dig into this over the last few days, and I can answer my own question with proof of concept. I wanted to post my code with the results here, but I've spent the last half hour fighting with the forum submit button and an "Access Denied" error which I'm pretty sure is happening because of the code I'm trying to include. Instead I'll just outline the solution. First, the remote client SDK has the SessionServiceImpl class which helps manage sessions. It includes a line which calls vimPort.cloneSession. As mentioned above, SmsPortType and PbmPortType don't have this method, but this is where we get the session cookie we need. Second, the vSphere Management SDK has the SmServiceConnection which contains an example of creating an SmsPortType using a session cookie obtained from a vimPort.login call. vimPort.login is called which gets the cookie, readSessionCookieFromHeaders extracts the cookie from the vimport object, then initSmsPort configures an SmsPortType with that cookie. This code works for both the SmsPortType and PbmPortType objects. I had to make a couple of modifications to properly set the SSL Socket Factory and cleanup the way the cookie is set, but in general the approach works fine.