Example #1
0
  public MessageElement consultarCuentaActivar(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();
    params.put("cuenta", requestTO.getCuenta_cargo());
    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.registerConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    } catch (InvalidCertificateException e) {
      throw new DAOException(e);
    }
    return msg;
  }
Example #2
0
  public MessageElement activarUsuario(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();
    params.put("method", "passwordAcceso");
    params.put("password", requestTO.getContrasena());
    params.put("vpassword", requestTO.getConfirmarContrasena());

    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.getConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS_FINAL, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    }

    return msg;
  }
Example #3
0
  public MessageElement registrarUsuario(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();
    params.put("method", "datosUsuario");
    params.put("alias", requestTO.getAlias());
    params.put("pregunta", requestTO.getPregunta());
    params.put("respuesta", requestTO.getRespuesta());
    params.put("email", requestTO.getEmail());
    params.put("celular", "5532896712");
    params.put("company", "1");
    params.put("compania", "1");
    params.put("telefonoOficina", "55786212");

    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.getConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS_ALIAS, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    }

    return msg;
  }
Example #4
0
  public MessageElement consultarUsuarioDisponible(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();
    params.put("method", "Disponibilidad");
    params.put("alias", requestTO.getAlias());

    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.getConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS_ALIAS, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    }

    return msg;
  }
Example #5
0
  public MessageElement validarDatosActivar(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();
    params.put("nip", requestTO.getNip());
    params.put("nipv", requestTO.getConfirm_nip());
    params.put("ndia", requestTO.getDia());
    params.put("nmes", requestTO.getMes());
    params.put("nano", requestTO.getAño());
    params.put("nombre", requestTO.getNombre());
    params.put("paterno", requestTO.getApellido_paterno());
    params.put("materno", requestTO.getApellido_materno());

    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.getConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS_VALIDACION, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    }

    return msg;
  }
Example #6
0
  public MessageElement validarContrato(AltasUsuariosRequestTO requestTO)
      throws DAOException, SessionExpiredException {

    String xml = null;
    XMLDecode decoder = new XMLDecode();
    Map<String, String> params = new HashMap<String, String>();

    MessageElement msg = null;
    try {
      Connector con = ConnectorManager.getConnector(requestTO.getCuenta_cargo());
      xml = con.sendRequest(ALTAS_USUARIOS_CONTRATO, params);
      msg = decoder.buildMessageElement(xml);

    } catch (URISyntaxException e) {
      throw new DAOException(e);
    } catch (HttpException e) {
      throw new DAOException(e);
    } catch (IOException e) {
      throw new DAOException(e);
    } catch (XmlDecodeException e) {
      throw new DAOException(e);
    }

    return msg;
  }