use of org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer in project jbossws-cxf by jbossws.
the class Helper method setBindingCustomizationOnClientSide.
/**
* Setup binding customization on client side using the JBossWSConfigurer
*
* @throws Exception
*/
@SuppressWarnings("unchecked")
private Bus setBindingCustomizationOnClientSide() throws Exception {
BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
if (jaxbIntroUrl == null) {
jaxbIntroUrl = Thread.currentThread().getContextClassLoader().getResource("jaxb-intros.xml");
}
BindingCustomizationFactory.populateBindingCustomization(jaxbIntroUrl.openStream(), jaxbCustomizations);
Bus bus = BusFactory.newInstance().createBus();
BusFactory.setThreadDefaultBus(bus);
JBossWSConfigurer configurer = (JBossWSConfigurer) bus.getExtension(Configurer.class);
configurer.getCustomizer().setBindingCustomization(jaxbCustomizations);
return bus;
}
Aggregations