Hi,
I think you might want to ask the question on the Abdera list or check their
archives, I haven't found anything obvious.
Feed may contain multiple entries with different contents and it's possible to set a media type on the individual Abdera entry
content instance, ex, "application/xml;charset=utf-8", perhaps same is possible on the top-level Feed itself or on Entry.
Another option is to extend AtomFeedProvider and in its writeTo() method just write this xml directive directly to the output stream
and then
delegate to the super class. At the moment AtomFeedProvider & AtomEntryProvider are not related really to each other, I'll fix it
and wire them together and enhance a bit too.
cheers, Sergey
----- Original Message -----
From: "Vincenzo Vitale" <[email protected]>
To: <[email protected]>
Sent: Monday, June 15, 2009 12:55 PM
Subject: Xml directive in the atom feed response
When exposing a webservice using the Atom provider and xml the <?xml
version=”1.0” encoding=”utf-8”?> directive is not added.
Is there a way to fix this?
the method exposed is:
@GET
@Path("/{skus}")
public Feed getProductDetails(...){
...
Feed feed = abdera.newFeed();
feed.setTitle("TomTom Feed");
feed.setSubtitle("ProductDetails feed");
...
return feed;
}
and in the spring conf:
<jaxrs:server id="atomProductRestWebService" address="/product">
<jaxrs:serviceBeans>
<ref bean="atomProductWebService" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean class="org.apache.cxf.jaxrs.provider.AtomFeedProvider" />
</jaxrs:providers>
</jaxrs:server>
where atomProductWebService is the class with the getProductDetails
implemented.
Is there something special I need to add?
Thanks,
Vicio.