[Jersey] returning list - overriding standard XML behavior

From: phil swenson <>
Date: Fri, 1 Aug 2014 11:00:24 -0600

I guess this may be a JAXB question, but perhaps someone on this list could
give a suggestion…

I have a web service method like:

    public List<ProcessError> getProcessErrorCounts(
@QueryParam("processModelId") String processModelId

I want it to return elements such as:


Instead it uses a lowercase such as “processErrors”

I know this is a minor nit, but all the other methods I have end up with
capitalized element names.

I tried @XmlElementWrapper(name="ProcessErrors")
 bit this seemed to have no effect.

Is there an easy way to override this name or will I have to create another
class that contains the List and use the
annotation there?