AxisService service = serviceGroup.getService(serviceName); if (service != null && service.isActive()) { return service;
public void removeService(String name) throws AxisFault { AxisService service = getService(name); if (service != null) { getAxisConfiguration().notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE,service), service); } removeChild(name); }
/** * Gets a service context. Creates a new one from AxisService. * There is no need to store service context inside serviceGroup * context as well. * * @param service the AxisService for which to get a context * @return Returns ServiceContext. * @throws AxisFault if something goes wrong */ public ServiceContext getServiceContext(AxisService service) throws AxisFault { AxisService axisService = axisServiceGroup.getService(service.getName()); if (axisService == null) { throw new AxisFault(Messages.getMessage("invalidserviceinagroup", service.getName(), axisServiceGroup.getServiceGroupName())); } if (serviceContextMap == null) { serviceContextMap = new HashMap<String, ServiceContext>(); } ServiceContext serviceContext = (ServiceContext) serviceContextMap.get(service.getName()); if (serviceContext == null) { serviceContext = new ServiceContext(service, this); getRootContext().contextCreated(serviceContext); serviceContextMap.put(service.getName(), serviceContext); } return serviceContext; }
public void removeService(String name) throws AxisFault { AxisService service = getService(name); if (service != null) { getAxisConfiguration().notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE,service), service); } removeChild(name); }
/** * Gets a service context. Creates a new one from AxisService. * There is no need to store service context inside serviceGroup * context as well. * * @param service the AxisService for which to get a context * @return Returns ServiceContext. * @throws AxisFault if something goes wrong */ public ServiceContext getServiceContext(AxisService service) throws AxisFault { AxisService axisService = axisServiceGroup.getService(service.getName()); if (axisService == null) { throw new AxisFault(Messages.getMessage("invalidserviceinagroup", service.getName(), axisServiceGroup.getServiceGroupName())); } if (serviceContextMap == null) { serviceContextMap = new HashMap<String, ServiceContext>(); } ServiceContext serviceContext = (ServiceContext) serviceContextMap.get(service.getName()); if (serviceContext == null) { serviceContext = new ServiceContext(service, this); getRootContext().contextCreated(serviceContext); serviceContextMap.put(service.getName(), serviceContext); } return serviceContext; }