--- dao/DaoAdresseService/src/main/java/dk/daoas/daoadresseservice/SearchServlet.java 2015/08/18 08:33:38 2644 +++ dao/DaoAdresseService/src/main/java/dk/daoas/daoadresseservice/SearchServlet.java 2015/11/16 13:43:17 2772 @@ -54,6 +54,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + String origin = request.getHeader("Origin"); + response.setHeader("Access-Control-Allow-Origin", origin); //Allow ajax calls from everywhere AddressSearch search = (AddressSearch) this.getServletContext().getAttribute("search"); if (search == null) { @@ -163,6 +166,7 @@ Address t = result.address.extTarget; sb.append("").append(t.vejnavn + " " + t.husnr + t.husnrbogstav + ", " + t.postnr).append(""); + sb.append("").append(t.latitude).append(",").append(t.longitude).append(""); } sb.append("").append(rute).append(" ").append(koreliste).append(""); @@ -185,11 +189,11 @@ response.setContentType("text/xml; charset=UTF-8"); response.getWriter().print( sb ); - logPersistance.saveRequestLog(search.getDatabaseLayer(), brugerid, postnr, adresseStr, result); + logPersistance.saveRequestLog(search.getDatabaseLayer(), brugerid, postnr, adresseStr, omdeling, result); } - private String generateErrorXML(String msg) { + public static String generateErrorXML(String msg) { StringBuilder sb = new StringBuilder(); sb.append(""); sb.append("error");