4

i want to build a rest service via cxf. this is already done with only two objects "Earthpart" and "Earthquake". when i call localhost/earthpars i get a xml list of the earthparts with the earthquakes. but the earthquakeobject with more information {how heavy, how long, etc.} is only available with a xlink to localhost/earthquake/{id} shortly: In localhost/earthpars is only the xlink to localhost/earthquake/{id}.

now the technical part: to be honest the request was to use camel-cxf and jaxb to build a REST service. building xlinks with jaxb is possible with namespaces but thats obviously not the way to go! so the question is: is there any info about xlink in connection with jaxb anywhere or is that not the way to go for xlinks?

nils petersohn
  • 2,317
  • 2
  • 25
  • 27

1 Answers1

1

You could use an XmlAdapter to convert the child object to an xlink representation. For more information on XmlAdapter see:

bdoughan
  • 147,609
  • 23
  • 300
  • 400