problems with mina / netty tcp endpoint in camel (tcp socket server endpoint)

1.2k views Asked by At

i want to connect a soap webservice to a tcp enpoint. The tcp endpoint has to be a tcp socket server that accepts clients.

now i have for example this route

<from uri="cxf:bean:myendpoint" />

<to uri="netty:tcp://localhost:port" />

this doesnt work because what i have found out

<from uri="netty:tcp://localhost:port" /> this configures it as server socket where clients can connect

<to uri="netty:tcp://localhost:port" /> this configures it as client that can connect to a server socket

is there any way to configure netty/mina etc as a server socket and not a client with the <to /> tag?

or might anyone have an idea for a workaround for this?

someone else already had a similar problem according to this https://issues.apache.org/jira/browse/CAMEL-1077 "tcp client mode / server mode determined by "to" or "from" elements limits usability." But i dont think anything has happened since then.

1

There are 1 answers

5
Willem Jiang On

It looks like you just want to send the response from the soap service to tcp server. You can setup the route like this

from("direct:start").to("cxf:xxx").to("netty:xxx");