Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Hard to say without knowing what you are doing :) Using ObjectRepresentation for a String is strange if that is your usecase as it is meant for a serializable Java object. If you are just wanting to pass plain text then you should use the following: if (variant.getMediaType().equals(MediaType

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
request.getClientInfo().getAcceptedMediaTypes().add(new Preference(MediaType.APPLICATION_JAVA_OBJECT)); I only used the new ClientInfo() before in order to make sure it was the only MediaType. If you still have a problem try seeing what other mediatypes are in the "request.getClientInfo().ge

Re: Requesting Objects?

2007-08-21 Thread Stanczak Group
Should I even be using object? Stanczak Group wrote: So how do I use 1.0 to get objects? Jonathan Hall wrote: Ah, I am running from http://www.restlet.org/downloads/archives/1.1/ Jerome wrote: "Now that the 1.0 code base seems to be quite stable it is time to move forward. We have just creat

Re: Requesting Objects?

2007-08-21 Thread Stanczak Group
So how do I use 1.0 to get objects? Jonathan Hall wrote: Ah, I am running from http://www.restlet.org/downloads/archives/1.1/ Jerome wrote: "Now that the 1.0 code base seems to be quite stable it is time to move forward. We have just created a maintenance branch for 1.0 in SVN. From now on, th

Re: Requesting Objects?

2007-08-21 Thread Stanczak Group
Did did see a Representation in the Request constructor. Is that what I should use. I'll try that. Stanczak Group wrote: I don't have a request.setClientInfo() in my request object. Do I have an older version? I'm using 1.0.4. Jonathan Hall wrote: Whoops, clientInfo.setAcceptedMediaTypes(ne

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Ah, I am running from http://www.restlet.org/downloads/archives/1.1/ Jerome wrote: "Now that the 1.0 code base seems to be quite stable it is time to move forward. We have just created a maintenance branch for 1.0 in SVN. From now on, the SVN trunk will be dedicated to the upcoming version 1.1.

Re: Requesting Objects?

2007-08-21 Thread Stanczak Group
I don't have a request.setClientInfo() in my request object. Do I have an older version? I'm using 1.0.4. Jonathan Hall wrote: Whoops, clientInfo.setAcceptedMediaTypes(new ArrayList>().); should be: clientInfo.setAcceptedMediaTypes(new ArrayList>()); Jonathan Hall wrote: Hi, try something

Re: Requesting Objects?

2007-08-21 Thread Stanczak Group
I have both matching variants. Both client and server use Java Object. But the client is requesting plain text. Thierry Boileau wrote: Hi, the subject of this issue seems to be the content negociation algorithm. On one side, the client lists all media types he knows or is able to manage (the

Re: Requesting Objects?

2007-08-21 Thread Thierry Boileau
Hi, the subject of this issue seems to be the content negociation algorithm. On one side, the client lists all media types he knows or is able to manage (the accepted media types). On the other side, the server is able to serve several representations of the same resource. The aim of the conte

Re: Odd issue with VirtualHost.setServerAddress

2007-08-21 Thread Alex Milowski
On 8/18/07, Jerome Louvel <[EMAIL PROTECTED]> wrote: > > Alex, > > > > The "serverAddress" property indeed does comparisons based on the > > > numerical IP address. There are some convenience static methods on > > > VirtualHost: > > > - getLocalHostAddress() > > > - getIpAddress(String domain) >

Re: Shortcut local traffic between Restlet HTTP clients and servers

2007-08-21 Thread Rob Heittman
> If you have time to help with the RFE, maybe by providing a patch, it could > still go into the upcoming 1.1 release :) I posted a fairly non-invasive patch and additional class to the RFE. I'm sure you could improve upon it. http://restlet.tigris.org/issues/show_bug.cgi?id=157 It adds a

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Whoops, clientInfo.setAcceptedMediaTypes(new ArrayList>().); should be: clientInfo.setAcceptedMediaTypes(new ArrayList>()); Jonathan Hall wrote: Hi, try something like: ClientInfo clientInfo = new ClientInfo(); clientInfo.setAcceptedMediaTypes(new ArrayList>().); clientInfo.getAcceptedMed

Re: Requesting Objects?

2007-08-21 Thread Jonathan Hall
Hi, try something like: ClientInfo clientInfo = new ClientInfo(); clientInfo.setAcceptedMediaTypes(new ArrayList>().); clientInfo.getAcceptedMediaTypes().add(new Preference(MediaType.APPLICATION_JAVA_OBJECT)); request.setClientInfo(clientInfo); jon Stanczak Group wrote: Here's the code: Req

Requesting Objects?

2007-08-21 Thread Stanczak Group
Here's the code: Request request = new Request(Method.GET, "http://localhost:8182/users/dog";); ChallengeResponse authentication = new ChallengeResponse(ChallengeScheme.HTTP_BASIC, "admin", "admin"); request.setChallengeResponse(authentication); Client client = new Client(

Re: afterHandle logging

2007-08-21 Thread Richard Bronkhorst
Jim Edwards-Hewitt surety.com> writes: > > In addition to standard access log messages, I'm getting a message from > afterHandle on every access: > > Jun 8, 2007 4:12:26 PM com.noelios.restlet.LogFilter afterHandle > > This doesn't really provide any useful information for my application. I

Re: parsing the query string - newbie question

2007-08-21 Thread Jerome Louvel
Hi Pete, Welcome! The answer is to use request.getEntityAsForm(), then check the Form class for access methods. Best regards, Jerome 2007/8/21, Pete <[EMAIL PROTECTED]>: > in the handlePost method of my resource class, request.getEntity().getText() > returns me a query string like a=b&c=d&e=f e