Re: [Dev] [ESB 4.8.1] Setting empty JSON array from XSLT mediator
Hi Senduran, Already tried. Nothing comes out of XSLT with that(even in XML format). Thanks. On Wed, Mar 14, 2018 at 9:55 PM, Senduranwrote: > Hi Lahiru, > > Can you try the following in your XSLT > > > tokens > > > Regards > Senduran > > On Thu, Mar 15, 2018 at 3:40 AM, Lahiru Sandaruwan > wrote: > >> Devs, >> >> I'm trying $subject using ESB 4.8.1 and I can only set the payload from >> XSLT. Let me explain an example below. >> >> I'm expecting the JSON result as, >> *{* >> * "name": "lahiru",* >> * "tokens": []* >> *}* >> >> Tried setting following from XSLT, >> *...* >> >> ** >> ** >> ** >> *...* >> >> It outputs XML, >> >> ** >> >> *lahiru* >> >> ** >> ** >> >> ** >> >> And it is converted to following which is not the disired, >> *{* >> * "name": "lahiru",* >> * "tokens": [* >> >> *""* >> >> *]* >> >> *}* >> >> If I could set XML node as ** from XSLT, it would >> work. But it seems there is no way to set such node. >> >> Any idea on how I can get this done? >> >> Thanks. >> >> -- >> -- >> >> Lahiru Sandaruwan >> WSO2 Inc., http://wso2.com >> >> lean.enterprise.middleware >> >> m: +1 901 530 2379 <+1%20901-530-2379> >> e: lahi...@wso2.com b: https://medium.com/@lahirugmg >> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- -- Lahiru Sandaruwan WSO2 Inc., http://wso2.com lean.enterprise.middleware m: +1 901 530 2379 e: lahi...@wso2.com b: https://medium.com/@lahirugmg in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [ESB 4.8.1] Setting empty JSON array from XSLT mediator
Hi Lahiru, Can you try the following in your XSLT tokens Regards Senduran On Thu, Mar 15, 2018 at 3:40 AM, Lahiru Sandaruwanwrote: > Devs, > > I'm trying $subject using ESB 4.8.1 and I can only set the payload from > XSLT. Let me explain an example below. > > I'm expecting the JSON result as, > *{* > * "name": "lahiru",* > * "tokens": []* > *}* > > Tried setting following from XSLT, > *...* > > ** > ** > ** > *...* > > It outputs XML, > > ** > > *lahiru* > > ** > ** > > ** > > And it is converted to following which is not the disired, > *{* > * "name": "lahiru",* > * "tokens": [* > > *""* > > *]* > > *}* > > If I could set XML node as ** from XSLT, it would > work. But it seems there is no way to set such node. > > Any idea on how I can get this done? > > Thanks. > > -- > -- > > Lahiru Sandaruwan > WSO2 Inc., http://wso2.com > > lean.enterprise.middleware > > m: +1 901 530 2379 <+1%20901-530-2379> > e: lahi...@wso2.com b: https://medium.com/@lahirugmg > in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [ESB 4.8.1] Setting empty JSON array from XSLT mediator
Devs, I'm trying $subject using ESB 4.8.1 and I can only set the payload from XSLT. Let me explain an example below. I'm expecting the JSON result as, *{* * "name": "lahiru",* * "tokens": []* *}* Tried setting following from XSLT, *...* ** ** ** *...* It outputs XML, ** *lahiru* ** ** ** And it is converted to following which is not the disired, *{* * "name": "lahiru",* * "tokens": [* *""* *]* *}* If I could set XML node as ** from XSLT, it would work. But it seems there is no way to set such node. Any idea on how I can get this done? Thanks. -- -- Lahiru Sandaruwan WSO2 Inc., http://wso2.com lean.enterprise.middleware m: +1 901 530 2379 e: lahi...@wso2.com b: https://medium.com/@lahirugmg in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev