Can you please share your source as well? /Ruchira
On Wed, Apr 22, 2015 at 9:19 PM, Yashira Perera <[email protected]> wrote: > Hi Ruchira, > > When is registry.content() method i am getting following Exception. > > ERROR {org.jaggeryjs.scriptengine.engine.RhinoEngine} - > org.mozilla.javascript.EcmaError: TypeError: Cannot find function content > in object org.wso2.carbon.registry.core.session.UserRegistry@10351989. > (/cloudmgt/modules/customurl/publish/publish.jag#165) > [2015-04-22 21:11:45,690] ERROR > {org.jaggeryjs.jaggery.core.manager.WebAppManager} - > org.mozilla.javascript.EcmaError: TypeError: Cannot find function content > in object org.wso2.carbon.registry.core.session.UserRegistry@10351989. > (/cloudmgt/modules/customurl/publish/publish.jag#165) > org.jaggeryjs.scriptengine.exceptions.ScriptException: > org.mozilla.javascript.EcmaError: TypeError: Cannot find function content > in object org.wso2.carbon.registry.core.session.UserRegistry@10351989. > (/cloudmgt/modules/customurl/publish/publish.jag#165) > > > I have attached full stacktrace of the error in this mail. > > Thanks > > On Wed, Apr 22, 2015 at 6:54 PM, Ruchira Wageesha <[email protected]> > wrote: > >> Hi Yashira, >> >> You can use registry.content() method. i.e. >> >> var content = registry.content(*'/_system/governances/file'*); >> *var *json = JSON.parse(content); >> >> >> On Wed, Apr 22, 2015 at 6:36 PM, Yashira Perera <[email protected]> >> wrote: >> >>> Hi all, >>> >>> I have implemented a jaggery program which used to take contents from >>> the Registry. but once i retrieve the content it was like [B@3fe7fd75 >>> .(byte format) >>> >>> The resource on registry is in json format and i used osgi >>> service(org.wso2.carbon.registry.core.service.RegistryService) to add and >>> retrieve the resource. My question is how to get the resource content as >>> json format? >>> >>> Thanks >>> >>> -- >>> *Yashira Perera* >>> *Software Engineer * >>> *WSO2, Inc : * http://wso2.com >>> lean.enterprise.middleware >>> >>> Mobile: +9471 716 6797 >>> >> >> >> >> -- >> >> *Ruchira Wageesha**Associate Technical Lead* >> *WSO2 Inc. - lean . enterprise . middleware | wso2.com <http://wso2.com>* >> >> *email: [email protected] <[email protected]>, blog: >> ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>, >> mobile: +94 77 5493444 <%2B94%2077%205493444>* >> > > > > -- > *Yashira Perera* > *Software Engineer * > *WSO2, Inc : * http://wso2.com > lean.enterprise.middleware > > Mobile: +9471 716 6797 > -- *Ruchira Wageesha**Associate Technical Lead* *WSO2 Inc. - lean . enterprise . middleware | wso2.com <http://wso2.com>* *email: [email protected] <[email protected]>, blog: ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>, mobile: +94 77 5493444*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
