Starting the SMSC (short message service center):
SMPPServer server = new SMPPServer("0.0.0.0", 2775); server.start();
Creating a new ESME (external short message entity) and connect them to the SMSC:
SMPPClient client = new SMPPClient("127.0.0.1", 2775); client.connect();
Create a new PDU (protocol data unit) for sending a short message:
SubmitSm request = new SubmitSm(); request.setShortMessage("Hello World!"); request.setDestinationAddress(+491727777777);
Send the short message and disconnect the ESME from the SMSC:
SubmitSmResponse response = client.send(request); client.disconnect();
Shutdown the SMSC:
server.stop();