Examples of SMSMessage


Examples of com.knowgate.sms.SMSMessage

    throw new NullPointerException("NullPointerException SMSSender.process() smsprovider property not found at "+getDataBaseBind().getProfileName()+".cnf file");
  }

    SMSPush oPsh = SMSPushFactory.newInstanceOf(getDataBaseBind().getProperty("smsprovider"));

  SMSMessage oMsg = new SMSMessage(SMSMessage.MType.PLAIN_TEXT, Gadgets.generateUUID(),
                   getDataBaseBind().getProperty("smsaccount"),
                   oAtm.getString(DB.mov_phone),
                   getStringNull(DB.tl_job,""),
                   getParameter("txt"), null, new Date());
View Full Code Here

Examples of org.apache.axis2.transport.sms.SMSMessage

    }

    void dispatch(String source , String receiver,String message , Map<String , Object> properties) throws AxisFault {

      synchronized (this){
          smsMessage = new SMSMessage(source ,receiver, message , SMSMessage.IN_MESSAGE);
          smsMessage.getProperties().putAll(properties);
     }
      manager.dispatchToAxis2(smsMessage);
    }
View Full Code Here

Examples of org.apache.axis2.transport.sms.SMSMessage

            List<InboundMessage> arrayList = new ArrayList<InboundMessage>();
            try {
                service.readMessages(arrayList, InboundMessage.MessageClasses.UNREAD) ;

                for(InboundMessage msg : arrayList) {
                    SMSMessage sms =null;
                    synchronized (this) {
                        sms= new SMSMessage(msg.getOriginator(),null,msg.getText() ,SMSMessage.IN_MESSAGE);
                    }
                    smsManager.dispatchToAxis2(sms);
                    //delete the message form inbox
                    service.deleteMessage(msg);
                }
View Full Code Here

Examples of org.mifosplatform.infrastructure.sms.domain.SmsMessage

    public CommandProcessingResult create(final JsonCommand command) {

        try {
            this.validator.validateForCreate(command.json());

            final SmsMessage message = this.assembler.assembleFromJson(command);

            // TODO: at this point we also want to fire off request using third
            // party service to send SMS.
            // TODO: decision to be made on wheter we 'wait' for response or use
            // 'future/promise' to capture response and update the SmsMessage
            // table
            this.repository.save(message);

            return new CommandProcessingResultBuilder() //
                    .withCommandId(command.commandId()) //
                    .withEntityId(message.getId()) //
                    .build();
        } catch (final DataIntegrityViolationException dve) {
            handleDataIntegrityIssues(command, dve);
            return CommandProcessingResult.empty();
        }
View Full Code Here

Examples of org.mifosplatform.infrastructure.sms.domain.SmsMessage

    public CommandProcessingResult update(final Long resourceId, final JsonCommand command) {

        try {
            this.validator.validateForUpdate(command.json());

            final SmsMessage message = this.assembler.assembleFromResourceId(resourceId);
            final Map<String, Object> changes = message.update(command);
            if (!changes.isEmpty()) {
                this.repository.save(message);
            }

            return new CommandProcessingResultBuilder() //
View Full Code Here

Examples of org.mifosplatform.infrastructure.sms.domain.SmsMessage

    @Transactional
    @Override
    public CommandProcessingResult delete(final Long resourceId) {

        try {
            final SmsMessage message = this.assembler.assembleFromResourceId(resourceId);
            this.repository.delete(message);
            this.repository.flush();
        } catch (final DataIntegrityViolationException dve) {
            handleDataIntegrityIssues(null, dve);
            return CommandProcessingResult.empty();
View Full Code Here

Examples of ru.headhunter.smsengine.client.SmsMessage

            engine.openPort();
        } catch (Exception e) {
            return;
        }

        SmsMessage sms = new SmsMessage();
        sms.setUid(36L);
        engine.deleteMessageFromStorage(sms);

        for (SmsMessage smsMessage : engine.getIncomingMessages()) {
            System.out.println("uid: [" + smsMessage.getUid() + "], receivedTime: [" + smsMessage.getReceiveTime() + "], number: [" + smsMessage.getFromPhone() + "], message: [" + smsMessage.getMessageBody() + "]");
        }
View Full Code Here

Examples of ru.headhunter.smsengine.client.SmsMessage

public class DecodePduTest extends TestCase {

    public void testPduGSM() throws Exception {
        String pdu = "07919730071111F1240B919750633702F50000607071011385000CD4F29C0E6A97E7F3F0B90C";
        SmsMessage smsMessage = SMSTools.decodePdu(pdu);
        System.out.println("Message from [" + smsMessage.getFromPhone() + "], text: [" + smsMessage.getMessageBody() + "]");
        assertEquals("79053673205", smsMessage.getFromPhone());
        assertEquals("Test message", smsMessage.getMessageBody());
    }
View Full Code Here

Examples of ru.headhunter.smsengine.client.SmsMessage

        assertEquals("Test message", smsMessage.getMessageBody());
    }
   
    public void testPduUSC2() throws Exception {
        String pdu = "07919730071111F1240B919750633702F50008607071213085002204220435044104420020043D04300020043A043804400438043B043B043804460435";
        SmsMessage smsMessage = SMSTools.decodePdu(pdu);
        System.out.println("Message from [" + smsMessage.getFromPhone() + "], text: [" + smsMessage.getMessageBody() + "]");
        assertEquals("79053673205", smsMessage.getFromPhone());
        assertEquals("Тест на кириллице", smsMessage.getMessageBody());
    }
View Full Code Here

Examples of ru.headhunter.smsengine.client.SmsMessage

        assertEquals("Тест на кириллице", smsMessage.getMessageBody());
    }
   
    public void testAlphanumericSenderNumber() throws Exception {
        String pdu = "07919720730005F82010D0D0B25B1F6E1DA74D0008509080328054217A041204300448002004310430043B0430043D0441002000380035002E003200370020042004430431002E0020041F043E04360430043B04430439044104420430002C0020043F043E043F043E043B043D043804420435002004310430043B0430043D0441002E0020041F0435043D04370430002D00470053004D";
        SmsMessage smsMessage = SMSTools.decodePdu(pdu);
        System.out.println("Message from [" + smsMessage.getFromPhone() + "], text: [" + smsMessage.getMessageBody() + "]");
        assertEquals("Penza-GSM", smsMessage.getFromPhone());
        assertEquals("Ваш баланс 85.27 Руб. Пожалуйста, пополните баланс. Пенза-GSM", smsMessage.getMessageBody());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.