A
Ale
Hi all,
I need to convert an XML file into an InputStream in order to have an
object and do other work.
This is the fragment, but XML file can't be found (it's of course in
the classpath, I've also tried using an absolute path name):
//START
InputStream stream;
stream = ClassLoader.getSystemResourceAsStream("/com/home/resources");
JAXBContext context = JAXBContext.newInstance(GetChartRequest1.class);
Unmarshaller unmarsh = context.createUnmarshaller();
GetChartRequest1 req = (GetChartRequest1)unmarsh.unmarshal(stream);
//END
Any suggestion ?
Thanks and best regards,
Alex
I need to convert an XML file into an InputStream in order to have an
object and do other work.
This is the fragment, but XML file can't be found (it's of course in
the classpath, I've also tried using an absolute path name):
//START
InputStream stream;
stream = ClassLoader.getSystemResourceAsStream("/com/home/resources");
JAXBContext context = JAXBContext.newInstance(GetChartRequest1.class);
Unmarshaller unmarsh = context.createUnmarshaller();
GetChartRequest1 req = (GetChartRequest1)unmarsh.unmarshal(stream);
//END
Any suggestion ?
Thanks and best regards,
Alex