Example: Change array and collection meta data
@Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface Wrapped { String element() default "collection"; String namespace() default "http://jboss.org/resteasy"; String prefix() default "resteasy"; } So, if we wanted to output this XML bill monica We would use the @Wrapped annotation as follows: @GET @Path("list") @Produces("application/xml") @Wrapped(element="list", namespace="http://foo.org", prefix="foo") public List getCustomerSet() { List list = new ArrayList(); list.add(new Customer("bill")); list.add(new Customer("monica")); return list; }