Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Using WSO2 MB management console you can see how  MessageReceiveService queue is created. See Message Broker Queues - User Guide for more information.

Code Block
languagejava
public void sendMessage(){
	try {

	    ConfigurationContext configurationContext =
		    ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, "conf/axis2_client.xml");
	    MessageReceiveServiceStub stub = new MessageReceiveServiceStub(configurationContext,"http://localhost:8080/axis2/services/MessageReceiveService.MessageReceiveServiceHttpSoap11Endpoint/");
	    //first send the inonly message
	    stub.receive("Test message to receive ");
	    // inout message
	    String response = stub.echo("Test message to echo");
	    System.out.println("Response ==> " + response);

	    try {
		Thread.sleep(10000);
	    } catch (InterruptedException e) {
		e.printStackTrace();
	    }
	} catch (AxisFault axisFault) {
	    axisFault.printStackTrace();
	} catch (java.rmi.RemoteException e) {
	    e.printStackTrace();
	}
}

...