<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 02/17/2014 05:09 PM, Vikas Kokare
wrote:<br>
</div>
<blockquote
cite="mid:CAKpxQk1dA9XzKCEiipYmxNZJ+UMMDO1F5Rw=2gp=XL+R6nvJ7g@mail.gmail.com"
type="cite">
<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>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
Have you tried "user@domain" for the user parameter? <br>
<br>
<br>
<blockquote
cite="mid:CAKpxQk1dA9XzKCEiipYmxNZJ+UMMDO1F5Rw=2gp=XL+R6nvJ7g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Engine-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Engine-devel@ovirt.org">Engine-devel@ovirt.org</a>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/engine-devel">http://lists.ovirt.org/mailman/listinfo/engine-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>