Creating relations (links)

26 views
Skip to first unread message

Fabiano Almeida

unread,
Feb 1, 2013, 9:01:39 AM2/1/13
to restful...@googlegroups.com
Hello everyone,

I have a server in Java and a client in Ruby. My Java application has this code:
@XStreamAlias("local")
public class Local implements HypermediaResource {
  // gets and sets

  public void configureRelations( RelationBuilder builder ) {
    builder.relation( "self" ).uses( LocalController.class ).get( id );
  }
}
When I get a register by id and try to access link "self", this doesn't exist. Here is my Ruby code:
resource.links.self
After this error, I tried to access the URL on my browser and I can't see the "atom" attribute on the XML generated.

What's wrong with my code?

Thanks in advance!

--
Fabiano Almeida
Reply all
Reply to author
Forward
0 new messages