I am new to Camel, and the target is to connect external WebSocket Server
with JSON RPC2 enabled.
And I had tried all three websocket compoments without succeed.
1. Websocket / camel-websocket
This compoment can only be used as a server as I noticed after many
tries.
2. AHC-WS / camel-ahc-ws
This compoment can send websocket request but it the response is not
retrieved and message already returned since it's a async call. But if I
wrote two .to("ahc-ws:host/msg") calls in one route, the first correct
server response will return.
3. Atmosphere-Websocket / camel-atmosphere-websocket
This compoment throws null reference exception after specify the
CONNECTION_KEY in header by
.setHeader(WebsocketConstants.CONNECTION_KEY, constant("testuser1"))
So, I am out of help here.
Can anyone throw me a piece of complete code so that I can get fully
understand of how Camel can use correct component to get data from an
external websocket server ?
plus.
I also need a way to set the header as websocket support the sub-protocol to
generate header:
Sec-WebSocket-Protocol: WAMP
(I can use chrome to create a websocket client and everything works)
--
View this message in context:
http://camel.465427.n5.nabble.com/How-Can-I-support-WebSocket-JSON-RPC-in-Camel-as-Client-tp5791963.html
Sent from the Camel - Users mailing list archive at Nabble.com.