I have a notebook with one para, with 3-4 input fields. want to call this programmatially with different values. can see the websocket chatter in browser but cant connect to websocket from code. using spring websocket client.
Is there any working sample with this in spring or other java code? What protocol does zeppelin use ? Any pointers to mimic it from Java? Do I need to add headers to my zepplin to allow calls from another app runnong on another JVM (CORS or something)? When I use : ClientWebSocketContainer container = new ClientWebSocketContainer( webSocketClient(), "ws://localhost:8080"); Get error : java.io.IOException: Connect failure at org.eclipse.jetty.websocket.jsr356.ClientContainer.connect(ClientContainer.java:157) ~[javax-websocket-client-impl-9.2.14.v20151106.jar:9.2.14.v20151106] at org.eclipse.jetty.websocket.jsr356.ClientContainer.connectToServer(ClientContainer.java:180) ~[javax-websocket-client-impl-9.2.14.v20151106.jar:9.2.14.v20151106] at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:152) ~[spring-websocket-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.web.socket.client.standard.StandardWebSocketClient$1.call(StandardWebSocketClient.java:149) ~[spring-websocket-4.2.3.RELEASE.jar:4.2.3.RELEASE] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_111] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] Caused by: org.eclipse.jetty.websocket.api.UpgradeException: Didn't switch protocols at org.eclipse.jetty.websocket.client.io.UpgradeConnection.validateResponse(UpgradeConnection.java:314) ~[websocket-client-9.2.14.v20151106.jar:9.2.14.v20151106] at org.eclipse.jetty.websocket.client.io.UpgradeConnection.read(UpgradeConnection.java:241) ~[websocket-client-9.2.14.v20151106.jar:9.2.14.v20151106] at org.eclipse.jetty.we... When I try to connect to 8081 (what the docs say is the websocket port): java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_111] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_111] at org.eclipse.jetty.io.SelectorManager.finishConnect(SelectorManager.java:340) ~[jetty-io-9.2.14.v20151106.jar:9.2.14.v20151106] On browser I can connect to 8080 and not make notebooks. Want to automate and write test cases for our notebooks. Thank you -- Regards Tushar Kapila