1
0
Fork 1
mirror of https://github.com/patrickbr/simpleefa synced 2025-02-22 05:53:58 +01:00
No description
Find a file
2017-11-13 01:35:54 +01:00
.settings add eclipse files for dev 2015-04-20 01:30:26 +02:00
src/simpleefa/server correctly decode URL params again 2015-07-23 20:10:41 +02:00
war add optional json output 2015-06-28 21:57:25 +02:00
.classpath add optional json output 2015-06-28 21:57:25 +02:00
.gitignore update gitignore 2015-04-20 01:31:14 +02:00
.lint4jprefs add eclipse files for dev 2015-04-20 01:30:26 +02:00
.project add eclipse files for dev 2015-04-20 01:30:26 +02:00
.travis.yml add travis yml 2017-11-13 01:33:03 +01:00
build.xml update gitignore 2015-04-20 01:31:14 +02:00
LICENSE add license 2015-04-16 00:22:38 +02:00
LICENSE-3RD-PARTY better json output 2015-06-30 00:02:02 +02:00
README.md add build badge 2017-11-13 01:35:54 +01:00

Build Status

SimpleEFA

A simplefied wrapper around EFA's XML interface

Requirements

  • ant
  • tomcat installation
  • servlet-api.jar has to be in your CLASSPATH

Installation

This is a Java-Servlet which can for example be run in Tomcat. A pre-built WAR can be found in the releases.

To create a distributable WAR-File yourself checkout this repo and type

ant war

and upload the generated build/simpleefa.war to a live Tomcat server.

Configuration is done in in war/WEB-INF/simpleefa.properties. Important: you have to adjust common.simpleefaurl in the properties file to a valid SimpleEFA backend URL, for example like this:

common.efa_url = http://www.efa-bw.de/nvbw/

Request Restrictions

A poor-man's security mechanism to prevent mass-requests is built-in and can be configured via common.ipwhitelist and common.maxconnectionperhour.

ISO-Encoding

Most EFA-Installation expect request strings to be ISO-encoded. However, there are some newer installations that expect UTF8-encoding. To disable the default ISO-encoding of request parameters, set common.isoencoderequests = 0 in the properties file.

Documentation

http://patrickbrosi.de/de/projects/simpleefa/

JSON-Output

The default output format is XML directly rendered from the result of an XQuery query. However, you can enforce JSON format by setting the GET parameter format=JSON, for example like this:

http://localhost:10080/simpleefa/stationname?station=stuttgart%20hauptbahnhof&format=JSON

An optional GET parameter callback will wrap the outputted JSON to make it into JSONP:

http://localhost:10080/simpleefa/stationname?station=stuttgart%20hauptbahnhof&format=JSON&callback=mycallback

License

SimpleEFA is published under GPL v2, see LICENSE. This software uses 3rd party libraries under MPL v2 (Saxon-HE 9.5) and other, see LICENSE-3RD-PARTY.