private ServiceContent retrieveServiceContent() throws RuntimeFault, RemoteException { return getVimService().retrieveServiceContent(getMOR()); }
public ViConnection(String url, String username, char[] password, ExecutorService executor) throws MalformedURLException, RuntimeFaultFaultMsg, InvalidLocaleFaultMsg, InvalidLoginFaultMsg { proxy = ConnectionManager.getConnection(url, executor); serviceInstance = ConnectionManager.getServiceInstance(); serviceContent = proxy.retrieveServiceContent(serviceInstance); sessionManager = serviceContent.getSessionManager(); session = proxy.login(sessionManager, username, new String(password), null); }
serviceContent = vimPort.retrieveServiceContent(serviceInstanceMOR);
@SuppressWarnings("rawtypes") private void makeConnection(String url, String username, String password, boolean trustEveryone) throws RuntimeFaultFaultMsg, InvalidLocaleFaultMsg, InvalidLoginFaultMsg, KeyManagementException, NoSuchAlgorithmException { vimService = new VimService(); vimPort = vimService.getVimPort(); populateContextMap(url, username, password); if (Boolean.TRUE.equals(trustEveryone)) { DisableSecurity.trustEveryone(); } serviceContent = vimPort.retrieveServiceContent(this.getServiceInstanceReference()); userSession = vimPort.login(serviceContent.getSessionManager(), username, password, null); }
public ServiceInstance(URL url, String username, String password, boolean ignoreCert, String namespace) throws RemoteException, MalformedURLException { if(url == null || username==null) { throw new NullPointerException("None of url, username can be null."); } setMOR(SERVICE_INSTANCE_MOR); VimPortType vimService = new VimPortType(url.toString(), ignoreCert); vimService.getWsc().setVimNameSpace(namespace); serviceContent = vimService.retrieveServiceContent(SERVICE_INSTANCE_MOR); vimService.getWsc().setSoapActionOnApiVersion(serviceContent.getAbout().getApiVersion()); serviceContent = vimService.retrieveServiceContent(SERVICE_INSTANCE_MOR); //with new SOAP_ACTION setServerConnection(new ServerConnection(url, vimService, this)); UserSession userSession = getSessionManager().login(username, password, null); getServerConnection().setUserSession(userSession); }
public ServiceInstance(URL url, String sessionStr, boolean ignoreCert, String namespace) throws RemoteException, MalformedURLException { if(url == null || sessionStr ==null) { throw new NullPointerException("None of url, session string can be null."); } setMOR(SERVICE_INSTANCE_MOR); VimPortType vimService = new VimPortType(url.toString(), ignoreCert); WSClient wsc = vimService.getWsc(); wsc.setCookie(sessionStr); wsc.setVimNameSpace(namespace); serviceContent = vimService.retrieveServiceContent(SERVICE_INSTANCE_MOR); wsc.setSoapActionOnApiVersion(serviceContent.getAbout().getApiVersion()); setServerConnection(new ServerConnection(url, vimService, this)); serviceContent = vimService.retrieveServiceContent(SERVICE_INSTANCE_MOR); //with new SOAP_ACTION UserSession userSession = (UserSession) getSessionManager().getCurrentProperty("currentSession"); getServerConnection().setUserSession(userSession); }
ServiceContent serviceContent = vimPort.retrieveServiceContent(serviceInstance); ManagedObjectReference propertyCollectorReference = serviceContent.getPropertyCollector(); RetrieveOptions propertyObjectRetrieveOptions = new RetrieveOptions();
updateBindingProvider(getBindingsProvider(), this.uri.toString()); this.serviceContent = this.vimPort .retrieveServiceContent(this.getServiceInstanceReference()); updateBindingProvider(getBindingsProvider(), this.uri.toString()); this.serviceContent = this.vimPort .retrieveServiceContent(this.getServiceInstanceReference());