如何使用 WSO2 ESB/EI 从 HTTP(RESTful)切换到 TCP 套接字 [英] How switching from HTTP(RESTful) to TCP socket with WSO2 ESB/EI

查看:23
本文介绍了如何使用 WSO2 ESB/EI 从 HTTP(RESTful)切换到 TCP 套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务 A,它是一个 RESTful 客户端,可以定期发送请求,另一个服务 B,它是一个 TCP 套接字服务器,可以接收 tcp 套接字消息.所以,我的问题是是否有解决方案可以将消息从 A 传输到 B,即使用 WSO2 ESB/EI 将消息从 http 切换到 tcp 套接字.实际上,我找到了一个关于如何从 TCP 切换到 HTTP/S 但不是从 http 到 tcp.

I've got a service A which is a RESTful client and can send requests periodically, and another service B which is a TCP socket server and can receive tcp socket message. So, my question is whether there's solution to transfer the message from A to B, viz, switching message from http to tcp socket with WSO2 ESB/EI. Actually, I found a guide about how switching from TCP to HTTP/S but not from http to tcp.

推荐答案

以下代理将起作用,前提是 tcp 发送方按照指定的轴配置进行配置 此处

The following proxy will work, provided the tcp sender is configured in axis configuration as specified here

<proxy name="TestProxy" transports="http">
        <target>
            <endpoint>
                <address uri="tcp://localhost:6060/TestService"/>
            </endpoint>
            <inSequence>
                <log level="full"/>
                <property name="OUT_ONLY" value="true"/>
            </inSequence>
        </target>
    </proxy>

这篇关于如何使用 WSO2 ESB/EI 从 HTTP(RESTful)切换到 TCP 套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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