放置请求未到达后端API

时间:2019-11-04 17:06:27

标签: wso2 wso2esb wso2ei

我正在尝试向我的后端api发送一个放置请求,但是我需要一个令牌及其在get请求上的工作,因此问题不在于令牌,但是当我发出请求时,响应被202接受并且不要更新数据库。

这是代码

    <resource methods="PUT" uri-template="/Nurse">
    <inSequence>
        <enrich>
            <source clone="true" type="body"/>
            <target property="payload" type="property"/>
        </enrich>
        <property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
        <call blocking="true" description="">
            <endpoint>
                <address format="get" uri="http://192.168.20.1:8280/loginAPI/login"/>
            </endpoint>
        </call>
        <property expression="json-eval($.accessToken)" name="token" scope="default" type="STRING"/>
        <property expression="fn:concat('Bearer ',$ctx:token)" name="Authorization" scope="transport" type="STRING"/>
        <enrich description="Restore original payload">
            <source property="payload" type="property"/>
            <target type="body"/>
        </enrich>
        <send>
            <endpoint key="PutNurseEp"/>
        </send>
    </inSequence>
    <outSequence>
        <send/>
    </outSequence>
    <faultSequence/>
</resource>

任何人都可以帮助解决这里的问题吗?

1 个答案:

答案 0 :(得分:0)

解决了这个问题,该错误是邮递员的要求,我在网址的开头添加了一个空格