Hi All,
Trying to add a storage profile in VCenter 6.0.
Code:
Element token = AcquireHoKTokenByUserCredential.getToken(args, userCert.getPrivateKey(),
userCert.getUserCert());
The above code gives the token value as : [saml2:Assertion: null] - Is this last part null expected here?
HandlerResolver defaultHandler = vimService.getHandlerResolver();
/* * Create a VIM service object. */
vimService = new VimService();
ManagedObjectReference SVC_INST_REF = new ManagedObjectReference();
SVC_INST_REF.setType("ServiceInstance");
SVC_INST_REF.setValue("ServiceInstance");
/* * Create a handler resolver. Create a cookie extraction handler and add it to the handler resolver. Set the VIM service handler resolver. */
HeaderCookieExtractionHandler cookieExtractor = new HeaderCookieExtractionHandler();
HeaderHandlerResolver handlerResolver = new HeaderHandlerResolver();
handlerResolver.addHandler(cookieExtractor);
vimService.setHandlerResolver(handlerResolver);
/* * Save the HTTP cookie. */
String cookie = cookieExtractor.getCookie();
here the cookie value is coming as null.
// Get PBM Profile Manager & Associated Capability Metadata
spbmsc = connection.getPbmServiceContent();
ManagedObjectReference profileMgr = spbmsc.getProfileManager();
In the above code, i am getting spbmsc as null.
Any idea why this is coming as null and how can it be resolved?
Note: Same code works fine with VCenter 5.5