On Thu, Dec 29, 2011 at 11:33 AM, Amila Suriarachchi <[email protected]> wrote:

> hi,
>
> Lets say I have an xml message like this in an ESB sequence.
>
> <ns1:AddOrder>
>                 <ns1:orderID>001</ns1:orderID>
>                 <ns1:customerID>001</ns1:customerID>
>                 <ns1:date>2011-12-26T18:28:48.214+05:30</ns1:date>
>                 <ns1:price>456.76</ns1:price>
>             </ns1:AddOrder>
>
> Then I can use dblookup mediator to get email and name for a customer
> using customerID.
> How can I enrich those details to the xml payload using Enrich mediator?
> Assume after dblook up mediator
> email and name are in synapse properties as strings.
>
> out put would be like this.
>
> <ns1:AddOrder>
>                 <ns1:orderID>001</ns1:orderID>
>                 <ns1:customerID>001</ns1:customerID>
>                 <ns1:date>2011-12-26T18:28:48.214+05:30</ns1:date>
>                 <ns1:price>456.76</ns1:price>
>                 <ns1:email>mailto:[email protected]</ns1:email>
>                 <ns1:name>amila</ns1:name>
>             </ns1:AddOrder>
>
> After this I want to send this message to the mail endpoint. if the data
> base only has [email protected] how to concatenate the 'mailto:'
> part to that before setting the To header using header mediator?
>

this can be done with the following configuration.

<header name="To" expression="fn:concat('mailto:', get-property('email'))"/>

thanks,
Amila.

>
> thanks,
> Amila.
>
> --
> *Amila Suriarachchi*
>
> Software Architect
> WSO2 Inc. ; http://wso2.com
> lean . enterprise . middleware
>
> phone : +94 71 3082805
>
>


-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to