Hi Aditya, You have to provide the correct key to access the registry path in your code.
e.g if you have stored your xslt in configuration registry, use <xslt key= "conf:/calTest.xsl"/> [1] https://docs.wso2.com/display/ESB481/XSLT+Mediator [2] http://rangasiriwardena.blogspot.com/2011/07/how-to-use-dynamic-registry-keys-with.html Regards On Mon, Nov 20, 2017 at 10:25 AM, aditya shivankar < [email protected]> wrote: > Respected Sir, > > Now I tried putting xsl file under registry, still not able to use it. > Please check the screenshot attached. > Could you please send the screenshot of your workspace in eclipse (similar > to the attached screenshot), showing where to keep the xslt in project > structure and also project xml file showing how you access it. > > With Regards, > Aditya > > > On Mon, Nov 20, 2017 at 11:42 AM, aditya shivankar < > [email protected]> wrote: > >> Respected Sir/Madam, >> >> Now I tried putting xsl file under registry, still not able to use it. >> Please check the screenshot attached. >> Could you please send the screenshot of your workspace in eclipse >> (similar to the attached screenshot), showing where to keep the xslt in >> project structure and also project xml file showing how you access it. >> >> With Regards, >> Aditya >> >> On Wed, Nov 15, 2017 at 7:41 PM, Saneth Dharmakeerthi <[email protected]> >> wrote: >> >>> Hi Aditya, >>> >>> It seems you have put the XSLT in API folder and try to access it in >>> incorrect way. >>> >>> You can do this by either one of following ways and the first one is the >>> recommended. >>> >>> >>> 1. Put the XSLT to the registry. you can find more information >>> in[1][3]. If you change the xslt in registry it will effect imidiatly. >>> 2. Put it as local entry[1][2], XSLT change exffect only after next >>> API or peoxy deployment. >>> - <!-- define the request processing XSLT resource as a >>> static URL source --> >>> >>> <localEntry key="xslt-key-req" src="file:repository/sample >>> s/resources/transform/transform.xslt"/> >>> >>> >>> [1]https://docs.wso2.com/display/ESB500/Sample+8%3A+Introduc >>> tion+to+Static+and+Dynamic+Registry+Resources+and+Using+XSLT >>> +Transformations >>> [2] http://mytecheye.blogspot.com/2013/12/wso2-esb-xslt-medi >>> ator-xslt-imports.html >>> [3] https://www.linkedin.com/pulse/wso2-esb-message-transfor >>> mation-mapping-using-xslt-isuru-jayakantha >>> >>> >>> >>> Thanks and Best Regards, >>> >>> Saneth Dharmakeerthi >>> *Associate Technical Lead* >>> WSO2, Inc. >>> Mobile: +94772325511 <+94%2077%20232%205511> >>> >>> <http://wso2.com/signature> >>> >>> On Wed, Nov 15, 2017 at 6:40 PM, aditya shivankar < >>> [email protected]> wrote: >>> >>>> Respected Sir, >>>> >>>> I have one xslt . >>>> I have saved it inside api(src/main/synapse-config/api) folder in my >>>> project. >>>> I am trying to access it using xslt mediator like below. >>>> >>>> <xslt key="api/test.xsl" source="$body/jsonObject"/> >>>> >>>> But getting below error.Full logs can be found in attachment . >>>> >>>> [2017-11-15 18:11:39,128] [EI-Core] INFO - DependencyTracker Local >>>> entry : api/test.xsl was added to the Synapse configuration successfully >>>> [2017-11-15 18:11:39,129] [EI-Core] WARN - SynapseConfigUtils Cannot >>>> convert null to a StreamSource >>>> [2017-11-15 18:11:39,131] [EI-Core] ERROR - XSLTMediator Error creating >>>> XSLT transformer using : Value {name ='null', keyValue ='api/test.xsl'} >>>> org.apache.synapse.SynapseException: Cannot convert null to a >>>> StreamSource >>>> at org.apache.synapse.config.SynapseConfigUtils.handleException >>>> (SynapseConfigUtils.java:580) >>>> at org.apache.synapse.config.SynapseConfigUtils.getStreamSource >>>> (SynapseConfigUtils.java:81) >>>> at org.apache.synapse.mediators.transform.XSLTMediator.createTe >>>> mplate(XSLTMediator.java:420) >>>> at org.apache.synapse.mediators.transform.XSLTMediator.performX >>>> SLT(XSLTMediator.java:268) >>>> at org.apache.synapse.mediators.transform.XSLTMediator.mediate( >>>> XSLTMediator.java:227) >>>> ----------------------------------------------------------- >>>> I tried printing body/jsonObject just one line before call to xslt. And >>>> it printed full payload, somewhat like below. So the payload is not empty. >>>> >>>> <jsonObject><Items>.....</Items></jsonObject> >>>> >>>> <log level="custom"> >>>> <property expression="$body/jsonObject" name="msg21"/> >>>> </log> >>>> >>>> Please Guide. >>>> >>>> With Regards, >>>> Aditya >>>> >>>> >>>> _______________________________________________ >>>> 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 > > -- Gayan Dhanuska Senior Software Engineer http://wso2.com/ Lean Enterprise Middleware Mobile - LK- 071 666 2327 Mobile USA - 612-244-4873 Office Tel : 94 11 214 5345 Fax : 94 11 214 5300
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
