in src/intTest/java/com/vmware/vim25/ws/WSClientIntTest.java [45:79]
public void setUp() throws Exception {
if (null == LoadVcenterProps.url || null == LoadVcenterProps.userName
|| null == LoadVcenterProps.password
|| null == LoadVcenterProps.secondUrl
|| null == LoadVcenterProps.badUrl
|| null == LoadVcenterProps.sslThumbprint
|| "".equals(LoadVcenterProps.url.trim())
|| "".equals(LoadVcenterProps.secondUrl.trim())
|| "".equals(LoadVcenterProps.badUrl.trim())
|| "".equals(LoadVcenterProps.userName.trim())
|| "".equals(LoadVcenterProps.password.trim())
|| "".equals(LoadVcenterProps.sslThumbprint.trim())) {
throw new Exception("Vcenter credentials not loaded");
}
createdSSLFactory = 0;
computedThumbprint = 0;
ServiceInstance si = null;
try {
si = new ServiceInstance(new URL(LoadVcenterProps.url),
LoadVcenterProps.userName, LoadVcenterProps.password, true);
} catch (MalformedURLException e) {
e.printStackTrace();
}
if(si != null) {
wsClient = new WSClient(LoadVcenterProps.url, true);
wsClient.setVimNameSpace(ServiceInstance.VIM25_NAMESPACE);
wsClient.setSoapActionOnApiVersion("5.5");
wsClient.setCookie(si.getSessionManager().getServerConnection()
.getVimService().getWsc().getCookie());
}
}