I tried posting a .gpx file to my map-matching server (i obtained it under source - test). I used the following command: curl -XPOST -H “Content-Type: application/gpx+xml” -d DIR\GPX_data\tour2-with-loop.gpx “localhost/match?vehicle=car&type=json” and i get the following error:
java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.graphhopper.matching.GPXFile.doImport(GPXFile.java:175)
at com.graphhopper.matching.http.MatchServlet.parseGPX(MatchServlet.java:
The map matching server compiled normally. GPX file has no characters before “<?xml …”. I tried to use the solution from: http://stackoverflow.com/questions/3030903/content-is-not-allowed-in-prolog-when-parsing-perfectly-valid-xml-on-gae. I converted the InputStream to String, followed the instructions and converted back to InputStream but no success. Anyone had any similar problems or has any idea what do to?