Jump to content
Changes to the Jaspersoft community edition download ×

codyjasperForge

Members
  • Posts

    282
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by codyjasperForge

  1. Thanks for the reply. I have yet to find a useful reference that shows how to access the attachment(s) using the JAX-RPC Spring implementation. If anyone could guide me in this search , it would be greatly appreciated. Thanks again Sherman for the response, you have been quite helpful in my research.
  2. Hello again Sherman, I have successfully configured my client using the referenced article above, however I am only able to execute methods of the report scheduler web service. It seems that the implementation of the management web service is dependant upon Axis architecture. For example, when I call the runReport method I am unable to get the actual JasperPrint object, because the web service returns the String value of the Operation Result. Is there any other way of getting the JasperPrint object from the result of the web service, without using Axis specific implemenation? I am specifcally referring to the code inside the WSClient-> runReport method call, where the results are attached as an Object array. Do you know of any Spring references where I could find out how to access the underlying Stub to gain access to the attachments? Right now, I am receiving a ClassCastException due to the getManagementService() call being accessed as a Proxy. My issue could be somewhat related to this thread: http://forum.springframework.org/showthread.php?t=16879 Sorry if I am unclear... Any response is appreciated. As always thanks ! Code: Post Edited by Cody Addison at 02/03/09 14:43 Post Edited by Cody Addison at 02/03/09 14:59
  3. go to this page: http://sourceforge.net/project/showfiles.php?group_id=162962&package_id=195243&release_id=642675 and download whichever version you need...
  4. Thank you for the reply Sherman. Once I have setup my custom client I will post back to let you know how things turned out...
  5. Sherman, You were correct, the client code that was generated from Eclipse did not include all of the neccessary values to be passed through for either trigger. Therefore, the XML was not fully populated. I was able to successfully call the service once I downloaded SOAP UI and throughly tested the fully populated XML string. Having said that, I have yet another issue. My goal is to design a reusable web client that could be deployed to several applications. However, I am very unfamiliar with the Axis framework and web service client design in general. I have read in several places that Spring has support for designing web service clients based on Axis and JAX-RPC. Can you verify that this is an viable option for me to use for the services available via Jasperserver? Specifically this article is what I am referencing, however, I do not know if Jasperserver is setup to expose it's services in this manner... http://static.springframework.org/spring/docs/2.5.x/reference/remoting.html (see Accessing / Exposing via JAX-RPC) Any sense of direction you could give me is greatly appreciated. As always thanks, and great job on the latest version, I'm very impressed.
  6. Hello, I have a question regarding the scheduleJob method call in the ReportScheduler web service. To schedule a job you must specify either a calendar trigger, or a simple trigger. I have developed a sample client using Eclipse WTP's Axis web service client generator, however whenever I attempt call the scheduleJob method, I receive the following exception message as a result: "exception: Only a single trigger can be set" When I remove the parameters for the calendar trigger inputs, I get the following error message: "exception: java.lang.NumberFormatException: for input string "" " Can anyone guide me in what I am doing wrong? Thanks in advance...
  7. This is usually due to a version conflict with java. Try using 1.5 or 1.4... Hope it helps.
  8. There should be examples of this in the samples directory of the download... You may also check the JasperServer download package, as it has samples of this as well... HTH
  9. Have you included JRE_HOME in the PATH env. variable? (classpath) Code:echo $PATH This should tell you if it is included. Also, try using JAVA_HOME, not JRE_HOME, as many of the scripts are looking for a JAVA_HOME env. variable... Hope it helps.
  10. Awesome. Thanks Sherman. Any plans to critique the session replication performance in the future? Do you have any suggestions for manually improving the performance of session replication w/JasperServer? This would prove to be very useful for our use case... "2 + 2 = 5 for extremely large values of 2. "
  11. I should change my screen name to "GuyWith2ManyQuestions" :lol: ================================================ I have yet another question, this time it is NOT concerning the web services API... Is it possible to have JasperServer running in a cluster? If so, what are JasperServers capabilities as far as fail-over and session-replication? Where might I find more information on this topic? (specifically) Thanks Lucianc, you've been a great help.
  12. Thanks for the reply... That worked for the text, now I just need to get the images working... Thanks again. Post edited by: codyjasperForge, at: 2007/11/26 17:11
  13. Once again thank you for your suggestions. A thread in another forum states that the source of the .gif image that is included is causing this to appear. After testing this theory, I set the Content-Type to "image/gif" and the result was the JasperReport logo. Do you have any other suggestions for directing the user to the actual output file location? (in the repository) Would it possible to manually prompt the user for their credentials before they are redirected to the JasperServer login page? Post edited by: codyjasperForge, at: 2007/11/26 14:53
  14. Thanks for the reply... Could you post the code that writes HTML and the resulting output? Here are the two functions I am using... Code:public void retrieveReport(HttpServletRequest req, HttpServletResponse response){ java.io.File tmp = (File) req.getSession().getServletContext().getAttribute("javax.servlet.context.tempdir"«»); File tmpFile = null; try { tmpFile = File.createTempFile("contentResource", ".data", tmp); WSClient client = (WSClient) req.getSession().getAttribute("client"«»); ResourceDescriptor outputFile = new ResourceDescriptor(); outputFile.setUriString("/ContentFiles/" + req.getParameter("reportName"«»)+ "." + req.getParameter("format"«»)); outputFile.setName(req.getParameter("reportName"«»)); outputFile.setWsType("UNKNOW"«»); ResourceDescriptor result = client.get(outputFile, tmpFile); String contentType = result.getResourcePropertyValue(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE); if (contentType.equals("html"«»)) { response.setContentType("text/html; charset=UTF-8"«»);//charset=UTF-8 charset=ISO-8859-1 pageEncoding=ISO-8859-1 } else if (contentType.equals("pdf"«»)) { response.setContentType("application/pdf"«»); response.setHeader("Content-Disposition", "inline; filename="" + result.getName() + """«»); } else if (contentType.equals("xls"«»)) { response.setContentType("application/xls"«»); response.setHeader("Content-Disposition", "inline; filename="" + result.getName() + """«»); } else if (contentType.equals("rtf"«»)) { response.setContentType("application/rtf"«»); response.setHeader("Content-Disposition", "inline; filename="" + result.getName() + """«»); } else if (contentType.equals("csv"«»)) { response.setContentType("text/csv"«»); response.setHeader("Content-Disposition", "inline; filename="" + result.getName() + """«»); } response.setContentLength((int)tmpFile.length()); writeFileContent(response, tmpFile); }catch(Exception e){ e.printStackTrace(); }finally{ tmpFile.delete(); } } public void writeFileContent(HttpServletResponse response, File file){ try{ javax.servlet.ServletOutputStream out = response.getOutputStream(); java.io.FileInputStream fileIn = new java.io.FileInputStream(file); try { byte[] buf = new byte[bUFFER_SIZE]; int read; while((read = fileIn.read(buf)) > 0) { out.write(buf, 0, read); } } finally { fileIn.close(); } out.flush(); out.close(); }catch(java.io.IOException ioe){ ioe.printStackTrace(); }catch(Exception e){ e.printStackTrace(); } } } Here is what the output looks like for html files... Code:[code]GIF89a b w wi w *! w t B w x dB w b $ d w w w C l w h b 4 w w P x w x t x X O | x d b w ~n N | + b O | + N | O | j x b XK ? ON|| [ b N ׮ NN ||lW o N ( N , O | x w P Nw | x ܺ O T 0 N | wn F w ! , H *Ȱ Ç H ŋ3j ȑ†C I ɓ(? 1 K 0cVLI ͚+eRt@ O 7 4 ϣH1 ]z M :yN )u*՞^R y jW ~ 8 ̲gŒ k $T R ƕۓn] Y % qo۾ " s & W ֗ #Gދ 2e 1O le˄c qq䪦S? vܓ ή n < g !8 hƨW .kٞ3 ~ ye Nm [ aҌ+nݪ [ < y gM r` U ?_ v 3q y # ֖[ I | yuxrI l! y }Va QĞH<@ a Yt q q Մ m "H ] aH! H á d `y1>G 0 7 J7 Its virtually the same as the code in the ContentResourceDataServlet. Thanks for you help...
  15. My mistake, I am not very familiar with custom datasources. All I can do for you now is refer you to the docs/forums for answers. Sorry & good luck!
  16. FYI, Jasper has it's own xml syntax. (jrxml) I don't know if you realize that by looking at your sample source... All I know is that Jasper is NOT useless...
  17. I have implemented the necessary changes to my code. But I am unable to display html formatted reports. All I see on the forwarded page is byte code. I have set the response content-Type and encoding values to those of the ContentResourceDataServlet. What else needs to be done? What would cause this to happen? The .pdf format works fine. As does the others, so I know the problem lies in the html formatting... Ideas? Post edited by: codyjasperForge, at: 2007/11/20 18:56
  18. Another idea that I had was to use the web service api from my utility class to do a 'get' on the output file. The problem with this solution is that I do not see a way to display the output file by getting it as a 'ResourceDescriptor' object. I need a direct link into the repository that bypasses the security model. All of our users will have the necessary credentials to login to JasperServer. Is this possible? Thank you once again Lucianc.
  19. Ok, I am scheduling jobs via the newly added web service(s). Once the jobs complete, the output files are stored in the JasperServer repository under the '/ContentFiles/' directory. The client of my web application is polling the status of the job, when it is 'COMPLETE' then I wish to direct them to the output file. (under /ContentFiles) Up to now, everything is functional, with the exception that when I try to direct them to the repository, the login page is what I get. I have a utility class in my web application that creates a java.net.HttpURLConnection object with the BASIC authentication header. The username and password are gathered from the WSClient's getUserName & getPassword methods. I encode the username and password using sun.misc.BASE64Encoder(). I am able to access the output files from within my utility class and I can create an InputStream and read in the content of the output file. (e.g. reportOutput.html) What I wish to do is simply direct the client to that output file, whether it be a .pdf, .html, or the other formats. I have read through the JasperForge forums, and everyone is stating that the login page can be bypassed, yet I can't see to find out how... Do you have any suggestions? :)
  20. Sounds like you need to change the type: Unable to open document:Unhandled mime type:application/xml Read the JasperServer Web Services guide, it has what you need. (ProjectHome -> Wiki) It also comes with the package download. (in 'docs' directory) Hope this helps.
  21. Download JasperServer-iReport-plugin.jar (Downloads page) Drop .jar file into 'lib' directory of iReport; Restart iReport; Create new server in plugin window of iReport. etc, etc, etc... Be sure to search the forums for answers, everything you need should be in them somewhere.
  22. How is it that you are able to bypass the Security to the repository? I understand that it uses BASIC authentication, however, I have supplied the necessary parameters to my connection object, and I still get re-directed to the login page. Any help? Post edited by: codyjasperForge, at: 2007/11/16 19:09
  23. Code:String fullname = lastname + "," + firstname; You may also want to use .toString() on 'lastname' or 'firstname' depending on what they're coming in as. Hope it helps.
  24. First off, search the forums for 'scriptlet editor' or scriptlet. Secondly, you will need to know java. :pinch: http://www.sun.com/ Check out the documentation for iReport, its discussed there too. Hope it helps.
  25. When uploading from iReport, make sure that you 'explore' each directory in the specified 'server' that you have created. Explore to the directory of your choice before uploading the file. Also, make sure that the user has permission to write to that directory as well. Hope it helps.
×
×
  • Create New...