Questions asked by cuongphanhttps://answers.axonivy.com/questions/asked-by/1101/cuongphan/?type=rssQuestions asked by <a href="/users/1101/cuongphan" >cuongphan</a>enWed, 24 Oct 2018 08:43:48 -0400How to access to endpoint of websocket in Axon.ivy 7.x?https://answers.axonivy.com/questions/3502/how-to-access-to-endpoint-of-websocket-in-axon-ivy-7-x<p>hi Ivyteam,</p> <p>I just created a websocket API by java in Ivy.</p> <p>Here is my example:</p> <pre><code>import java.io.IOException; import javax.websocket.OnClose; import javax.websocket.OnError; import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.ServerEndpoint; @ServerEndpoint("/echo") public class EchoWebSocket { @OnOpen public void onOpen(Session session) { System.out.println("onOpen::" + session.getId()); } @OnClose public void onClose(Session session) { System.out.println("onClose::" + session.getId()); } @OnMessage public void onMessage(String message, Session session) { System.out.println("onMessage::From=" + session.getId()); try { session.getBasicRemote().sendText(message.toUpperCase()); } catch (IOException e) { e.printStackTrace(); } } @OnError public void onError(Throwable t) { System.out.println("onError::" + t.getMessage()); } } </code></pre> <p>I don't know how to access to this endpoint in Ivy like "http://localhost:8081/ivy/echo"? Please give me the feedback soon!</p> <p>Thanks and best regards</p> <p>Cuong Phan</p>cuongphanWed, 24 Oct 2018 08:43:48 -0400https://answers.axonivy.com/questions/3502/how-to-access-to-endpoint-of-websocket-in-axon-ivy-7-xdesignerjava