<div dir="ltr"><div><div><div><div>I am using oVirt Java SDK 3.4.2 to connect to RHEV-M environment. The code being used is <br><br>org.ovirt.engine.sdk.Api api = new Api("https://HOST:PORT/api","USER","PASSWORD", true);<br>
<br></div>The response from the server to this call is<br><br><i>oVirt API error <html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>J<b>BWEB000065: HTTP Status 401</b> - </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>J<b>BWEB000121: This request requires HTTP authentication</b>.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html><br>
</i><br></div>The documentation talks about the 401 error when the request doesn't contain "Authorization" header. <br><br></div>Even when i access https://HOST:PORT/api , i am prompted to login, but the credentials used to login to <br>
https://HOST:PORT/webadmin/webadmin/WebAdmin.html don't work. So if i login to webadmin console first, then since the "Authorization" header is set, access to /api is now possible in the browser.<br><br></div>
I need help here specifically for making the Java SDK work with RHeVM server.<br><div><br><div><div>-Vikas<br></div></div></div></div>