我正在使用WSO2 ESB向我的Rest API發送POST請求。實際上,API會返回一個包含一些數據的201狀態。 使用郵差本身的API完美的作品,但202接受響應是使用ESB鏈接 這裏是我實現返回: 的POST API鏈接: http://mysite/sites/4/floors/4/pois/12/prelockWSO2 ESB POST請求後沒有響應
我ESB API:
<resource methods="POST" uri-template="/sites/{siteId}/floors/{floorId}/pois/{poiId}/prelock">
<inSequence>
<log level="full"/>
<header name="Content-Type" scope="transport" value="application/json"/>
<property expression="$axis2:HTTP_SC" name="Status" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<send>
<endpoint key="NodeRedPrelock"/>
</send>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
<faultSequence/>
</resource>
端點:
<endpoint name="NodeRedPrelock" xmlns="http://ws.apache.org/ns/synapse">
<http method="post" uri-template="http://mysite/sites/{uri.var.siteId}/floors/{uri.var.floorId}/pois/{uri.var.poiId}/prelock"/>
實際上,這是問題所在,我在圖形界面上進行了修改,但XML文件沒有更改,因此當我嘗試Basanagouda先生的解決方案時,它無效:D感謝您的幫助 –