* Java support for Xen APIs
@ 2007-03-29 12:52 Premjith Rayaroth
2007-03-29 12:58 ` Ray Kelm
2007-03-29 13:24 ` Ewan Mellor
0 siblings, 2 replies; 8+ messages in thread
From: Premjith Rayaroth @ 2007-03-29 12:52 UTC (permalink / raw)
To: xen-devel
Hi,
Is Java support available for Xen APIs. Can I use Java to make XML-RPC
calls to the Xen machines? I assume only 'C' and 'Python' are supported.
Is there any plan to support Java.
Thanks
-Prem
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 12:52 Java support for Xen APIs Premjith Rayaroth
@ 2007-03-29 12:58 ` Ray Kelm
2007-03-29 13:26 ` Ewan Mellor
2007-03-29 13:32 ` Anthony Liguori
2007-03-29 13:24 ` Ewan Mellor
1 sibling, 2 replies; 8+ messages in thread
From: Ray Kelm @ 2007-03-29 12:58 UTC (permalink / raw)
To: Premjith Rayaroth; +Cc: xen-devel
I've had some success using the apache xml-rpc library to access xen
with version 3.0.4. There were a few gotchas, such as having to enable
extension support because xend was sending back nil as a result, which
is only valid if extensions are enabled. Unfortunately, it appears
that xend was not honoring the fact that extension support is
negotiated.
It would be handy to have a packaged solution that exports a simple
api for talking to xend, as building some of the control structures is
a bit of a pain.
-Ray
On 3/29/07, Premjith Rayaroth <premjith.rayaroth@oracle.com> wrote:
> Hi,
>
> Is Java support available for Xen APIs. Can I use Java to make XML-RPC
> calls to the Xen machines? I assume only 'C' and 'Python' are supported.
> Is there any plan to support Java.
>
> Thanks
> -Prem
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 12:52 Java support for Xen APIs Premjith Rayaroth
2007-03-29 12:58 ` Ray Kelm
@ 2007-03-29 13:24 ` Ewan Mellor
1 sibling, 0 replies; 8+ messages in thread
From: Ewan Mellor @ 2007-03-29 13:24 UTC (permalink / raw)
To: Premjith Rayaroth; +Cc: xen-devel
On Thu, Mar 29, 2007 at 06:22:17PM +0530, Premjith Rayaroth wrote:
> Hi,
>
> Is Java support available for Xen APIs. Can I use Java to make XML-RPC
> calls to the Xen machines? I assume only 'C' and 'Python' are supported.
> Is there any plan to support Java.
It's something we've thought about, but it's not got further than that. If
this was something that enough people were interested in, maybe we could
commit some time to make it happen. Vote now!
On the subject of language bindings, Ingard Mevåg has had a lot of success
using RPC::XML::Client in Perl (he'll be open-sourcing an example script very
soon).
Ewan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 12:58 ` Ray Kelm
@ 2007-03-29 13:26 ` Ewan Mellor
2007-03-29 13:32 ` Anthony Liguori
1 sibling, 0 replies; 8+ messages in thread
From: Ewan Mellor @ 2007-03-29 13:26 UTC (permalink / raw)
To: Ray Kelm; +Cc: Premjith Rayaroth, xen-devel
On Thu, Mar 29, 2007 at 08:58:48AM -0400, Ray Kelm wrote:
> I've had some success using the apache xml-rpc library to access xen
> with version 3.0.4. There were a few gotchas, such as having to enable
> extension support because xend was sending back nil as a result, which
> is only valid if extensions are enabled. Unfortunately, it appears
> that xend was not honoring the fact that extension support is
> negotiated.
For the Xen-API work, we're using this spec:
http://www.xmlrpc.com/spec
which doesn't include <nil/>. I'd consider anything that was returning nil to
be a bug.
Ewan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 12:58 ` Ray Kelm
2007-03-29 13:26 ` Ewan Mellor
@ 2007-03-29 13:32 ` Anthony Liguori
2007-03-29 14:38 ` Ray Kelm
1 sibling, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2007-03-29 13:32 UTC (permalink / raw)
To: Ray Kelm; +Cc: Premjith Rayaroth, xen-devel
Ray Kelm wrote:
> I've had some success using the apache xml-rpc library to access xen
> with version 3.0.4. There were a few gotchas, such as having to enable
> extension support because xend was sending back nil as a result, which
> is only valid if extensions are enabled. Unfortunately, it appears
> that xend was not honoring the fact that extension support is
> negotiated.
Extension support isn't negotiated (at least, not by any API I know of).
Do you have a reference for this?
Regards,
Anthony Liguori
> It would be handy to have a packaged solution that exports a simple
> api for talking to xend, as building some of the control structures is
> a bit of a pain.
>
> -Ray
>
>
> On 3/29/07, Premjith Rayaroth <premjith.rayaroth@oracle.com> wrote:
>> Hi,
>>
>> Is Java support available for Xen APIs. Can I use Java to make XML-RPC
>> calls to the Xen machines? I assume only 'C' and 'Python' are supported.
>> Is there any plan to support Java.
>>
>> Thanks
>> -Prem
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 13:32 ` Anthony Liguori
@ 2007-03-29 14:38 ` Ray Kelm
2007-03-29 14:51 ` Ray Kelm
2007-03-29 14:55 ` Ewan Mellor
0 siblings, 2 replies; 8+ messages in thread
From: Ray Kelm @ 2007-03-29 14:38 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Premjith Rayaroth, xen-devel
I'm sorry, I should have been more clear. Apache xml-rpc has support
for vendor extensions, which violate the original xml-rpc spec. In
order for them to be enabled, their client library negotiates with the
server implementation, and only if both sides have extensions enabled
does it support them. The expected situation is that if a non-apache
client accesses an apache server, it won't ask for extensions, so the
server will not use them. If an apache client accesses an non-apache
server, the negotiation is ignored, so the client disables the
extensions.
One of those extensions is support for returning a null value (or
python's None in this case) as <nil> or maybe <ex:nil>. The python
xmlrpc code does this apparently by default, when you call a method
that has no return value, for example, xend.domain.unpause.
Here's some information about the extensions supported by apache's
library. http://ws.apache.org/xmlrpc/extensions.html
In the end, I was unable to get it to work because xend wasn't
responding in a way that apache recognized, so it was disabling
extensions. I had to add a custom handler for <nil> using a class
based on TypeFactoryImpl, which solved the problem nicely.
-Ray
On 3/29/07, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Ray Kelm wrote:
> > I've had some success using the apache xml-rpc library to access xen
> > with version 3.0.4. There were a few gotchas, such as having to enable
> > extension support because xend was sending back nil as a result, which
> > is only valid if extensions are enabled. Unfortunately, it appears
> > that xend was not honoring the fact that extension support is
> > negotiated.
>
> Extension support isn't negotiated (at least, not by any API I know of).
> Do you have a reference for this?
>
> Regards,
>
> Anthony Liguori
>
>
> > It would be handy to have a packaged solution that exports a simple
> > api for talking to xend, as building some of the control structures is
> > a bit of a pain.
> >
> > -Ray
> >
> >
> > On 3/29/07, Premjith Rayaroth <premjith.rayaroth@oracle.com> wrote:
> >> Hi,
> >>
> >> Is Java support available for Xen APIs. Can I use Java to make XML-RPC
> >> calls to the Xen machines? I assume only 'C' and 'Python' are supported.
> >> Is there any plan to support Java.
> >>
> >> Thanks
> >> -Prem
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@lists.xensource.com
> >> http://lists.xensource.com/xen-devel
> >>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Java support for Xen APIs
2007-03-29 14:38 ` Ray Kelm
@ 2007-03-29 14:51 ` Ray Kelm
2007-03-29 14:55 ` Ewan Mellor
1 sibling, 0 replies; 8+ messages in thread
From: Ray Kelm @ 2007-03-29 14:51 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Premjith Rayaroth, xen-devel
Hmm. Looking a little deeper, I find that I'm not really using the new
Xen API calls, but in fact, the older xml-rpc interface. I guess I
have some work to do to get my code running using the correct calls.
After looking at the code in XendAPI.py, VM.unpause will end up
returning xen_api_success_void(), which will not be a nil. It is only
the older api that was returning None directly, which resulted in
<nil> in the xml-rpc response. My bad.
-Ray
On 3/29/07, Ray Kelm <kelmray@gmail.com> wrote:
> I'm sorry, I should have been more clear. Apache xml-rpc has support
> for vendor extensions, which violate the original xml-rpc spec. In
> order for them to be enabled, their client library negotiates with the
> server implementation, and only if both sides have extensions enabled
> does it support them. The expected situation is that if a non-apache
> client accesses an apache server, it won't ask for extensions, so the
> server will not use them. If an apache client accesses an non-apache
> server, the negotiation is ignored, so the client disables the
> extensions.
>
> One of those extensions is support for returning a null value (or
> python's None in this case) as <nil> or maybe <ex:nil>. The python
> xmlrpc code does this apparently by default, when you call a method
> that has no return value, for example, xend.domain.unpause.
>
> Here's some information about the extensions supported by apache's
> library. http://ws.apache.org/xmlrpc/extensions.html
>
> In the end, I was unable to get it to work because xend wasn't
> responding in a way that apache recognized, so it was disabling
> extensions. I had to add a custom handler for <nil> using a class
> based on TypeFactoryImpl, which solved the problem nicely.
>
> -Ray
>
> On 3/29/07, Anthony Liguori <anthony@codemonkey.ws> wrote:
> > Ray Kelm wrote:
> > > I've had some success using the apache xml-rpc library to access xen
> > > with version 3.0.4. There were a few gotchas, such as having to enable
> > > extension support because xend was sending back nil as a result, which
> > > is only valid if extensions are enabled. Unfortunately, it appears
> > > that xend was not honoring the fact that extension support is
> > > negotiated.
> >
> > Extension support isn't negotiated (at least, not by any API I know of).
> > Do you have a reference for this?
> >
> > Regards,
> >
> > Anthony Liguori
> >
> >
> > > It would be handy to have a packaged solution that exports a simple
> > > api for talking to xend, as building some of the control structures is
> > > a bit of a pain.
> > >
> > > -Ray
> > >
> > >
> > > On 3/29/07, Premjith Rayaroth <premjith.rayaroth@oracle.com> wrote:
> > >> Hi,
> > >>
> > >> Is Java support available for Xen APIs. Can I use Java to make XML-RPC
> > >> calls to the Xen machines? I assume only 'C' and 'Python' are supported.
> > >> Is there any plan to support Java.
> > >>
> > >> Thanks
> > >> -Prem
> > >>
> > >> _______________________________________________
> > >> Xen-devel mailing list
> > >> Xen-devel@lists.xensource.com
> > >> http://lists.xensource.com/xen-devel
> > >>
> >
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: Java support for Xen APIs
2007-03-29 14:38 ` Ray Kelm
2007-03-29 14:51 ` Ray Kelm
@ 2007-03-29 14:55 ` Ewan Mellor
1 sibling, 0 replies; 8+ messages in thread
From: Ewan Mellor @ 2007-03-29 14:55 UTC (permalink / raw)
To: Ray Kelm; +Cc: Premjith Rayaroth, xen-devel, Anthony Liguori
On Thu, Mar 29, 2007 at 10:38:56AM -0400, Ray Kelm wrote:
> I'm sorry, I should have been more clear. Apache xml-rpc has support
> for vendor extensions, which violate the original xml-rpc spec. In
> order for them to be enabled, their client library negotiates with the
> server implementation, and only if both sides have extensions enabled
> does it support them. The expected situation is that if a non-apache
> client accesses an apache server, it won't ask for extensions, so the
> server will not use them. If an apache client accesses an non-apache
> server, the negotiation is ignored, so the client disables the
> extensions.
>
> One of those extensions is support for returning a null value (or
> python's None in this case) as <nil> or maybe <ex:nil>. The python
> xmlrpc code does this apparently by default, when you call a method
> that has no return value, for example, xend.domain.unpause.
xend.domain.unpause is one of the legacy XML-RPC methods, and not part of the
Xen-API. If you try VM.unpause you should get a quite different result.
Ewan.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-03-29 14:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-29 12:52 Java support for Xen APIs Premjith Rayaroth
2007-03-29 12:58 ` Ray Kelm
2007-03-29 13:26 ` Ewan Mellor
2007-03-29 13:32 ` Anthony Liguori
2007-03-29 14:38 ` Ray Kelm
2007-03-29 14:51 ` Ray Kelm
2007-03-29 14:55 ` Ewan Mellor
2007-03-29 13:24 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.