users@jersey.java.net

[Jersey] Re: XmlRootElement and plurals

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Tue, 15 Feb 2011 11:32:47 +0100

Hello chauzer,

which version of Jersey are you using? Can you share a testcase? We do
have tests for this property so it should work.

Pavel

On 01/19/2011 08:24 PM, chauzer wrote:
> I added the parameter to my init params for the jersey spring servlet like
> so:
>
> <property name="initParameters">
> <map>
> <entry key="com.sun.jersey.config.property.packages"
> value="com.traveladnetwork.web.service.resource.ad.server" />
> <entry
> key="com.sun.jersey.config.property.resourceConfigClass"
> value="com.sun.jersey.api.core.PackagesResourceConfig" />
> <entry
>
> key="com.sun.jersey.config.feature.XmlRootElementProcessing"
> value="true" />
> </map>
> </property>
>
> but it looks like it's not affecting the XML. My bean looks like:
>
> @XmlRootElement(name="advertiser")
> public class AdvertiserDTO
>
> and when i return a list of AdvertiserDTOs w/ jersey, the XML still shoes
> <advertiserDTOes>
>