whats the exception your getting Suho
On Thu, Feb 5, 2015 at 3:36 PM, Harsha Thirimanna <hars...@wso2.com> wrote: > What is the complete exception detail ? > > > *Harsha Thirimanna* > Senior Software Engineer; WSO2, Inc.; http://wso2.com > * <http://www.apache.org/>* > *email: **hars...@wso2.com* <az...@wso2.com>* 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 <prabus...@wso2.com> > 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: prabus...@wso2.com >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- *S. Suhothayan* Technical Lead & Team Lead of WSO2 Complex Event Processor *WSO2 Inc. *http://wso2.com * <http://wso2.com/>* lean . enterprise . middleware *cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter: http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in: http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev