Re: XmlBeans/Restlet

2008-05-08 Thread Mike Dunn
Thierry, Thank you for your response. It works correctly when you modify the code as you suggested. Thanks again, Mike

XmlBeans to DomRepresentation

2008-05-08 Thread Mike Dunn
I am trying to convert an XmlBean XmlObject to a DomRepresentation and can't seem to make it work. The following is the snippet of code. (the owner document is not null) Node document = xmlObject.getDomNode(); DomRepresentation representation = new DomRepresentation(MediaType.TEXT_XML,

Re: CLAP across OSGi classloaders/bundles?

2008-05-08 Thread Mark Derricutt
So after some experimentation I've created a ClientHelper and registered that into restlet, only I'm stuck on the new content negotiation. I have a Directory mounted to my new osgi://bundle/resource URI scheme, but when I request /admin/index.html this translates to

Re: CLAP across OSGi classloaders/bundles?

2008-05-08 Thread Mark Derricutt
Just updated to the latest snapshot and I'm bit further along, it actually requests index.html as expected. Changing my ClientHelper to return a MediaType: InputRepresentation ir = new InputRepresentation(url.openStream(), MediaType.ALL); solves an NPE further down the chain, however now I'm

Re: Content negotiation in DirectoryResource

2008-05-08 Thread Mark Derricutt
I believe I've found where the negotiate content should be used. Looking at Directory.java: public Handler findTarget(Request request, Response response) { try { return Engine.getInstance().createDirectoryResource(this, request, response); }

Duplicate variants coming from DirectoryResource

2008-05-08 Thread Mark Derricutt
Hi all, I'm noticing odd behaviour under the latest snapshot in com.noelios.restlet.local.DirectoryResource#getVariants. The getVariants method seems to get called 2-3 times for a single request, and each time it appends the same variants to the variants list. This means that I end up with

PUT requires an entity

2008-05-08 Thread Jim Alateras
I've noticed that if i do a PUT to a resource with an empty entity I get a BAD_REQUEST status code. Is it part of the HTTP spec that the PUT must contain a non-null entity. cheers /jima

Re: PUT requires an entity

2008-05-08 Thread Rhett Sutphin
Hi Jim, On May 8, 2008, at 11:22 PM, Jim Alateras wrote: I've noticed that if i do a PUT to a resource with an empty entity I get a BAD_REQUEST status code. Is it part of the HTTP spec that the PUT must contain a non-null entity. We had a discussion of this a few months back. The