Hi Aditya, We tested your scenario and observed that the log and the payload factory are missing the "value" part. Can you please report an issue on this[1]. Please make sure to indicate the complete steps to reproduce by including the synapse configurations. Can you also check if the issue occurs in the latest milestone release[2] also before reporting the issue?
[1] https://github.com/wso2/product-ei/issues [2] https://github.com/wso2/product-ei/releases Thanks, Riyafa On Fri, Jan 19, 2018 at 9:35 AM, Senduran Balasubramaniyam < sendu...@wso2.com> wrote: > Hi Aditya, > > //jsonObject is an XPATH expression. When you apply an XPATH evaluation on > a JSON, ESB / EI internally convert the JSON to XML, that's why you are > seeing XML for //jsonObject xpath evaluation. > Since you are sending a JSON payload it is good to use $ (which is a JSON > path) > > Regards > Senduran > > On Fri, Jan 19, 2018 at 3:28 AM, aditya shivankar < > shivankar.adit...@gmail.com> wrote: > >> Respected Sir, >> >> //jsonOject and $ are printing different jsons at same location in API. >> >> Are not both suppose to have latest json payload, >> >> //jsonObject - latest json payload in xml format >> >> $ - latest json payload in json format ? >> >> Input json: >> >> { >> "token": "d8ccf265-6651-468f-8d1f-d935c3c7d857", >> "partyId": "2920394" >> >> >> } >> >> Log print of //jsonObject after enrichment: >> >> <jsonObject> >> <a>d8ccf265-6651-468f-8d1f-d935c3c7d857</a> >> <b>57</b> >> <Value>PartyId</Value> >> </jsonObject> >> >> Log print of json-eval($) at same place after enrichment : Value tag >> missing >> >> { >> "a": "d8ccf265-6651-468f-8d1f-d935c3c7d857", >> "b": "57" >> >> } >> >> >> Please find attached Rest api "sample.xml" >> >> >> I am facing this issue , when I have to assign current json payload, to >> one element of new json I created in payload factory. >> >> Inside payloadFactory I defined something like this: >> { >> "a" : $1 , >> "b":"thampi" >> } >> >> In args, >> >> Type :Expression , Value:$ , evaluator: json >> >> But it is assigning the payload which was present before enrichment.which >> is wrong . >> >> Please guide. >> >> >> >> . >> >> [image: Inline image 2] >> >> >> Thanks, >> Aditya >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Senduran * > Senior Software Engineer, > WSO2, Inc.; http://wso2.com/ <http://wso2.com/> > Mobile: +94 77 952 6548 <+94%2077%20952%206548> > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Riyafa Abdul Hameed Software Engineer, WSO2 Lanka (Pvt) Ltd <http://wso2.com/> Email: riy...@wso2.com <riyafa...@cse.mrt.ac.lk> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> <http://twitter.com/Riyafa1>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev