VMware {code} Community
jeetendraa
Contributor
Contributor

vCloud Java SDK not working for next request after login

Hi,

I am trying to connect to vcloud api v0.9 using vcloud hjava sdk 1.

when i try to run HellovCloud code the login works fine but any resuest after that gives me the following error.

Exception in thread "main" com.vmware.vcloud.sdk.VCloudException: Login and try the operation

  • at com.vmware.vcloud.sdk.VcloudClient.getVCloudAuthenticationHeaderName(VcloudClient.java:59)*

  • at com.vmware.vcloud.sdk.RestUtil.get(RestUtil.java:368)*

  • at com.vmware.vcloud.sdk.admin.extensions.VcloudAdminExtension.<init>(VcloudAdminExtension.java:64)*

  • at com.vmware.vcloud.sdk.VcloudClient.getVcloudAdminExtension(VcloudClient.java:382)*

  • at com.vmware.vcloud.sdk.samples.HellovCloud.findVdc(HellovCloud.java:139)*

  • at com.vmware.vcloud.sdk.samples.HellovCloud.main(HellovCloud.java:357)*

I am guessing the cookie is not being set for any further requests after login so it fails at authentication.

Can anyone please let me know why is that i am facing this issue.

Also is vCloud java sdk 1 compatible with 0.9 api version

Thanks in advance.

0 Kudos
1 Reply
rkamal
VMware Employee
VMware Employee

Hi,

VMware vCloud SDK for Java 1.0 works only with vCloud API 1.0.

Since the authentication mechanism has changed from 0.9 to 1.0. It is not compatible with vCloud API 0.9.

Kindly use it against vCloud API 1.0.

Regards,

Rajesh Kamal.