/** * Create a new BaseService from the specified config model. * * @param serviceConfig the composite service config. * @param application the application containing the service. */ public BaseService(CompositeServiceModel serviceConfig, Application application) { _name = serviceConfig.getQName(); _application = application; if (serviceConfig.getInterface() != null) { _serviceInterface = serviceConfig.getInterface().getInterface(); } _promotedService = getPromotedService(application, serviceConfig); _gateways = new ArrayList<Binding>(); int idx = 1; for (BindingModel bindingModel : serviceConfig.getBindings()) { // Generate binding name for now until tooling and config are updated to expose it String name = bindingModel.getType() + idx++; _gateways.add(new BaseBinding(bindingModel.getType(), name, bindingModel.toString())); } }