Binding wsdl4JBinding, Definition wsdl4jDefinition) {
//Copy attributes
wsdlBinding.setName(wsdl4JBinding.getQName());
QName interfaceName = wsdl4JBinding.getPortType().getQName();
WSDLInterface wsdlInterface =
this.womDefinition.getInterface(interfaceName);
//FIXME Do We need this eventually???
if (null == wsdlInterface)
throw new WSDLProcessingException("Interface/PortType not found for the Binding :"
+ wsdlBinding.getName());
wsdlBinding.setBoundInterface(wsdlInterface);
Iterator bindingoperationsIterator =
wsdl4JBinding.getBindingOperations().iterator();
WSDLBindingOperation wsdlBindingOperation;
BindingOperation wsdl4jBindingOperation;
while (bindingoperationsIterator.hasNext()) {
wsdlBindingOperation =
this.wsdlComponentFactory.createWSDLBindingOperation();
wsdl4jBindingOperation =
(BindingOperation) bindingoperationsIterator.next();
this.populateBindingOperation(wsdlBindingOperation,
wsdl4jBindingOperation,
wsdl4JBinding.getQName().getNamespaceURI(), wsdl4jDefinition);
wsdlBindingOperation.setOperation(
wsdlInterface.getOperation(
wsdl4jBindingOperation.getOperation().getName()));
copyExtensibleElements(
wsdl4jBindingOperation.getExtensibilityElements(),
wsdlBindingOperation, wsdl4jDefinition);
wsdlBinding.addBindingOperation(wsdlBindingOperation);