问题
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