Search in sources :

Example 1 with JBossWSConfigurer

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;
}
Also used : Bus(org.apache.cxf.Bus) JBossWSConfigurer(org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer) JAXBBindingCustomization(org.jboss.ws.api.binding.JAXBBindingCustomization) BindingCustomization(org.jboss.ws.api.binding.BindingCustomization) JAXBBindingCustomization(org.jboss.ws.api.binding.JAXBBindingCustomization) JBossWSConfigurer(org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer) Configurer(org.apache.cxf.configuration.Configurer)

Aggregations

Bus (org.apache.cxf.Bus)1 Configurer (org.apache.cxf.configuration.Configurer)1 BindingCustomization (org.jboss.ws.api.binding.BindingCustomization)1 JAXBBindingCustomization (org.jboss.ws.api.binding.JAXBBindingCustomization)1 JBossWSConfigurer (org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer)1