{
public void doIt() throws Exception
{
GatewayStatusNotification statusNotification = new GatewayStatusNotification();
OutboundNotification outboundNotification = new OutboundNotification();
OutboundMessage msg;
System.out.println("Example: Send messages through SMPP using JSMPP.");
System.out.println(Library.getLibraryDescription());
System.out.println("Version: " + Library.getLibraryVersion());
JSMPPGateway gateway = new JSMPPGateway("smppcon", "localhost", 2715, new BindAttributes("smppclient1", "password", "cp", BindType.TRANSMITTER));
Service.getInstance().addGateway(gateway);
Service.getInstance().setGatewayStatusNotification(statusNotification);
Service.getInstance().setOutboundMessageNotification(outboundNotification);
Service.getInstance().startService();
// Send a message.
msg = new OutboundMessage("+967712831950", "Hello from SMSLib and JSMPP");
Service.getInstance().sendMessage(msg);
System.out.println(msg);
System.out.println("Now Sleeping - Hit <enter> to terminate.");
System.in.read();
Service.getInstance().stopService();