javasslvcloud-director-rest-api

Weird positioning of search and pagination of dataTable (bootstrap 3)


I have issue to accept all certs while using the VCloud SDK. The problem is that there is a self signed cert on the machine and even with the FakeSSL object it is not working, it cannot accept all certs, how do I make a workaround to make it work?

VcloudClient.setLogLevel(Level.OFF);
    vcloudClient = new VcloudClient(arg[0], Version.V5_5);
    vcloudClient.registerScheme("<https>", 443, FakeSSLSocketFactory.getInstance());
    vcloudClient.login(arg[1], arg[2]);
    extension = vcloudClient.getVcloudAdminExtension();



 Exception in thread "main" com.vmware.vcloud.sdk.VCloudRuntimeException: com.vmware.vcloud.sdk.VCloudRuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.vmware.vcloud.sdk.VcloudClient.getSupportedVersions(VcloudClient.java:231)
    at com.vmware.vcloud.sdk.VcloudClient.login(VcloudClient.java:329)
    at sdt.ericsson.capacity.main.Main.main(Main.java:155)
Caused by: com.vmware.vcloud.sdk.VCloudRuntimeException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.vmware.vcloud.sdk.RestUtil.getSupportedVersions(RestUtil.java:431)
    at com.vmware.vcloud.sdk.VcloudClient.getSupportedVersions(VcloudClient.java:227)
    ... 2 more
Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at sun.security.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:641)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
    at com.vmware.vcloud.sdk.RestUtil.getSupportedVersions(RestUtil.java:408)
    ... 3 more

There is my FakeSSLSocketFactory object (from the VMWere samples).

http://wklej.to/2nIV7/text

Any advice?


Solution

  • I switched to use the PERL SDK since it is working perfectly without http/s and API handling is even working for IP address instead, perfectly documented as well, and it pretty fast.