Hi On 28/11/11 09:32, Björn Stenersen wrote:
Hi, i have got a service that looks like this:@GET @Path("/rating/{id}") @Produces("application/xml") @ElementClass(response=Rating.class) public Rating getRating(@PathParam("id")String id); This is the Rating-Class: @XmlRootElement(name = "Rating") public class HotelRating { ... } In the resulting WADL the Grammar-Section describes the Rating-Object as it should do. The Resources-Section describes the service like this: <resource path="rating/{id}"> <param name="id" style="template" type="xs:string"/> <method name="GET"> <request/> <response> <representation mediaType="application/xml"/> </response> </method> </resource> Why is the representation-element missing the Attribute "element"? I expected something like this: <representation mediaType="application/xml" element="rating"/>
There has to be a namespace declared somewhere, either in @XmlRootElement itself or in a package-level annotation, please add it and you should see a proper link to a schema element;
Cheers, Sergey
What am i doing wrong? Thanks Björn
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
