What is the complete exception detail ?
*Harsha Thirimanna* Senior Software Engineer; WSO2, Inc.; http://wso2.com * <http://www.apache.org/>* *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , +94 * *774617784twitter: **http://twitter.com/ <http://twitter.com/afkham_azeez>* *harshathirimannlinked-in: **http: <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* *Lean . Enterprise . Middleware* On Thu, Feb 5, 2015 at 3:33 PM, Prabushi Samarakoon <[email protected]> wrote: > We need to access CEP registry and do save and delete xml files. Can some > one help us with this? > > Current *save method* looks like: > > public void saveTemplateConfig(String fileName,String fileContent,String > description,String type) throws RegistryException { > CarbonContext cCtx = CarbonContext.getCurrentContext(); > Registry registry = (Registry) > cCtx.getRegistry(RegistryType.SYSTEM_CONFIGURATION); > String registryType = RegistryType.SYSTEM_CONFIGURATION.toString(); > if(registryType != null) { > registry = (Registry) > cCtx.getRegistry(RegistryType.valueOf(registryType)); > } > Resource resource = registry.newResource(); > resource.setContent(fileContent); > resource.setProperty("name",fileName); > resource.setProperty("description",description); > resource.setProperty("type",type); > String resourcePath = > ExecutionGeneratorConstants.TEMPLATE_CONFIG_PATH+"/"+fileName+".xml"; > registry.put(resourcePath, resource); > } > > > TEMPLATE_CONFIG_PATH="/repository/components/org.wso2.carbon.execution_generator/TemplateConfig"; > > *delete method:* > > public void deleteTemplateConfig(String configName){ > DomainConfigInfoDTO[] domainConfigInfoDTOs=null; > CarbonContext cCtx = CarbonContext.getCurrentContext(); > Registry registry = (Registry) > cCtx.getRegistry(RegistryType.SYSTEM_CONFIGURATION); > String registryType = RegistryType.SYSTEM_CONFIGURATION.toString(); > if(registryType != null) { > registry = (Registry) > cCtx.getRegistry(RegistryType.valueOf(registryType)); > } > try{ > > registry.delete(ExecutionGeneratorConstants.TEMPLATE_CONFIG_PATH+ "/" > +configName+".xml"); > } catch (Exception e){ > e.printStackTrace(); > } > } > > We built a carbon component and use soapUI client to request for services, > but we get exceptions while trying to invoke service method. > > -- > *Prabushi Samarakoon* > Software Engineering Intern | WSO2 Lanka > Mobile.: +710415616 > Email: [email protected] > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
