src/main/java/com/github/mikesafonov/smpp/core/sender/MessageBuilder.java
public CancelSm createCancelSm(CancelMessage cancelMessage){
        Address sourceAddress = addressBuilder.createSourceAddress(cancelMessage.getSource());
        Address destAddress = addressBuilder.createDestinationAddress(cancelMessage.getMsisdn());

        CancelSm cancelSm = new CancelSm();
        cancelSm.setSourceAddress(sourceAddress);
        cancelSm.setDestAddress(destAddress);
        cancelSm.setMessageId(cancelMessage.getMessageId());
        return cancelSm;
    }
/**
     * Builds {@link CancelSm} for canceling sms message
     *
     * @param cancelMessage cancel message
     * @return request {@link CancelSm}
     * @throws IllegalAddressException if source/destination address not created
     */
Builds  CancelSm for canceling sms message
@param cancelMessage cancel message
@return request  CancelSm
@throws IllegalAddressException if source/destination address not created
Builds CancelSm for canceling sms message @param cancelMessage cancel message @return request CancelSm @throws IllegalAddressException if source / destination address not created
public CancelSm createCancelSm(CancelMessage cancelMessage){
        Address sourceAddress = addressBuilder.createSourceAddress(cancelMessage.getSource());
        Address destAddress = addressBuilder.createDestinationAddress(cancelMessage.getMsisdn());
        CancelSm cancelSm = new CancelSm();
        cancelSm.setSourceAddress(sourceAddress);
        cancelSm.setDestAddress(destAddress);
        cancelSm.setMessageId(cancelMessage.getMessageId());
        return cancelSm;
    }
public CancelSm createCancelSm ( CancelMessage cancelMessage ) { Address sourceAddress = addressBuilder . createSourceAddress ( cancelMessage . getSource ( ) ) ; Address destAddress = addressBuilder . createDestinationAddress ( cancelMessage . getMsisdn ( ) ) ; CancelSm cancelSm = new CancelSm ( ) ; cancelSm . setSourceAddress ( sourceAddress ) ; cancelSm . setDestAddress ( destAddress ) ; cancelSm . setMessageId ( cancelMessage . getMessageId ( ) ) ; return cancelSm ; }
Builds {@link CancelSm} for canceling sms message
 @param cancelMessage cancel message
 @return request {@link CancelSm}
 @throws IllegalAddressException if source/destination address not created
Builds { @link CancelSm } for canceling sms message @param cancelMessage cancel message @return request { @link CancelSm } @throws IllegalAddressException if source / destination address not created