Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import com.google.inject.Inject;
public class JaxWsProxyFactoryBeanFactory {
private final JAXBDataBindingHolder bindings;
@Inject
public JaxWsProxyFactoryBeanFactory(JAXBDataBindingHolder bindings) {
this.bindings = bindings;
}
public JaxWsProxyFactoryBean create(Class<?> serviceInterface, URL wsdlLocation, QName serviceName) {
JaxWsProxyFactoryBean mojo = new JaxWsProxyFactoryBean();
mojo.setServiceClass(serviceInterface);
mojo.setWsdlLocation(wsdlLocation.toString());
mojo.setServiceName(serviceName);
mojo.setDataBinding(bindings.getDataBinding(serviceInterface));
return mojo;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment