Example: Change for map meta data
@Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface WrappedMap { /** * map element name */ String map() default "map"; /** * entry element name * */ String entry() default "entry"; /** * entry's key attribute name */ String key() default "key"; String namespace() default ""; String prefix() default ""; } So, if we wanted to output this XML We would use the @WrappedMap annotation as follows: @Path("/map") public static class MyResource { @GET @Produces("application/xml") @WrappedMap(map="hashmap", entry="hashentry", key="hashkey") public Map get() { ... return map; }