Example #1
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 #2
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;
  }