Am I asking this wrong or this is too simple to answer?  What I am
experiencing is that after sending  AHC-ws exchange message, the next
producer's exchange message is still the input message not the server
response.

To reproduce this is:
1. setup a websocket server( Camel-websocket) in local machine. for example
ws://localhost:9999/demo
                context.addRoutes(new RouteBuilder() {
                        public void configure() {

                                from("websocket://localhost:9999/demo/")
                                .log("${body}")
                                .setBody().simple("transormed informaton from:  
${body}")
                                .log("${body}")
                                .to("websocket://localhost:9999/demo/");
                        }
                });
2. setup a ahc-ws client to connect the server and send a simple request
                context.addRoutes(new RouteBuilder() {
                        public void configure() {

                                from("stream:in?promptMessage=Input Your 
request to server: ")
                                .to("ahc-ws://localhost:9999/demo/")
                                .log("${body}")
                                .to("file:record");
                        }
                });
in the client command line input "common" to test, and logs shows :

Input Your request to server: common
2016-12-30 13:53:22,071 INFO [org.apache.camel.component.ahc.ws.WsEndpoint]
- Reconnecting websocket: ws://localhost:9999/demo/
2016-12-30 13:53:22,344 INFO [route1] - common
Input Your request to server: 

server side logs shows:
2016-12-30 13:53:22,366 INFO [route1] - common
2016-12-30 13:53:22,374 INFO [route1] - transormed informaton from:  common


So, what did I miss?



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-get-response-using-AHC-WS-tp5791985p5792007.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to