title: How to invoke Spring STOMP web socket method from rest client
body: <p>My Java Code which intercepts all the calls with the URL /hello (Back) :</p>
  
  <pre><code>@Controller
  public class GreetingController {
  
      @MessageMapping("/hello")
      @SendTo("/topic/greetings")
      public Greeting greeting(HelloMessage message) throws Exception {
          Thread.sleep(3000); // simulated delay
          return new Greeting("Hello, " + message.getName() + "!");       
      }    
  }
  </code></pre>
  
  <p>My JavaScript code which calls the method greeting() (Front) :</p>
  
  <pre><code>function sendName() {
      var name = document.getElementById('name').value;
      stompClient.send("/app/hello", {}, JSON.stringify({ 'name': name }));
  }
  </code></pre>
  
  <p>Can some one please let me know how can I invoke @MessageMapping("/hello") method from Rest client. I can able to connect through JavaScript code and even getting response and displaying it in HTML. 
  But I have a requirement where external system(through rest call) should invoke this @MessageMapping("/hello") and then application(backend) should send response to HTML.
  I tried to invoke @MessageMapping("/hello") method from chrome rest client plugin but was unsuccessful.</p>
  
  <p>Please let me know how to invoke this method?
  Thanks in advance </p>