cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarjei Huse <tar...@scanmine.com>
Subject Link elements in jaxb
Date Tue, 16 Sep 2008 14:38:09 GMT
Hi, When using Jaxb for a class with a collection I get a representation
like this:

class Parent {
    int id;
    Collection<Child> children;
}

class Child {
    int id;
 
}

->

<parents>
 <parent>
  <id>1</id>
  <children><id>1</id>
  </children>
 </parent>
</parents>

Is it possible to insert a link instead of the children elements?
Something like:
<parents>
 <parent>
  <id>1</id>
  <children>
       <child href="http://service/id" />
       <child href="http://service/id2" />
  </children>
 </parent>
</parents>

This is something that I would guess is mostly needed when creating
Restful services, so I thought I'd use this list. If it is too off
topic, tell me and I'll move on :)

Regards,
Tarjei

Mime
View raw message