THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
You can also add the feature to the server by using ServerFactoryBean, or the client by using the ClientFactoryBean or the ClientProxyFactoryBean
Code Block | ||||
---|---|---|---|---|
| ||||
import org.apache.cxf.frontend.ServerFactoryBean; import org.apache.cxf.frontend.ClientFactoryBean; import org.apache.cxf.frontend.ClientProxyFactoryBean; ... ServerFactoryBean serverFactoryBean = new ServerFactoryBean(); MyFeature myFeature = new MyFeature(); // added my feature to the serverFactoryBean serverFactoryBean.setFeatures(new ArrayList().addCollections.singletonList(myFeature)); ... ClientFactoryBean clientFactoryBean = new ClientFactoryBean(); clientFactoryBean.setFeatures(new ArrayList().addCollections.singletonList(myFeature)); ... ClientProxyFactoryBean clientFactoryBean = new ClientProxyFactoryBean(); clientFactoryBean.setFeatures(Collections.singletonList(policyFeature)); |
Adding a Feature through configuration
...