Package com.knowgate.sms

Examples of com.knowgate.sms.SMSResponse


   
  oPsh.connect(getDataBaseBind().getProperty("smsurl"),
           getDataBaseBind().getProperty("smsaccount"),
           getDataBaseBind().getProperty("smspassword"),
           oPrp);
  SMSResponse oRsp = oPsh.push (oMsg);
  oPsh.close();

    JDCConnection oCon = getDataBaseBind().getConnection("SMSSender");
    oCon.setAutoCommit (true);
  PreparedStatement oStm = oCon.prepareStatement("INSERT INTO "+DB.k_sms_audit+" (id_sms,gu_workarea,pg_part,nu_msisdn,id_msg,gu_batch,bo_success,nu_error,id_status,dt_sent,gu_writer,gu_address,gu_contact,gu_company,tx_msg,tx_err) "+
                                               "VALUES ('"+oRsp.messageId()+"','"+getString(DB.gu_workarea)+"',1,'"+oAtm.getString(DB.mov_phone)+"',NULL,'"+getString(DB.gu_job)+"',?,?,?,?,'"+getString(DB.gu_writer)+"',?,?,?,?,?)");

  oStm.setShort(1, (short) (oRsp.errorCode()==SMSResponse.ErrorCode.NONE ? 1 : 0));
  oStm.setInt(2, (int) oRsp.errorCode().intValue());
  oStm.setInt(3, (int) oRsp.notificationStatusCode().intValue());
  oStm.setTimestamp(4, new Timestamp(oRsp.dateStamp().getTime()));
    oStm.setNull(5, Types.CHAR);
  if (oAtm.isNull(DB.gu_contact))
      oStm.setNull(6, Types.CHAR);
    else
      oStm.setString(6, oAtm.getString(DB.gu_contact));
  if (oAtm.isNull(DB.gu_company))
      oStm.setNull(7, Types.CHAR);
    else
    oStm.setString(7, oAtm.getString(DB.gu_company));
    oStm.setString(8, getParameter("txt"));
    if (oRsp.errorCode()==SMSResponse.ErrorCode.NONE)
      oStm.setNull(9, Types.VARCHAR);
    else
      oStm.setString(9, Gadgets.left(oRsp.errorMessage(),254));
    oStm.executeUpdate();
    oStm.close();
    oCon.close("SMSSender");

    if (DebugFile.trace) {
View Full Code Here

TOP

Related Classes of com.knowgate.sms.SMSResponse

Copyright © 2018 www.massapicom. 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.