Hi,

I'm trying out Restlet and I'm particularly interested in using it with EMF. 
I've started by trying the supplied emf extensions but I can't get the client 
to work how I'd like.

This is my server resource:

[code]
public interface TimeSeriesResource
{
    @Get
    public TimeSeries retrieve();

    @Put
    public void update(TimeSeries timeSeries);

    @Delete
    void remove();
}
[/code]

Where Timeseries is an EObject.

On the client the following code works:
[code]
ClientResource cr = new ClientResource("http://localhost:8182/timeseries/1";);
Representation representation = cr.get(MediaType.APPLICATION_ECORE);
EmfRepresentation<TimeSeries> emfRed = new EmfRepresentation<>(representation);
TimeSeries ts = emfRed.getObject();
[/code]
I'm also able to see a HTML rendered version in a web browser.

However, using the EmfRepresentation seems unnecessary and I would have 
expected the following to just work:

[code]
TimeSeriesResource tsr = 
ClientResource.create("http://localhost:8182/timeseries/1";, 
TimeSeriesResource.class);
TimeSeries timeSeries = tsr.retrieve();
[/code]

Instead I get this error: Unable to find a converter for this representation : 
application/octet-stream

Is there something else I need to do to be able to use the client this way, or 
should I not be expecting the client to work this way?

Many Thanks,

Tas

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3049394

Reply via email to