}
private SubmitSM buildSubmitSM(Message message) {
SubmitSM request = new SubmitSM();
Address sourceAr = new Address();
if (notEmpty(configuration.getSourceNPI())) {
sourceAr.setNPI(Byte.valueOf(configuration.getSourceNPI()));
}
if (notEmpty(configuration.getSourceTON())) {
sourceAr.setTON(Byte.valueOf(configuration.getSourceTON()));
}
sourceAr.setAddress(message.getProperty("from").toString());
request.setSource(sourceAr);
Address destAr = new Address();
if (notEmpty(configuration.getDestNPI())) {
destAr.setNPI(Byte.valueOf(configuration.getDestNPI()));
}
if (notEmpty(configuration.getDestTON())) {
destAr.setTON(Byte.valueOf(configuration.getDestTON()));
}
destAr.setAddress(message.getProperty("to", String.class));
request.setDestination(destAr);
if (configuration.isRequestDeliveryReceipts()) {
request.setRegistered((byte) 0x01);
}