我已经构建了一个API,可以将消息发送到多个REST API。为了进行测试,我使用SOAP Ui模拟了三个REST API。 但是,我无法使用CLONE介体中的终结点发送JSON消息。 这是REST API配置的一部分:
<clone id="GetOpenTasksReq">
<target>
<sequence>
<log level="full"/>
</sequence>
<endpoint key="OpenTask1EP"/>
</target>
<target>
<sequence>
<log level="full"/>
</sequence>
<endpoint key="OpenTask2EP"/>
</target>
</clone>
这是端点的(OpenTask1EP)配置之一:
<endpoint name="OpenTask1EP" xmlns="http://ws.apache.org/ns/synapse">
<http method="GET" trace="enable" uri-template="http://localhost:6060/admin-service/api/getuserlists">
<timeout>
<duration>5000</duration>
<responseAction>fault</responseAction>
</timeout>
</http>
我已在ESB中启用了启用连线日志。在WSO2 ESB控制台中,我所看到的只是通过有线方式到达ESB的消息,这是我使用JMeter向ESB发射的消息。在SOAP Ui模拟服务上,我看不到传入请求的任何迹象,消息日志为空。 好心提醒。如果您需要更多信息,请告诉我。预先感谢。
答案 0 :(得分:1)
可以请您试试吗?
<clone continueParent="true" sequential="true">
<target endpoint="EP1">
<sequence>
<log level="full"/>
</sequence>
</target>
<target endpoint="EP2">
<sequence>
<log level="full"/>
</sequence>
</target>
</clone>
您可以使用端点名称代替EP1和EP2