Unmarshalling nested or complex data elements in JAVA Web services [message #1709233] |
Fri, 25 September 2015 03:13  |
Eclipse User |
|
|
|
We are developing JAVA web services and have come up with input to the web services. The input has data elements and the last element is an Arraylist which has four items. We are able to get the values of first set of elements which are not in arraylist and then save or store them in a database. The challenge we have is to get the values of nested elements in arraylist .
We are using the following code but it is complaining or giving error message that it cannot see (DataInfo.xml) XML file.
JAXBContext jaxbContext = JAXBContext.newInstance(DataInfo.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
DataInfo EXitems = (DataInfo) jaxbUnmarshaller.unmarshal(new File("DataInfo.xml") );
How can we ensure that DataInfo.xml is generated at the runtime?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26188 seconds