[英]Cannot Read JSON request body parameters in wso2 ESB as an api
我已經在WSO2 ESB(4.8.1)中創建了一個API,我想使用請求正文將PUT請求發送到該API。 我已經嘗試過該示例,並且想以已定義API的順序記錄屬性值。
這是我的請求正文:
這是我嘗試記錄位置名稱的方式:
但我收到這樣的錯誤:
(錯誤-SynapseJsonPath #stringValueOf。評估JSON路徑時出錯。返回空結果。錯誤>>>無效路徑)
那么我該如何讀取這些值?
If you want to get single variable from user in json request you can use this code
Use This json:
{
"namee":"UsmanYaqooooooooooob"
}
Api Code:
<api xmlns="http://ws.apache.org/ns/synapse" name="Hello" context="/hello">
<resource methods="POST" uri-template="/post">
<inSequence>
<log level="custom">
<property name="===========inSequence" value="****"></property>
<property name="locationsssssssss" expression="json-eval(.namee)"></property>
</log>
<payloadFactory media-type="json">
<format>{"hello":"world"}</format>
<args></args>
</payloadFactory>
<property name="messageType" value="text/xml"></property>
<respond></respond>
</inSequence>
</resource>
</api>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.