public static void undeployService(String serviceName) throws Exception { if (context == null) { throw new RuntimeException("Missing context"); } context.getAxisConfiguration().removeService(serviceName); } }
axisConfig.removeService(serviceName); } else { context.getLogger()
/** * Removes the Synapse Service from the Axis2 configuration. * * @throws AxisFault if an error occurs during Axis2 service removal */ private void undeploySynapseService() throws AxisFault { log.info("Undeploying the Synapse service..."); configurationContext.getAxisConfiguration().removeService( SynapseConstants.SYNAPSE_SERVICE_NAME); }
/** * Removes the Synapse Service from the Axis2 configuration. * * @throws AxisFault if an error occurs during Axis2 service removal */ private void undeploySynapseService() throws AxisFault { log.info("Undeploying the Synapse service..."); configurationContext.getAxisConfiguration().removeService( SynapseConstants.SYNAPSE_SERVICE_NAME); }
public void stop() { try { servletHost.removeServletMapping(endpointURI); servletHost = null; // get the path to the service // [nash] Need a leading slash for WSDL imports to work with ?wsdl URI uriPath = new URI(deployedURI); String stringURIPath = uriPath.getPath(); configContext.getAxisConfiguration().removeService(stringURIPath); } catch (URISyntaxException e) { throw new RuntimeException(e); } catch (AxisFault e) { throw new RuntimeException(e); } }
private void unDeployCRUDService(GovernanceArtifactConfiguration configuration, AxisConfiguration axisConfig) { String singularLabel = configuration.getSingularLabel(); try { if (axisConfig.getService(singularLabel) != null) { axisConfig.removeService(singularLabel); } } catch (AxisFault axisFault) { log.error(axisFault); } }
public static synchronized void unDeployService(QName service) throws AxisFault { receiver.getConfigurationContext().getAxisConfiguration() .removeService(service.getLocalPart()); }
/** * Undeploys all event sources. * * @throws AxisFault if an error occurs undeploying the event sources. */ private void undeployEventSources() throws AxisFault { log.info("Undeploying EventSources..."); for (SynapseEventSource eventSource : synapseConfiguration.getEventSources()) { configurationContext.getAxisConfiguration().removeService(eventSource.getName()); } }
/** * Removes all Synapse proxy services from the Axis2 configuration. * * @throws AxisFault if an error occurs undeploying proxy services */ private void undeployProxyServices() throws AxisFault { log.info("Undeploying Proxy services..."); for (ProxyService proxy : synapseConfiguration.getProxyServices()) { configurationContext.getAxisConfiguration().removeService( proxy.getName()); } }
/** * Undeploys all event sources. * * @throws AxisFault if an error occurs undeploying the event sources. */ private void undeployEventSources() throws AxisFault { log.info("Undeploying EventSources..."); for (SynapseEventSource eventSource : synapseConfiguration.getEventSources()) { configurationContext.getAxisConfiguration().removeService(eventSource.getName()); } }
/** * Removes all Synapse proxy services from the Axis2 configuration. * * @throws AxisFault if an error occurs undeploying proxy services */ private void undeployProxyServices() throws AxisFault { log.info("Undeploying Proxy services..."); for (ProxyService proxy : synapseConfiguration.getProxyServices()) { configurationContext.getAxisConfiguration().removeService( proxy.getName()); } }
@TearDown @SuppressWarnings("unused") private void tearDown() throws Exception { if (transportErrorSource != null) { transportErrorSource.removeErrorListener(errorListener); } context.getAxisConfiguration().removeService(service.getName()); }
@TearDown @SuppressWarnings("unused") private void tearDown() throws Exception { if (transportErrorSource != null) { transportErrorSource.removeErrorListener(errorListener); } context.getAxisConfiguration().removeService(service.getName()); }
@TearDown @SuppressWarnings("unused") private void tearDown() throws Exception { if (transportErrorSource != null) { transportErrorSource.removeErrorListener(errorListener); } context.getAxisConfiguration().removeService(service.getName()); }
/** * Configure the ServiceClient to interact with the Web service described by the specified * AxisService object. * * @param axisService the AxisService that represents the new Web service. * @throws AxisFault if an error occurs while configuring the ServiceClient. */ public void setAxisService(AxisService axisService) throws AxisFault { if (axisService == null) { // AxisFault? throw new IllegalArgumentException("AxisService is null"); } synchronized (this.axisConfig) { axisConfig.removeService(this.axisService.getName()); this.axisService = axisService; axisService.setClientSide(true); axisConfig.addService(axisService); } AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup(); ServiceGroupContext serviceGroupContext = configContext.createServiceGroupContext(axisServiceGroup); this.serviceContext = serviceGroupContext.getServiceContext(axisService); }
/** * Configure the ServiceClient to interact with the Web service described by the specified * AxisService object. * * @param axisService the AxisService that represents the new Web service. * @throws AxisFault if an error occurs while configuring the ServiceClient. */ public void setAxisService(AxisService axisService) throws AxisFault { if (axisService == null) { // AxisFault? throw new IllegalArgumentException("AxisService is null"); } synchronized (this.axisConfig) { axisConfig.removeService(this.axisService.getName()); this.axisService = axisService; axisService.setClientSide(true); axisConfig.addService(axisService); } AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup(); ServiceGroupContext serviceGroupContext = configContext.createServiceGroupContext(axisServiceGroup); this.serviceContext = serviceGroupContext.getServiceContext(axisService); }
/** * Remove an event source from the configuration. If the specified event source does not * exist a runtime exception is thrown. * * @param name name of the event source to be removed */ public synchronized void removeEventSource(String name) { SynapseEventSource eventSource = eventSources.get(name); if (eventSource == null) { handleException("No event source exists by the name : " + name); } else { try { if (getAxisConfiguration().getServiceForActivation(name) != null) { if (getAxisConfiguration().getServiceForActivation(name) .isActive()) { getAxisConfiguration().getService(name) .setActive(false); } getAxisConfiguration().removeService(name); } eventSources.remove(name); for (SynapseObserver o : observers) { o.eventSourceRemoved(eventSource); } } catch (AxisFault axisFault) { handleException(axisFault.getMessage()); } } }
/** * Deletes the Proxy Service named with the given name. If a proxy service does not exist by * the specified name a runtime exception is thrown. * * @param name * of the Proxy Service to be deleted */ public synchronized void removeProxyService(String name) { ProxyService proxy = proxyServices.get(name); if (proxy == null) { handleException("Unknown proxy service for name : " + name); } else { try { if (getAxisConfiguration().getServiceForActivation(name) != null) { if (getAxisConfiguration().getServiceForActivation(name) .isActive()) { getAxisConfiguration().getService(name) .setActive(false); } getAxisConfiguration().removeService(name); } proxyServices.remove(name); for (SynapseObserver o : observers) { o.proxyServiceRemoved(proxy); } } catch (AxisFault axisFault) { handleException(axisFault.getMessage()); } } }
/** * Remove an event source from the configuration. If the specified event source does not * exist a runtime exception is thrown. * * @param name name of the event source to be removed */ public synchronized void removeEventSource(String name) { SynapseEventSource eventSource = eventSources.get(name); if (eventSource == null) { handleException("No event source exists by the name : " + name); } else { try { if (getAxisConfiguration().getServiceForActivation(name) != null) { if (getAxisConfiguration().getServiceForActivation(name) .isActive()) { getAxisConfiguration().getService(name) .setActive(false); } getAxisConfiguration().removeService(name); } eventSources.remove(name); for (SynapseObserver o : observers) { o.eventSourceRemoved(eventSource); } } catch (AxisFault axisFault) { handleException(axisFault.getMessage()); } } }
.setActive(false); getAxisConfiguration().removeService(name);