Hello,
for a unit test I am trying to configure my EndpointImpl to use MTOM or,
respectivelly, fastinfoset for webservice compression.
Within same Unittest I try
1. to enable mtom
2. call webservice
3. disable mtom
4. enable fastinfoset
5. call webservice
The mtom-part works just fine but I am unable to programmatically configure
fastinfoset. Only case the fastinfoset works, is when I add cxf:fastinfoset
feature to the bus in beans configuration. Any hint to what I am doing wrong
is greatly appreciated!
cheers
reinis
Please find bellow an excerpts of all the different attempts I did:
1 /* This works */
2 <cxf:bus>
3 <cxf:features>
4 <cxf:fastinfoset/>
5 </cxf:features>
6 </cxf:bus>
7
8 /* This does not work */
9 @Features(features = { "org.apache.cxf.feature.FastInfosetFeature" })
10 public class SampleServiceImpl implements SampleService {
11 ...
12
13 /* This does not work */
14 FIStaxInInterceptor in = new FIStaxInInterceptor();
15 FIStaxOutInterceptor in = new FIStaxOutInterceptor();
16 endPointImpl.getInInterceptors().add(in);
17 endPointImpl.getInFaultInterceptors().add(in);
18 endPointImpl.getOutInterceptors().add(out);
19 endPointImpl.getOutFaultInterceptors().add(out);
20
21 /* This does not work */
22 ...
23 ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
24 FastinfosetFeature fiFeature = new FastinfosetFeature();
25 // added my feature to the serverFactoryBean
26 serverFactoryBean.setFeatures(new ArrayList().add(fiFeature));
27 ...
28
29 ClientFactoryBean clientFactoryBean = new ClientFactoryBean();
30 clientFactoryBean.setFeatures(new ArrayList().add(fiFeature));
31 ...
--
View this message in context:
http://old.nabble.com/Configuring-fastinfoset-programmatically-%28and-not-declarative%29-tp27591064p27591064.html
Sent from the cxf-user mailing list archive at Nabble.com.