Greetings guys,

I've skimmed through the tutorials and seem to have been able to grasp how
to stuff I'd consider intermediate however I'm still have trouble getting a
simple REST API to work. To learn Restlet I decided to implement a simple
interface

I want to implement this interface:

public interface ArithmaticResource {


 @Get("json")

public int add (int n0, int n1);


 @Get("json")

public int add (int n0, int n1, int n2);


}



However when I:


final ClientResource cr = new ClientResource(

"http://localhost:8182/restlet/arithmetic";);

final ArithmaticResource resource = cr.wrap(ArithmaticResource.class);

System.out.println("resource.add(1, 2) " + resource.add(1, 2));

I get the following:


  Unsupported Media Type (415) - Unsupported Media Type


I suspect my understanding is lacking ... I'm really trying to use this
like Cherry.py where I expose methods ... I guess that's probably not how
to use Restlet.


Would appreciate any help -- have been stuck on this for hours.


Bubba424242

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

Reply via email to