public ServiceInstance()

in src/com/vmware/vim25/mo/ServiceInstance.java [101:122]


	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);
	}