wso2 中 DELETE 方法的调解序列不起作用

Mediation sequence for DELETE method in wso2 not working

我有一个用于删除操作的 SOAP Web 服务,端点为 URL

http://some-ip-address:my-port/bank/websrv/delcus

并且只能通过POST方法调用。

我已发布此 API 并添加 DELETE 资源以调用此服务。

所以 URL 变成

https://my-apim-endpoint/public/customer/{customer-id}

并且我为 DELETE 操作添加了调解序列。因此,每当调用此 API 时,它将通过中介序列并向端点

发送 POST 请求
http://some-ip-address:my-port/bank/websrv/delcus

但是当我调用 API 时,端点 URL 被替换为以下 URL。

这是发送中介的样子,

<send>
  <endpoint>
    <http method="post" uri-template="http://some-ip-address:my-port/bank/websrv/delcus"/>
  </endpoint>
</send>
http://some-ip-address:my-port/bank/websrv/100000023

而不是

http://some-ip-address:my-port/bank/websrv/delcus

并给我错误响应。请问有人可以帮忙吗?

当您使用 http 类型端点时,资源路径会附加到端点 url。例如,假设您有一个 http://test.com/path and if you have defined a /resource/{id} resource, then the request will be sent to http://test.com/path/resource/{id} 类型的端点 url。这是默认行为。

要调用 SOAP 服务而不是使用 http 类型端点,您可以使用地址端点类型。当您创建具有地址类型的端点时,您可以定义它是 soap11 还是 soap12。 (工具选项卡中高级​​选项部分的格式选项)。这将向 http://test.com/path 发送一个 soap 负载。 (您不必构建 soap headers 等,只需构建消息 body)。