VMware Cloud Community
LMcManamon
Contributor
Contributor

Using Java REST SDK for VRO 8.x

I'm trying to use the java REST SDK to call workflows, similar to the code snippet here: 

https://docs.vmware.com/en/vRealize-Orchestrator/7.6/com.vmware.vrealize.orchestrator-develop-web-se...

The REST endpoint for 8.x changed from "https://orchestrator_IP/FQDN:8281/vco/api" to "https://orchestrator_FQDN/vco/api". Just changing the endpoint results in a failure, as the httpcore jar file it uses to create the session expects a port, and fails out with the following errors in the vsphere_client_virgo.log:

java.lang.IllegalArgumentException: Port is invalid
[2021-03-24T10:39:36.011-07:00] [ERROR] https-jsse-nio-9443-exec-15 System.err at org.apache.http.util.Args.check(Args.java:36)
[2021-03-24T10:39:36.011-07:00] [ERROR] https-jsse-nio-9443-exec-15 System.err at org.apache.http.conn.scheme.Scheme.<init>(Scheme.java:93)
[2021-03-24T10:39:36.011-07:00] [ERROR] https-jsse-nio-9443-exec-15 System.err at com.vmware.o11n.sdk.rest.client.impl.VcoSessionImpl.makeHttpClient(VcoSessionImpl.java:163)
[2021-03-24T10:39:36.011-07:00] [ERROR] https-jsse-nio-9443-exec-15 System.err at com.vmware.o11n.sdk.rest.client.impl.VcoSessionImpl.<init>(VcoSessionImpl.java:89)
[2021-03-24T10:39:36.011-07:00] [ERROR] https-jsse-nio-9443-exec-15 System.err at com.vmware.o11n.sdk.rest.client.DefaultVcoSessionFactory.newSession(DefaultVcoSessionFactory.java:85)

 

Is there some kind of workaround or trick that I am missing? Or is the Java REST SDK not usable for VRO 8.x. And if so, was there something that can be used instead?

0 Kudos
1 Reply
eoinbyrne
Expert
Expert

Not sure about the SDK you're using but you could try setting the port to 443 - in most cases when the URL begins with "https" the 443 is implicit but adding it will not invalidate the URL

 

Might be worth a try to get you moving anyway

0 Kudos