Ejemplo n.º 1
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;
  }