String bindingUri = portInfo.getBindingUri();
// TODO: Replace with discovery mechanism!!
AbstractBindingInfoFactoryBean bindingFactory = null;
if (bindingUri.equals(XMLConstants.NS_XML_FORMAT)) {
bindingFactory = new XMLBindingInfoFactoryBean();
} else if ("http://schemas.xmlsoap.org/soap/".equals(bindingUri)) {
JaxWsSoapBindingInfoFactoryBean soapBindingFactory = new JaxWsSoapBindingInfoFactoryBean();
soapBindingFactory.setTransportURI(transportId);
bindingFactory = soapBindingFactory;
} else {
bindingFactory = new XMLBindingInfoFactoryBean();
}
bindingFactory.setServiceFactory(serviceFactory);
BindingInfo bindingInfo = bindingFactory.create();