--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2010/07/10 09:57:04 977 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java 2010/07/10 10:53:44 978 @@ -1,7 +1,6 @@ package dk.thoerup.traininfoservice.banedk; import java.io.IOException; -import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -67,7 +66,7 @@ int station = Integer.parseInt( req.getParameter("station") ); String format = req.getParameter("format"); - List beans; + DepartureBean beans; String stationName = StationDAO.getStationName(station); @@ -112,7 +111,7 @@ } - protected String formatXml(List beans, String stationName, boolean arrival) throws ServletException{ + protected String formatXml(DepartureBean beans, String stationName, boolean arrival) throws ServletException{ String xml = ""; try { DocumentBuilder builder = docBuilderFactory.newDocumentBuilder(); @@ -123,7 +122,14 @@ Element root = doc.createElement("departureinfo"); root.setAttribute("station", stationName); root.setAttribute("arrival", Boolean.toString(arrival) ); - for (DepartureBean departure : beans) { + + for (String notif : beans.notifications) { + Element notElem = doc.createElement("notification"); + notElem.setTextContent(notif); + root.appendChild(notElem); + } + + for (DepartureEntry departure : beans.departureEntries) { Element train = doc.createElement("train"); Element time = doc.createElement("time");