POST 请求后 WSO2 ESB 无响应
WSO2 ESB No Response after POST request
我正在使用 WSO2 ESB 向我的 Rest API 发送一个 POST 请求。
实际上,API return 是一个带有一些数据的 201 状态。
使用 POSTMAN 的 API 本身工作完美,但 202 接受的响应是 return 使用 ESB link
这是我的实现:
POST API Link:
http://mysite/sites/4/floors/4/pois/12/prelock
我的 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"/>
问题似乎出在 http 方法上。你能用这个试试吗
<endpoint name="NodeRedPrelock" xmlns="http://ws.apache.org/ns/synapse">
<http trace="disable" uri-template="http://169.46.25.33:1880/sites/{uri.var.siteId}/floors/{uri.var.floorId}/pois/{uri.var.poiId}/prelock"/>
</endpoint>
你在Carbon界面检查你的序列吗?
有时,当您将汽车部署到 esb carbon 时,会从 "send" 标签中删除端点。
或者它似乎是端点中的问题。您可以尝试在界面中重新保存端点。有时我在部署汽车文件后遇到问题,端点无法正常工作,直到手动保存。
我正在使用 WSO2 ESB 向我的 Rest API 发送一个 POST 请求。 实际上,API return 是一个带有一些数据的 201 状态。 使用 POSTMAN 的 API 本身工作完美,但 202 接受的响应是 return 使用 ESB link 这是我的实现: POST API Link: http://mysite/sites/4/floors/4/pois/12/prelock
我的 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"/>
问题似乎出在 http 方法上。你能用这个试试吗
<endpoint name="NodeRedPrelock" xmlns="http://ws.apache.org/ns/synapse">
<http trace="disable" uri-template="http://169.46.25.33:1880/sites/{uri.var.siteId}/floors/{uri.var.floorId}/pois/{uri.var.poiId}/prelock"/>
</endpoint>
你在Carbon界面检查你的序列吗?
有时,当您将汽车部署到 esb carbon 时,会从 "send" 标签中删除端点。
或者它似乎是端点中的问题。您可以尝试在界面中重新保存端点。有时我在部署汽车文件后遇到问题,端点无法正常工作,直到手动保存。