Respected Sir,
I am still getting the same error. I am accessing it like below .
<xslt key="conf:/calTest.xsl"/>
Error :
[2017-11-23 16:57:45,515] [EI-Core] WARN - SynapseConfigUtils Cannot
convert null to a StreamSource
[2017-11-23 16:57:45,521] [EI-Core] ERROR - XSLTMediator Error creating
XSLT transformer using : Value {name ='null', keyValue ='calTest.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)
Please guide.
With Regards,
Aditya
On Wed, Nov 22, 2017 at 10:42 AM, Saneth Dharmakeerthi <[email protected]>
wrote:
> Hi Aditya,
>
> Seems you adding it correctly, let us know if you are experiencing any
> issues on this.
>
> Thanks and Best Regards,
>
> Saneth Dharmakeerthi
> *Associate Technical Lead*
> WSO2, Inc.
> Mobile: +94772325511
>
> <http://wso2.com/signature>
>
> On Tue, Nov 21, 2017 at 8:57 PM, aditya shivankar <
> [email protected]> wrote:
>
>> Respected Sir,
>>
>> I also tried putting the xslt in registry through management console. But
>> something I am doing wrong.
>>
>> Please check attachment.
>>
>> With Regards,
>> Aditya
>>
>> On Tue, Nov 21, 2017 at 8:31 PM, aditya shivankar <
>> [email protected]> wrote:
>>
>>> Respected Sir,
>>>
>>> I think I need to learn by the word registry, where actually I am
>>> suppose to keep the xslt file.
>>>
>>> Went through all the links pasted in the mail chain, but still not clear.
>>>
>>> As shown in the screenshot attached, I creted the xsl file inside
>>> registry folder that gets created when we create "ESB Solution project".
>>>
>>> Please let me know , how to correct it( if wrong ). Please consider I am
>>> very new to wso2.
>>>
>>> With Regards,
>>> Aditya
>>>
>>>
>>>
>>> On Mon, Nov 20, 2017 at 10:16 PM, Vijitha Ekanayake <[email protected]>
>>> wrote:
>>>
>>>> Hi Aditya,
>>>>
>>>> It seems that the reason for xsl file not picking up from the registry
>>>> is, you are not referring the registry entry in the correct way inside XSLT
>>>> mediator configurations. You need to point the relevant registry entry with
>>>> XSLT mediator as below.
>>>>
>>>> <xslt key="conf:/calTest.xsl"/>
>>>>
>>>>
>>>> Also make sure to provide correct registry (whether config or govanance
>>>> registry) as key to XSLT mediator.
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> On Mon, Nov 20, 2017 at 9:55 PM, 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Vijitha Ekanayake
>>>> Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/
>>>> Mobile : +94 777 24 73 39 | +94 718 74 44 08
>>>> lean.enterprise.middleware
>>>>
>>>
>>>
>>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev