Hi Dan,
For some reason, I cannot make this work. I added the annotation, and when I do wget with accept = application/fastinfoset, it returns a 500 internal server error. wget -S --header="Accept: application/fastinfoset" http://localhost:8080/services/samples/getSample We are using CXF 2.2.5 and our project is maven base. any advice will be greatly appreciated. our service is design this way: @Path("/samples") @Features(features = { "org.apache.cxf.feature.FastInfosetFeature" }) @Produces({"application/xml","application/fastinfoset", "text/plain"}) public class SampleServiceImpl implements SampleService { best regards, Allan dkulp wrote: > > On Thursday 30 October 2008 2:25:51 pm vathsan wrote: >> It appears that FastInfoset has some performance benefits and I've been >> trying to find examples of how to employ it but haven't found any yet. >> Anyone here come across an example of how to make use of FastInfoset with >> CXF? >> General guidelines on its usage will also be helpful. Thanks. > > The easiest is probably add: > @Features(features = { "org.apache.cxf.feature.FastInfosetFeature" }) > to the interface if this is a code-first thing. > > > Otherwise, bus level config is pretty easy: > > <bean id="fastinfoset" > class="org.apache.cxf.feature.FastInfosetFeature"/> > <cxf:bus> > <cxf:features> > <ref bean="fastinfoset"/> > </cxf:features> > </cxf:bus> > > The FastInfosetFeature bean has a property to "force" usage of FastInfoset > if > you need to do that. However, the default usually works pretty well as > it > ends up being a negotiated thing. The first request from a client > is "normal", but adds a fastinfoset thing to the Accept-Content-Type. If > the server side sees that, it responsds with fastinfoset. From there on, > the client knows the server is OK with that and will send all subsequent > requests with fastinfoset. > > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > > -- View this message in context: http://old.nabble.com/Using-FastInfoset-with-CXF-tp20252695p27026983.html Sent from the cxf-user mailing list archive at Nabble.com.
