0

When I tried to execute the "FirstResource" Example :

http://restlet.org/learn/2.0/firstResource

I have an error in this line caused by getIdentifier():

itemResource = new ClientResource(r.getIdentifier());

How can I resolve this error?

Thanks for your help.

Yanni
  • 71
  • 8
  • Here's a hint: post the error you got. – Brian Kelly Apr 03 '13 at 03:13
  • The error is that "***The method getIdentifier() is undefined for the type Representation***". I have the same message for the ***setIdentifier(String)*** method. – Yanni Apr 03 '13 at 11:34
  • I've tested this code using the Restlet 2.0.15 release, and get no error. May I ask you what kind of Restlet release are you using? Best regards, Thierry Boileau – Thierry Boileau Apr 04 '13 at 09:08

2 Answers2

0

there're some changes between restlet2.1.2 and restlet2.0.*, you can read the example in your install path\src\org.restlet.example package, then you will find the changed points between the two editions!

ruiyoung
  • 1
  • 1
0

I think this method has been replaced by Representation#getLocationRef

user229044
  • 232,980
  • 40
  • 330
  • 338
Thierry Boileau
  • 866
  • 5
  • 8