users@jersey.java.net

Re: [Jersey] Jersey JAX-RS JAXB - Returning an Array of Objects

From: Ari Heino <ext.ari.heino_at_tieto.com>
Date: Wed, 12 Aug 2009 08:19:41 -0500 (CDT)

Paul Sandoz wrote:
>
> Hi Ari,
>
> What are your dependencies for the StAX implementation, are you using
> JDK 6?
>
> Have you tried the settings documented here:
>
>
> http://java.sun.com/javase/6/docs/api/javax/xml/stream/XMLInputFactory.html#newInstance%28%29
>
> For example you could set the system property
> javax.xml.stream.XMLInputFactory to the implementation.
>
> Note that we recommend you utilize Woodstox.
>
>
Am using JDK 5.

Could not get the dependencies correct nor get the XMLInputFactory setup
correctly, no matter how I tried. Most likely reason is the "funny" OSGi
environment we have here (don't ask :) ).

Anyways, how I resolved this one was to have an object in Jersey Response
that contained the List object. Not pretty, and clutters the code a bit with
an "unnecessary" objects but it also works OK.

-- .aRi

-- 
View this message in context: http://n2.nabble.com/Jersey-JAX-RS-JAXB---Returning-an-Array-of-Objects-tp2669077p3430633.html
Sent from the Jersey mailing list archive at Nabble.com.