HI Alex,
Can you share some code so i understand better the issue?
On May 25, 2010, at 4:17 PM, Alex Treppass wrote:
> Jersey should enable the configuration of the default Entity
> Providers.
>
> We have recently been having issues with the various XML*.General
> classes.
What entity provider classes are you specifically referring to?
> These classes claim to be able to correctly process application/atom
> +xml and application/xaml+xml despite the fact that they clearly
> can’t.
>
What Java types are you using to produce or consume those media types?
Paul.
> In particular, IE has the really nasty trait of producing an accept
> header that may include application/xaml+xml and */* but does not
> include text/html. This means that when IE connects to a Jersey web
> service the specific application/xaml+xml takes priority over the
> generic */* and the web server “produces” application/xaml+xml.
>
> Xaml is a special format that has an external DTD. The generic class
> in Jersey does not have the capability to create xml to that schema
> and should not be announcing that it can. The faulty application/xaml
> +xml causes IE to crash hard.
>
> I haven’t yet tested what various RSS readers do when confronted
> with malformed feeds – but I doubt that it’s pretty.
>
> We have modified the current Jersey jars to prevent the XML*.General
> Entity Providers from being loaded. This is not maintainable. If the
> General Entity Providers are considered essential to the Jersey
> implementation of JSR311 then we would like the ability to configure
> the Entity Providers at runtime.
>
> While the specification states that “An implementation MUST include
> pre-packaged MessageBodyReader and MessageBodyWriter implementations
> for the following Java and media type combinations”, it does not say
> that an instance of an implementation must load these
> MessageBodyReader and MessageBodyWriter objects at runtime.
>
> Regards,