Rukh
unread,Oct 10, 2008, 5:42:55 AM10/10/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jsmpp
Hi,
I think it is a bug, but maybe I'm mistaken.
I'm using SMPPSim (from seleniumsoftware) to test jSMPP libraries and
I've noticed an issue, with receiving. How to reproduce it:
1. Start SMPPSim (no bounded connectors)
2. Submit message to SMPPSim using it's MO Injection form
3. Bind to SMPPSim with a receiver to receive the message
4. No messages are received. (BUG?)
When I'm connected to SMPPSim with an RX when messages is sent it
works fine, but connecting to collect messages waiting in outbound
queue seams to fail. Correct me if this is not a bug.
Here is the RX implementation I'm using to test RX:
public static void main(String[] args) throws IOException {
final SMPPSession session = new SMPPSession();
try {
session
.connectAndBind("localhost", 2775, new BindParameter(
BindType.BIND_RX, "smppclient", "password", "cp",
TypeOfNumber.UNKNOWN,
NumberingPlanIndicator.UNKNOWN, null));
} catch (IOException e) {
System.err.println("Failed connect and bind to host");
e.printStackTrace();
}
// Set listener to receive deliver_sm
session.setMessageReceiverListener(new MessageReceiverListener() {
public void onAcceptDeliverSm(DeliverSm deliverSm)
throws ProcessRequestException {
System.out.println("getEsmClass " + deliverSm.getEsmClass());
if (MessageType.SMSC_DEL_RECEIPT.containedIn(deliverSm
.getEsmClass())) {
// delivery receipt
try {
DeliveryReceipt delReceipt = deliverSm
.getShortMessageAsDeliveryReceipt();
long id = Long.parseLong(delReceipt.getId()) & 0xffffffff;
String messageId = Long.toString(id, 16).toUpperCase();
System.out
.println("Receiving delivery receipt for message '"
+ messageId + "' : " + delReceipt);
} catch (InvalidDeliveryReceiptException e) {
System.err.println("Failed getting delivery receipt");
e.printStackTrace();
}
} else {
// regular short message
System.out.println("Receiving message : "
+ new String(deliverSm.getShortMessage()));
}
}
public void onAcceptAlertNotification(
AlertNotification alertNotification) {
System.out
.println("alert: " + alertNotification.getCommandId());
}
});
// keep receiving messages...
System.out.print("Press any key to stop receiving messages");
System.in.read();
session.unbindAndClose();
System.out.println("Finished");
}