WSO2 API Manager - 它可以在后端将 REST 请求转换为 SOAP 请求吗? [英] WSO2 API Manager - can it convert REST requests to SOAP requests on the backend?

查看:22
本文介绍了WSO2 API Manager - 它可以在后端将 REST 请求转换为 SOAP 请求吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在探索如何将 WSO2 API 管理器用于我们目前基于 SOAP 的遗留 API.理想情况下,我想向我们的客户公开一个 RESTful 接口,并让 API Manager 将其转换为传递给我们遗留系统的 SOAP 请求.搜索 WSO2 站点,我发现有一些使用 XSLT 转换的方法可以做到这一点,但仅限于使用 WSO2 ESB 产品时.

I'm exploring the use of the WSO2 API Manager for our legacy API, which is currently SOAP based. IDeally, I'd like to expose a RESTful interface to our customers and have API Manager convert that to a SOAP request that gets passed to our legacy system. Searching the WSO2 site, I see there's some way to do this using XSLT transformations, but only when using the WSo2 ESB product.

有没有办法在 API 管理器中处理这种转换?如何?如果没有,我能否以某种方式利用 ESB 产品并将其与 API Manager 产品结合使用?还是那是矫枉过正?

Is there a way to handle this transformation in the API Manager? How? If not, could I somehow take advantage of the ESB product and combine it with the API Manager product? Or is that overkill?

谢谢!

推荐答案

REST 到 SOAP 的转换是 WSO2 ESB 的一个突出特性.要了解有关它的更多信息,请查看 [1] 中给出的示例.本示例中使用的有效负载工厂中介器是一种比 XSLT 中介器更新的中介器类型,并且在处理 SOAP 消息方面也比 XSLT 中介器更有效.

REST to SOAP conversion is a standout feature of the WSO2 ESB. To learn more about it look at the sample given at [1]. The Payload Factory Mediator used in this sample is a much newer type of mediator than the XSLT Mediator and is also more efficient in handling SOAP messages than XSLT Mediator.

WSO2 API Manager 是一个用于发布、管理和管理 API 的平台.WSO2 API 管理器是使用组件化的 Carbon 框架构建的,WSO2 ESB 的几乎所有组件都用于该框架.因此,从技术上讲,WSO2 ESB 可以完成的所有工作都可以由 WSO2 API 管理器完成;但是没有在 WSO2 ESB 中找到的 GUI 的帮助;您将不得不使用基于 xml 的配置的源视图.但是当然要绕过这个障碍,您可以随时下载 WSO2 ESB 产品(也是免费和开源的)并使用 GUI 创建所有必要的中介序列并将配置从 WSO2 ESB 复制粘贴到 WSO2API 管理器,大功告成.

The WSO2 API Manager is a platform for publishing, managing and governing APIs. The WSO2 API Manager is built using the componentalized Carbon framework, for which almost all components of the WSO2 ESB are utilized. Therefore technically all that can be done with the WSO2 ESB can be done by the WSO2 API Manager; however without the help of the GUI found in the WSO2 ESB; you will have to use the source view of the configuration which is xml based. But ofcourse to navigate around this obstacle you can always download the WSO2 ESB product (which is also free and open-source) and create all the necessary mediation sequences using the GUI and copy-n-paste the configuration from the WSO2 ESB to the WSO2 API Manager and you are done.

在我看来,您需要的是 WSO2 ESB.在您的情况下,我假设您只有一个或几个 SOAP API,您需要将其作为 REST API 公开;您正在更多地关注 REST-SOAP 转换功能,而不是管理数百个 API 的能力.如果您不需要 API Manager 的核心功能,例如发布 API、版本控制、验证消费者、基于策略的节流和监控 API 使用(有关功能的完整列表,请查看产品主页 [2]),然后你真的不想要 API 管理器.但是,如果您有 API 管理要求,则可以使用 WSO2 API Manager.我认为您不应该仅仅因为您预见到某种 API 管理要求即将到来而使用 WSO2 API 管理器.

In my opinion it is the WSO2 ESB that you need. In your case I presume you just have one or a few SOAP APIs which you need to expose as REST APIs; you are looking more at the REST-SOAP conversion feature rather than the ability to manage hundreds of APIs. If you do not need the core functionalities of the API Manager such as publishing APIs, versioning, authenticating consumers, throttling based on policies, and monitoring API usage (for a complete list of features look at the product homepage at [2]), then you really do not want the API Manager. But if you have the API Management requirements you can go with WSO2 API Manager. I don't think you should go with the WSO2 API Manager just because you foresee some kind of API Management requirements coming ahead.

同时使用 WSO2 API 管理器前端的 WSO2 ESB 也是一种解决方案.如果您在中介层执行重中介,WSO2 甚至推荐这种架构.您甚至可以从 WSO2 ESB 单独开始,然后当适当的需求出现时,决定使用 WSO2 API 管理器来处理它.使用 WSO2 API 管理器将 WSO2 ESB 置于前端是轻而易举的.

Using both the WSO2 ESB fronted by the WSO2 API Manager is also a solution. WSO2 even recommends this architecture if you are performing heavy mediation in the mediation layer. You can even start with the WSO2 ESB alone and later when the proper requirements come, decide to front it with the WSO2 API Manager. Fronting the WSO2 ESB with the WSO2 API Manager is a breeze.

[1] http://docs.wso2.org/wiki/display/ESB403/Sample+800+Introduction+to+REST+API

[2] http://wso2.com/products/api-manager/

这篇关于WSO2 API Manager - 它可以在后端将 REST 请求转换为 SOAP 请求吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆