我正在使用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感谢您的帮助 –