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;
}