https://wso2.org/jira/browse/ML-16

On Wed, May 6, 2015 at 2:34 PM, Srinath Perera <[email protected]> wrote:

> Thanks Maheeka.
>
> Kasun +1, but remove other attributes from docs at the point. Shall we
> create a Jira?
>
> On Wed, May 6, 2015 at 12:34 AM, Kasun Indrasiri <[email protected]> wrote:
>
>> Hi Srinath,
>>
>> Regarding enrich mediator, I think we can get rid of most of the
>> redundant attributes and support them through xpath only. For instance most
>> of the operations that you do with enrich can be done using xpath attribute
>> in both source and target. So, we will fully verify and fix these use cases
>> while keeping support for existing syntax for backward compatibility.
>>
>>     <!--payload to property -->
>>     <enrich>
>>         <source xpath="//m0:getQuote/m0:request/m0:symbol/text()"
>>                 xmlns:m0="http://services.samples"/>
>>         <target xpath="$ctx:PropName"/>
>>     </enrich>
>>
>>
>>     <!-- property to payload -->
>>     <enrich>
>>         <source xpath="$ctx:PropName"
>>                 xmlns:m0="http://services.samples"/>
>>         <target xpath="//m0:Foo/"/>
>>     </enrich>
>>
>>
>>
>> On Wed, May 6, 2015 at 9:46 AM, Srinath Perera <[email protected]> wrote:
>>
>>> Hi Kasun,
>>>
>>> I have been working on ESB script last week, and two comments.
>>>
>>> 1. If we use payload factory mediator, and if Xpath matches more than
>>> one results, what do we do? It is a valid usecase if someone want to copy N
>>> elements from request to response via payload factory.
>>>
>>> 2. Enrich has too many parameters, and some combinations does not work.
>>> ( see below).
>>>
>>> <enrich>
>>>     <source [clone=true|false]
>>> [type=custom|envelope|body|property|inline] xpath="" property="" />
>>>     <target [action=replace|child|sibiling]
>>> [type=custom|envelope|body|property|inline] xpath="" property="" />
>>> </enrich>
>>>
>>> I think we can remove "type" and "property" and support both via Xpath
>>> only. We can break Xpath to <source>/foo/bar where source can be $envelope,
>>> $body $header $getProperty("bar") etc ( $envelope etc is already there).
>>>
>>> If we do this correct, we can refer to anything in ESB environment via
>>> Xpath of the format <source>/foo/bar. Then we can make this consistent
>>> across the language.
>>>
>>> WDYT?
>>>
>>> --Srinath
>>>
>>> --
>>> ============================
>>> Blog: http://srinathsview.blogspot.com twitter:@srinath_perera
>>> Site: http://people.apache.org/~hemapani/
>>> Photos: http://www.flickr.com/photos/hemapani/
>>> Phone: 0772360902
>>>
>>
>>
>>
>> --
>> Kasun Indrasiri
>> Software Architect
>> WSO2, Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> cell: +94 77 556 5206
>> Blog : http://kasunpanorama.blogspot.com/
>>
>
>
>
> --
> ============================
> Srinath Perera, Ph.D.
>    http://people.apache.org/~hemapani/
>    http://srinathsview.blogspot.com/
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
============================
Blog: http://srinathsview.blogspot.com twitter:@srinath_perera
Site: http://people.apache.org/~hemapani/
Photos: http://www.flickr.com/photos/hemapani/
Phone: 0772360902
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to