Pdf bindXML from inputStream ERROR

Last post 12-02-2010, 9:12 AM by Kali-mero. 2 replies.
Sort Posts: Previous Next
  •  12-01-2010, 6:49 AM 271377

    Pdf bindXML from inputStream ERROR Java

    Attachment: Present (inaccessible)
    Hi,

    I tried to generate a PDF from XML and XSLT inputStream but i get an error when i call bindXML method. I join xml and xslt files.


    Help it's urgent!!! Thx!!!

    My code:


    String idFactura = request.getParameter("idFactura");
            response.setContentType("application/pdf");
            response.setHeader("Content-Disposition", "attachment; filename=".concat(idFactura).concat(".pdf"));
            URL url = null; // el URL a leer
            HttpURLConnection conexionSW = null; // conexión al servicio web
            HttpURLConnection conexionXSL = null; // conexión al fichero XSL

            try {
                url = new URL(request.getSession().getServletContext().getInitParameter("factura.urlServicio").concat(idFactura));
                conexionSW = (HttpURLConnection) url.openConnection();
                conexionSW.setRequestMethod("GET");
                url = new URL(request.getSession().getServletContext().getInitParameter("factura.urlFicheroXsl"));
                conexionXSL = (HttpURLConnection) url.openConnection();
                conexionXSL.setRequestMethod("GET");
                Pdf pdf = new Pdf();
                pdf.bindXML(conexionSW.getInputStream(), conexionXSL.getInputStream());
                pdf.save(response.getOutputStream());
            } catch (Exception e) {
            }

    ERROR:

    Estado HTTP 500 -


    type Informe de Excepción

    mensaje

    descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.

    excepción

    java.lang.NullPointerException
    aspose.pdf.xml.Aaz.a(SourceFile:180)
    aspose.pdf.xml.Aaz.a(SourceFile:159)
    aspose.pdf.Pdf.bindXML(SourceFile:1576)
    gesco.servlets.Factura.processRequest(Factura.java:79)
    gesco.servlets.Factura.doGet(Factura.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/6.0.26.


    Apache Tomcat/6.0.26


     
  •  12-02-2010, 6:56 AM 271570 in reply to 271377

    Re: Pdf bindXML from inputStream ERROR

    Hi Jerome,

    We're looking into this issue at our end and you'll be updated with the results shortly.

    We're sorry for the inconvenience.
    Regards,

    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  12-02-2010, 9:12 AM 271588 in reply to 271570

    Re: Pdf bindXML from inputStream ERROR

    Thank you!
     
View as RSS news feed in XML