while ((entry = zin.getNextEntry()) != null) { if (entry.getName().equalsIgnoreCase(SERVICES_XML)) { axisServiceGroup.setServiceGroupName( DescriptionBuilder.getShortFileName(currentFile.getName())); return buildServiceGroup(zin, currentFile, axisServiceGroup, wsdlServices, try { in = new FileInputStream(file); axisServiceGroup.setServiceGroupName(currentFile.getName()); return buildServiceGroup(in, currentFile, axisServiceGroup, wsdlServices, configCtx); } catch (FileNotFoundException e) {
while ((entry = zin.getNextEntry()) != null) { if (entry.getName().equalsIgnoreCase(SERVICES_XML)) { axisServiceGroup.setServiceGroupName( DescriptionBuilder.getShortFileName(currentFile.getName())); return buildServiceGroup(zin, currentFile, axisServiceGroup, wsdlServices, try { in = new FileInputStream(file); axisServiceGroup.setServiceGroupName(currentFile.getName()); return buildServiceGroup(in, currentFile, axisServiceGroup, wsdlServices, configCtx); } catch (FileNotFoundException e) {
public ArrayList<AxisService> processServiceGroup(OMElement serviceMetaData, DeploymentFileData currentFile, AxisServiceGroup axisServiceGroup, boolean extractService, Map<String, AxisService> wsdlServices, ConfigurationContext configCtx) throws AxisFault { Object serviceMetaDataObject; try { if (serviceMetaData == null) { serviceMetaDataObject = currentFile.getServiceMetaData(); if (serviceMetaDataObject != null && serviceMetaDataObject instanceof OMElement) { serviceMetaData = (OMElement) serviceMetaDataObject; } } if (serviceMetaData != null) { if(!extractService){ axisServiceGroup.setServiceGroupName( DescriptionBuilder.getShortFileName(currentFile.getName())); } else { axisServiceGroup.setServiceGroupName(currentFile.getName()); } return buildServiceGroup(serviceMetaData, currentFile, axisServiceGroup, wsdlServices, configCtx); } throw new DeploymentException("Can not find service meta data file"); } catch (XMLStreamException e) { throw new DeploymentException(e); } }
public ArrayList<AxisService> processServiceGroup(OMElement serviceMetaData, DeploymentFileData currentFile, AxisServiceGroup axisServiceGroup, boolean extractService, Map<String, AxisService> wsdlServices, ConfigurationContext configCtx) throws AxisFault { Object serviceMetaDataObject; try { if (serviceMetaData == null) { serviceMetaDataObject = currentFile.getServiceMetaData(); if (serviceMetaDataObject != null && serviceMetaDataObject instanceof OMElement) { serviceMetaData = (OMElement) serviceMetaDataObject; } } if (serviceMetaData != null) { if(!extractService){ axisServiceGroup.setServiceGroupName( DescriptionBuilder.getShortFileName(currentFile.getName())); } else { axisServiceGroup.setServiceGroupName(currentFile.getName()); } return buildServiceGroup(serviceMetaData, currentFile, axisServiceGroup, wsdlServices, configCtx); } throw new DeploymentException("Can not find service meta data file"); } catch (XMLStreamException e) { throw new DeploymentException(e); } }
/** * 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()); }
@Override protected ArrayList<?> populateService(AxisServiceGroup serviceGroup, URL servicesURL, String serviceName) throws DeploymentException { try { serviceGroup.setServiceGroupName(serviceName); servicesURL = new URL(servicesURL.toString() + "/"); // ADDED. url's a dir, not a file - TWW ClassLoader serviceClassLoader = Utils.createClassLoader(new URL[] { servicesURL }, axisConfig
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; }
Dictionary headers = bundle.getHeaders(); String bundleSymbolicName = (String) headers.get("Bundle-SymbolicName"); serviceGroup.setServiceGroupName(bundleSymbolicName); serviceGroup.setServiceGroupClassLoader(loader); inputStream = url.openStream();
serviceGroup.setServiceGroupName(serviceHierarchy + deploymentFileData.getName()); for (Object anAxisServiceList : axisServiceList) {
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); } }
AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); serviceGroup.setServiceGroupName(serviceGroupName); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); try {
axisAnonymousService.addOperation(outOnlyAxisOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true);
AxisServiceGroup serviceGroup = new AxisServiceGroup(); serviceGroup.setServiceGroupClassLoader(classLoader); serviceGroup.setServiceGroupName(serviceGroupName); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); try {
axisAnonymousService.addOperation(outOnlyAxisOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true);
axisAnonymousService.addOperation(asyncOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true);
axisAnonymousService.addOperation(asyncOperation); AxisServiceGroup axisAnonSvcGroup = new AxisServiceGroup(axisCfg); axisAnonSvcGroup.setServiceGroupName(serviceKey); axisAnonSvcGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); axisAnonymousService.setClientSide(true);