Binding binding = def.createBinding();
binding.setQName(new QName(def.getTargetNamespace(), bindingName));
binding.setPortType(portType);
binding.setUndefined(false);
// Create soap extension
SOAPBinding soap = new SOAPBindingImpl();
soap.setTransportURI("http://schemas.xmlsoap.org/soap/http");
soap.setStyle("document");
binding.addExtensibilityElement(soap);
// Create operations
List operations = portType.getOperations();
for (Iterator iter = operations.iterator(); iter.hasNext();) {
Operation operation = (Operation) iter.next();