Cannot Read JSON request body parameters in wso2 ESB as an api -


i have created api in wso2 esb (4.8.1) , wanted send put request api request body. have tried sample , wanted log property values in insequence of defined api.

this request body:

request body (json)

this way how tried log location name:

xml log

but i’m getting error this:

(error - synapsejsonpath #stringvalueof. error evaluating json path . returning empty result. error>>> invalid path)

error screenshot

so how can read these values?

to achieve requirement, should send "content-type" http header request below,

    "content-type : application/json" 

enter image description here

then can log specific json element below.

 <log>     <property name="location" expression="json-eval($.coordinates.location[0].name)"></property>  </log> 

then can see following log,

enter image description here

thanks.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -