if ("<SANDESHA2_HOME>".equals(SANDESHA2_HOME)){
System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
return;
}
MessageSender sender = new MessageSender (AXIS2_CLIENT_PATH);
Options clientOptions = new Options ();
sender.setClientOptions(clientOptions);
sender.engageModule(new QName ("sandesha"));
clientOptions.setProperty(ClientAPI.SANDESHA_DEBUG_MODE,"on"); //Sets the debug on for sandesha.
clientOptions.setTo(new EndpointReference(to));
clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
clientOptions.setProperty(ClientAPI.AcksTo,"http://www-lk.wso2.com:9080/axis2/services/AnonymousService/echoString");
clientOptions.setReplyTo(new EndpointReference ("http://www-lk.wso2.com:9080/axis2/services/AnonymousService/echoString"));
clientOptions.setFaultTo(new EndpointReference ("http://www-lk.wso2.com:9080/axis2/services/AnonymousService/echoString"));
clientOptions.setProperty(ClientAPI.SEQUENCE_KEY,"sequence1");
clientOptions.setSoapAction("urn:wsrm:Ping");
clientOptions.setAction("urn:wsrm:Ping");
sender.send("ping",getPingOMBlock("Microsoft-1"));
sender.send("ping",getPingOMBlock("Microsoft-2"));
clientOptions.setProperty(ClientAPI.LAST_MESSAGE, "true");
sender.send("ping",getPingOMBlock("Microsoft-3"));
}