WSO2 EI,自定义 API 未发送响应

WSO2 EI, custom API not sending response

我创建了两个这样的序列:

<sequence name="test_seq_in">
    <in>
        <payloadFactory media-type="json">
            <format>{"hello": "world"}</format>
            <args/>
        </payloadFactory>
    </in>
    <out>
        <send/>
    </out>
</sequence>

第二个序列是这样的:

<sequence name="test_seq_out">
    <out>
        <send/>
    </out>
</sequence>

然后我创建了 API 这样的:

<api context="/test" name="test">
    <resource inSequence="test_seq_in" methods="GET" outSequence="test_seq_out"/>
</api>

我的 WSO2 EI 创建了调用 url http://192.168.56.1:8280/test。当我向这个地址发出 GET 请求时,它 returns 对我来说什么都没有。

我只想在 http://192.168.56.1:8280/test 地址发出 GEt 请求时显示 {"hello": "world"} json。

为什么会这样?

尝试在序列中使用 'respond' 而不是 'send',因为这就是您想要做的。

<sequence name="test_seq_in">
        <payloadFactory media-type="json">
            <format>{"hello": "world"}</format>
            <args/>
        </payloadFactory>
        <respond/>
</sequence>