How switching from HTTP(RESTful) to TCP socket with WSO2 ESB/EI

。_饼干妹妹 提交于 2019-12-24 10:59:09

问题


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.


回答1:


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>


来源:https://stackoverflow.com/questions/46312534/how-switching-from-httprestful-to-tcp-socket-with-wso2-esb-ei

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!