VMware Cloud Community
Karnamkiran
Contributor
Contributor

problems during vcloud sdk to connect to VCD

Hi..

I am using the sample code in the vCloud SDK to connect to the Vcloud director installed. But i am getting the getSupportedVersions in the VCloudClient as null and hence not able to connect. Can you please let me know what the issue might be?

here is my code

Protocol https = new Protocol("https",
                (ProtocolSocketFactory) new FakeSSLSocketFactory(), 443);
        Protocol.registerProtocol("https", https);
        System.out.println(args[0]);
        client = new VcloudClient("http://10.247.64.17/api/versions");
        Map<String, VersionInfoType> versions = client.getSupportedVersions();
        client.login(args[2], args[3], versions.get(args[1]));

getting error in that line.

thanks

Kiran

0 Kudos
2 Replies
tsugliani
VMware Employee
VMware Employee

Hi Kiran,

Could you try with https ?

client = new VcloudClient("https://10.247.64.17/api/versions");

Regards,

0 Kudos
Karnamkiran
Contributor
Contributor

Hi..

Thank you for the quick response... even with Https i get the same error.

please find attached the image of the vclient data..

I get a null pointer exception when trying to get the supportedVserions property.

is it  a problem with my vCloud director configuration or with my code?

0 Kudos