<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(&quot;https://HOST:PORT/api&quot;,&quot;USER&quot;,&quot;PASSWORD&quot;, true);<br>
<br></div>The response from the server to this call is<br><br><i>oVirt API error &lt;html&gt;&lt;head&gt;&lt;title&gt;JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report&lt;/title&gt;&lt;style&gt;&lt;!--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;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;J<b>BWEB000065: HTTP Status 401</b> - &lt;/h1&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;JBWEB000309: type&lt;/b&gt; JBWEB000067: Status report&lt;/p&gt;&lt;p&gt;&lt;b&gt;JBWEB000068: message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;JBWEB000069: description&lt;/b&gt; &lt;u&gt;J<b>BWEB000121: This request requires HTTP authentication</b>.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;JBoss Web/7.2.2.Final-redhat-1&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;<br>
</i><br></div>The documentation talks about the 401 error when the request doesn&#39;t contain &quot;Authorization&quot; 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&#39;t work. So if i login to webadmin console first, then since the &quot;Authorization&quot; 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>