This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] XenApi

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] XenApi
From: Luciano Rocha <strange@xxxxxxxxxxxxx>
Date: Thu, 6 Dec 2007 23:11:42 +0000
Delivery-date: Thu, 06 Dec 2007 15:12:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <fj9lgq$73k$1@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <fj9lgq$73k$1@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.14 (2007-03-31)
On Thu, Dec 06, 2007 at 12:19:26PM -0800, Shaun R. wrote:
>  I originally posted this to the xenapi mailing list but i dont think many 
>  are on there... here's my question.
>  My first attempt at this, trying to get php to interface with
>  /var/run/xend/xen-api.sock (or even for that matter).  I can
>  make a connection to both the unix socket and the inet socket and write/read
>  data.  The problem is i always get the same responce back, also the responce
>  back is in html, shouldnt it be in xml format?  At the moment this is my
>  code
>  $fp = fsockopen("unix:///var/run/xend/xen-api.sock", 0, $errno, $errstr, 
>  30);
>  if (!$fp) {
>     echo "$errstr ($errno)\n";
>  } else {
>         $request = xmlrpc_encode_request("session.login_with_password", 
>  array("root","none"));
>         fwrite($fp, $request."\n");
>         while (!feof($fp)) {
>                 echo fgets($fp, 128);
>         }
>         fclose($fp);
>  }
>  When i run the code i always get this responce back...
>  <head>
>  <title>Error response</title>
>  </head>
>  <body>
>  <h1>Error response</h1>
>  <p>Error code 400.
>  <p>Message: Bad request version ('encoding="iso-8859-1"?&gt;').
>  <p>Error code explanation: 400 = Bad request syntax or unsupported method.
>  </body>
>  Anybody know why this is happening, also ifi telnet to localhost port 9363
>  and paste in my own request same thing happens, error looks alittle diferent
>  though..

You're sending the body content, but not the HTTP request headers.


Attachment: pgpBPRFZ4IRbq.pgp
Description: PGP signature

Xen-users mailing list
<Prev in Thread] Current Thread [Next in Thread>