if (log.isDebugEnabled()) {
log.debug("Sending a data short message for exchange id '{}'...", exchange.getExchangeId());
}
DataSmResult result;
try {
result = session.dataShortMessage(
dataSm.getServiceType(),
TypeOfNumber.valueOf(dataSm.getSourceAddrTon()),
NumberingPlanIndicator.valueOf(dataSm.getSourceAddrNpi()),
dataSm.getSourceAddr(),
TypeOfNumber.valueOf(dataSm.getDestAddrTon()),
NumberingPlanIndicator.valueOf(dataSm.getDestAddrNpi()),
dataSm.getDestAddress(),
new ESMClass(dataSm.getEsmClass()),
new RegisteredDelivery(dataSm.getRegisteredDelivery()),
DataCoding.newInstance(dataSm.getDataCoding()),
dataSm.getOptionalParametes());
} catch (Exception e) {
throw new SmppException(e);
}
if (log.isDebugEnabled()) {
log.debug("Sent a data short message for exchange id '{}' and message id '{}'",
exchange.getExchangeId(), result.getMessageId());
}
Message message = getResponseMessage(exchange);
message.setHeader(SmppConstants.ID, result.getMessageId());
message.setHeader(SmppConstants.OPTIONAL_PARAMETERS, getOptionalParametersAsMap(result.getOptionalParameters()));
}