You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Asanka Dissanayake <as...@gmail.com> on 2017/10/05 01:14:46 UTC

[Feature] VelocityTemplateMediator

Hi Devs,

I've been using Synapse to develop an API Platform for a company. Message
transformation was a key part of it. We were mainly using Payload Factory .
It is ideal for 1:1 message transformation. But for arrays and conditional
transformation we had to develop a DSL.
I know XSLT mediator was an option, but we were not allowed to use xslt for
development. Now don't ask me why :).

I developed a mediator using Velocity Template Engine. It addresses all the
limitations in payload factory. Very detailed document with examples can be
found at

https://github.com/asanka88/apache-synapse/blob/master/README.md

I ported it to latest synapse version and source can be found

https://github.com/asanka88/apache-synapse

Please have look , would love to contribute this to synapse if you guys
think this is good.


Thanks,
Asanka

Re: [Feature] VelocityTemplateMediator

Posted by Vanjikumaran Sivajothy <va...@gmail.com>.
I tried to build your code and it is failing,

Can you please send us the diff?

On Sat, Oct 14, 2017 at 9:32 AM, Vanjikumaran Sivajothy <
vanjikumaran@gmail.com> wrote:

> Pretty good work Indeed. I agree that this will help to overcome the
> limitation of payload mediator and any other transformation mediators.
>
> I would suggest as dushan to do a comprehensive performance comparation
> that allows on going users to convince the adoption of this new feature :)
>
> However, we should not wait until that but to adopt this sooner and do the
> extensive testing.
>
> Synapse still following the old school model with JIRA and svn, Hence
> please create JIRA and attached the patch.(I see you have forked and
> implemented in GitHub)
>
>
>
>
> On Thu, Oct 12, 2017 at 9:42 AM Dushan Abeyruwan <du...@wso2.com> wrote:
>
>> Hi Asanka,
>>   It looks to be nice work. Do you have any performance numbers with the
>> current feature?
>>
>> Cheers,
>> Dushan
>>
>> On Wed, Oct 4, 2017 at 6:14 PM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I've been using Synapse to develop an API Platform for a company.
>>> Message transformation was a key part of it. We were mainly using Payload
>>> Factory . It is ideal for 1:1 message transformation. But for arrays and
>>> conditional transformation we had to develop a DSL.
>>> I know XSLT mediator was an option, but we were not allowed to use xslt
>>> for development. Now don't ask me why :).
>>>
>>> I developed a mediator using Velocity Template Engine. It addresses all
>>> the limitations in payload factory. Very detailed document with examples
>>> can be found at
>>>
>>> https://github.com/asanka88/apache-synapse/blob/master/README.md
>>>
>>> I ported it to latest synapse version and source can be found
>>>
>>> https://github.com/asanka88/apache-synapse
>>>
>>> Please have look , would love to contribute this to synapse if you guys
>>> think this is good.
>>>
>>>
>>> Thanks,
>>> Asanka
>>>
>>>
>>
>>
>> --
>> Dushan Abeyruwan | Senior Technical Lead
>> Technical Support,MV
>> PMC Member Apache Synpase
>> WSO2 Inc. http://wso2.com/
>> Blog:*http://www.dushantech.com/ <http://www.dushantech.com/>*
>> LinkedIn:*https://www.linkedin.com/in/dushanabeyruwan
>> <https://www.linkedin.com/in/dushanabeyruwan>*
>> Mobile:(001)408-791-9312 <+1%20408-791-9312>
>>
>> --
> Sent from Gmail Mobile
>



-- 
Best Regards,
Vanji

Re: [Feature] VelocityTemplateMediator

Posted by Vanjikumaran Sivajothy <va...@gmail.com>.
Pretty good work Indeed. I agree that this will help to overcome the
limitation of payload mediator and any other transformation mediators.

I would suggest as dushan to do a comprehensive performance comparation
that allows on going users to convince the adoption of this new feature :)

However, we should not wait until that but to adopt this sooner and do the
extensive testing.

Synapse still following the old school model with JIRA and svn, Hence
please create JIRA and attached the patch.(I see you have forked and
implemented in GitHub)




On Thu, Oct 12, 2017 at 9:42 AM Dushan Abeyruwan <du...@wso2.com> wrote:

> Hi Asanka,
>   It looks to be nice work. Do you have any performance numbers with the
> current feature?
>
> Cheers,
> Dushan
>
> On Wed, Oct 4, 2017 at 6:14 PM, Asanka Dissanayake <as...@gmail.com>
> wrote:
>
>> Hi Devs,
>>
>> I've been using Synapse to develop an API Platform for a company. Message
>> transformation was a key part of it. We were mainly using Payload Factory .
>> It is ideal for 1:1 message transformation. But for arrays and conditional
>> transformation we had to develop a DSL.
>> I know XSLT mediator was an option, but we were not allowed to use xslt
>> for development. Now don't ask me why :).
>>
>> I developed a mediator using Velocity Template Engine. It addresses all
>> the limitations in payload factory. Very detailed document with examples
>> can be found at
>>
>> https://github.com/asanka88/apache-synapse/blob/master/README.md
>>
>> I ported it to latest synapse version and source can be found
>>
>> https://github.com/asanka88/apache-synapse
>>
>> Please have look , would love to contribute this to synapse if you guys
>> think this is good.
>>
>>
>> Thanks,
>> Asanka
>>
>>
>
>
> --
> Dushan Abeyruwan | Senior Technical Lead
> Technical Support,MV
> PMC Member Apache Synpase
> WSO2 Inc. http://wso2.com/
> Blog:*http://www.dushantech.com/ <http://www.dushantech.com/>*
> LinkedIn:*https://www.linkedin.com/in/dushanabeyruwan
> <https://www.linkedin.com/in/dushanabeyruwan>*
> Mobile:(001)408-791-9312
>
> --
Sent from Gmail Mobile

Re: [Feature] VelocityTemplateMediator

Posted by Dushan Abeyruwan <du...@wso2.com>.
Hi Asanka,
  It looks to be nice work. Do you have any performance numbers with the
current feature?

Cheers,
Dushan

On Wed, Oct 4, 2017 at 6:14 PM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi Devs,
>
> I've been using Synapse to develop an API Platform for a company. Message
> transformation was a key part of it. We were mainly using Payload Factory .
> It is ideal for 1:1 message transformation. But for arrays and conditional
> transformation we had to develop a DSL.
> I know XSLT mediator was an option, but we were not allowed to use xslt
> for development. Now don't ask me why :).
>
> I developed a mediator using Velocity Template Engine. It addresses all
> the limitations in payload factory. Very detailed document with examples
> can be found at
>
> https://github.com/asanka88/apache-synapse/blob/master/README.md
>
> I ported it to latest synapse version and source can be found
>
> https://github.com/asanka88/apache-synapse
>
> Please have look , would love to contribute this to synapse if you guys
> think this is good.
>
>
> Thanks,
> Asanka
>
>


-- 
Dushan Abeyruwan | Senior Technical Lead
Technical Support,MV
PMC Member Apache Synpase
WSO2 Inc. http://wso2.com/
Blog:*http://www.dushantech.com/ <http://www.dushantech.com/>*
LinkedIn:*https://www.linkedin.com/in/dushanabeyruwan
<https://www.linkedin.com/in/dushanabeyruwan>*
Mobile:(001)408-791-9312