Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/06/2011, 06:35
Avatar de FiruzzZ
FiruzzZ
 
Fecha de Ingreso: diciembre-2007
Ubicación: en casa
Mensajes: 470
Antigüedad: 17 años, 2 meses
Puntos: 41
Respuesta: De SQL a Java

Cita:
Iniciado por MasQueUnIntento Ver Mensaje
.. y tengo un stored procedure que devuelve un xml.
Cita:
Iniciado por MasQueUnIntento Ver Mensaje
No se como armar el XML si lo que la consulta de Sql me devuelve es un recordset.. :(


¿Y para qué vas a ARMAR el XML?, si es justamente lo que ya te está retornando!

Así sea un texto o bytes, CREÁ EL ARCHIVO Y LISTO!
Código Java:
Ver original
  1. public static void createFile(String bytesFile, String pathName)
  2.             throws FileNotFoundException, IOException {
  3.         File file = new File(pathName);
  4.         FileOutputStream fileOutputStream = new FileOutputStream(file);
  5.         fileOutputStream.write(bytesFile.getBytes());
  6.         fileOutputStream.close();
  7.         System.out.println("TRACE: File created at:" + file.getAbsolutePath());
  8.     }


PD: Para tu próximo post, poné un título que describa mejor tu duda..
__________________
BadProgrammerException!