/** * Add an AxisService to our global configuration. Since services must * be in ServiceGroups, we construct an anonymous AxisServiceGroup around * the passed AxisService and then call addServiceGroup(). * * @param service an AxisService to deploy. * @throws AxisFault if something goes wrong (invalid service, service is * already deployed, etc...) */ public synchronized void addService(AxisService service) throws AxisFault { AxisServiceGroup axisServiceGroup = new AxisServiceGroup(); axisServiceGroup.setServiceGroupName(service.getName()); axisServiceGroup.setParent(this); axisServiceGroup.addService(service); addServiceGroup(axisServiceGroup); // processEndpoints(service, service.getAxisConfiguration()); }
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
/** * Add an AxisService to our global configuration. Since services must * be in ServiceGroups, we construct an anonymous AxisServiceGroup around * the passed AxisService and then call addServiceGroup(). * * @param service an AxisService to deploy. * @throws AxisFault if something goes wrong (invalid service, service is * already deployed, etc...) */ public synchronized void addService(AxisService service) throws AxisFault { AxisServiceGroup axisServiceGroup = new AxisServiceGroup(); axisServiceGroup.setServiceGroupName(service.getName()); axisServiceGroup.setParent(this); axisServiceGroup.addService(service); addServiceGroup(axisServiceGroup); // processEndpoints(service, service.getAxisConfiguration()); }
deploymentFileData, configCtx); AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig); serviceGroup.setServiceGroupClassLoader(deploymentFileData.getClassLoader()); ArrayList<AxisService> serviceList = archiveReader.processServiceGroup(
InputStream inputStream = null; try { serviceGroup = new AxisServiceGroup(axisConfiguration); ClassLoader loader = new BundleClassLoader(bundle, Axis2ServiceRegistry.class.getClassLoader()); URL url = (URL) enumeration.nextElement();
return; AxisServiceGroup serviceGroup = new AxisServiceGroup(); StringWriter errorWriter = new StringWriter(); ArrayList<AxisService> servicelist =
private AxisServiceGroup createServiceGroupForService(AxisService svc) throws AxisFault { AxisServiceGroup svcGroup = new AxisServiceGroup(); svcGroup.setServiceGroupName(svc.getName()); svcGroup.addService(svc); // Checking configured using files param is not a good solution. We must figure out a way to handle this // at Carbon persistence manager layer. if (svc.getParameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM) != null && svc.getParameter(BusinessProcessConstants.CONFIGURED_USING_BPEL_PKG_CONFIG_FILES) == null) { svcGroup.addParameter(new Parameter(CarbonConstants.PRESERVE_SERVICE_HISTORY_PARAM, "true")); } return svcGroup; }
return; AxisServiceGroup serviceGroup = new AxisServiceGroup(); StringWriter errorWriter = new StringWriter(); ArrayList<AxisService> servicelist =
AxisServiceGroup serviceGroup = new AxisServiceGroup( axisConfig); serviceGroup.setServiceGroupClassLoader(filedata
AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupName(serviceHierarchy + deploymentFileData.getName());
public static AxisServiceGroup loadServiceGroup(File serviceFile, ConfigurationContext configCtx) throws AxisFault { try { DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile, null); DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile, configCtx.getAxisConfiguration().isChildFirstClassLoading()); currentDeploymentFile.setClassLoader(classLoader); AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); // Drop the extension and take the name String fileName = serviceFile.getName(); String serviceGroupName = fileName.substring(0, fileName.lastIndexOf(".")); serviceGroup.setServiceGroupName(serviceGroupName); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); ArchiveReader archiveReader = new ArchiveReader(); HashMap<String, AxisService> wsdlServices = archiveReader.processWSDLs(currentDeploymentFile); InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml"); ArrayList<AxisService> serviceList = archiveReader.buildServiceGroup(serviceXml, currentDeploymentFile, serviceGroup, wsdlServices, configCtx); fillServiceGroup(serviceGroup, serviceList, null, axisConfig); return serviceGroup; } catch (Exception e) { throw new DeploymentException(e); } }
public static AxisServiceGroup loadServiceGroup(File serviceFile, ConfigurationContext configCtx) throws AxisFault { try { DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile, null); DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile, configCtx.getAxisConfiguration().isChildFirstClassLoading()); currentDeploymentFile.setClassLoader(classLoader); AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); // Drop the extension and take the name String fileName = serviceFile.getName(); String serviceGroupName = fileName.substring(0, fileName.lastIndexOf(".")); serviceGroup.setServiceGroupName(serviceGroupName); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); ArchiveReader archiveReader = new ArchiveReader(); HashMap<String, AxisService> wsdlServices = archiveReader.processWSDLs(currentDeploymentFile); InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml"); ArrayList<AxisService> serviceList = archiveReader.buildServiceGroup(serviceXml, currentDeploymentFile, serviceGroup, wsdlServices, configCtx); fillServiceGroup(serviceGroup, serviceList, null, axisConfig); return serviceGroup; } catch (Exception e) { throw new DeploymentException(e); } }
DeploymentFileData currentDeploymentFile = new DeploymentFileData(null, null); currentDeploymentFile.setClassLoader(classLoader); AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); serviceGroup.setServiceGroupName(serviceGroupName);
DeploymentFileData currentDeploymentFile = new DeploymentFileData(null, null); currentDeploymentFile.setClassLoader(classLoader); AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); serviceGroup.setServiceGroupName(serviceGroupName);
axisAnonymousService.addOperation(outInAxisOperation); axisAnonymousService.addOperation(outOnlyAxisOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
axisAnonymousService.addOperation(outInAxisOperation); axisAnonymousService.addOperation(outOnlyAxisOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
axisAnonymousService.addOperation(dynamicOperation); axisAnonymousService.addOperation(asyncOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
axisAnonymousService.addOperation(dynamicOperation); axisAnonymousService.addOperation(asyncOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
AxisServiceGroup axisServiceGroup = new AxisServiceGroup(axisConfiguration); ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configContext, axisServiceGroup);