Trying to access one of two methods...
I am using coldfusion (scripting language) to call a java object, problem is... I am not very familiar with java. So in a previous post I thought I had to deal with method overloading and set a type, which someone suggested a subclass, but I think I might only need to ensure my file is formatted for one of the two methods to take it.
The methods are:
loadXML(org.xml.sax.InputSource)
or
loadXXML(java.io.InputStream)
So I tried java.io.InputStream... with
inputStream = CreateObject("java", "java.io.FileInputStream");
xmlStream = inputStream.init("path\file.xml")
jasperLoader = CreateObject("java", "net.sf.jasperreports.engine.xml.JRXmlLoader");
jasperDesign = jasperLoader.loadXML(xmlStream);
That didn't work... it fails at the jasperDesign line...
So then I thought, its already xml, it might be easier to look at the loadXML(saxStuff)...
Well, then I was really confused. I have no idea how to try and convert it to feed properly. I am sure it is because I am a little java "special" and I would appreciate a little education and a swift kick in the correct direction!
Thanks,
Va. :-)
[1186 byte] By [
ironyxa] at [2007-11-27 8:19:22]

Well, I only got as far as trying to figure out where I was going to put it to make sure the app server fed it to the correct location.
I was thinking when I started to go that route that I still have to ensure my parameter type is correct when it finally gets to the method in the super class right? That would be my real issue now... is that its an xml file, and these methods don't seem to like that as a parameter type...
Since I don't program in java, doing a subclass and making sure it feeds through two app servers, plus ensuring my code is correct in the subclass and where I call it seems like it would be less direct than figuring out how to call the method correctly since that is what I thought I was trying to work around. It could work, I just thought this would be the better way to do it.
Now admittedly, I am not the best programmer, but that's kind of why I am trying to take the shortest route with the smallest possibility of messing it up. I might be wrong, either way I don't really know how to go about everything.
But I really am just trying to get a handle and working with bits and pieces, so any extra info would be very helpful...
Thank you for taking the time!
Va.