*/
public BusinessServices createBusinessServices(Definition wsdlDefinition) {
if (wsdlDefinition == null) {
throw new IllegalArgumentException();
}
BusinessServices businessServices = new BusinessServices();
for (Object serviceName : wsdlDefinition.getAllServices().keySet()) {
QName serviceQName = (QName) serviceName;
Service service = wsdlDefinition.getService(serviceQName);
BusinessService businessService = createBusinessService(serviceQName, wsdlDefinition);
//service.getExtensibilityElements().
//add the bindingTemplates
URL serviceUrl = null;
if (service.getPorts() != null && service.getPorts().size() > 0) {
businessService.setBindingTemplates(new BindingTemplates());
for (Object portName : service.getPorts().keySet()) {
BindingTemplate bindingTemplate = createWSDLBinding(serviceQName, (String) portName, serviceUrl, wsdlDefinition);
businessService.getBindingTemplates().getBindingTemplate().add(bindingTemplate);
}
}
businessServices.getBusinessService().add(businessService);
}
return businessServices;
}