Hi I don't think we need to support to change the databinding for Dispatch API. It's a JAXWS API which relays on JAXB.
But if you take a look at the example\wsdlfirst_xmlbeans or here[1], you can see it is not difficult to switch the dataBinding from JAXB to XMLBeans. [1] http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml Willem Christopher Cheng wrote: > In the class "org.apache.cxf.jaxws.ServiceImpl" which is the only > implementation of "javax.xml.ws.spi.ServiceDelegate" in project, > JAXBDataBinding is hardcoded. > So, how could I switch to XMLBeans for clients? > > public Dispatch<Object> createDispatch(QName portName, > JAXBContext context, > Mode mode, > WebServiceFeature... features) { > JaxWsClientFactoryBean clientFac = new JaxWsClientFactoryBean(); > > //Initialize Features. > configureObject(portName.toString() + ".jaxws-client.proxyFactory", > clientFac); > AbstractServiceFactoryBean sf = null; > try { > *sf = createDispatchService(new JAXBDataBinding(context)); > * } catch (ServiceConstructionException e) { > throw new WebServiceException(e); > } > Endpoint endpoint = getJaxwsEndpoint(portName, sf, features); > Client client = new ClientImpl(getBus(), endpoint, > clientFac.getConduitSelector()); > for (AbstractFeature af : clientFac.getFeatures()) { > af.initialize(client, bus); > } > Dispatch<Object> disp = new DispatchImpl<Object>(bus, client, mode, > context, > Object.class, getExecutor()); > configureObject(disp); > return disp; > } >
