Java Location Server

From SOWNWiki
Jump to: navigation, search

The Java location server is currently being written. When finished it will provide a reference Location API 0.1 location server against which people can write location aware applications and update agents.

Installation

The installation process should be the same on all platforms. If you want to use the binary files you will need to be using a Java 1.6 or greater virtual machine.

Binary Installation

You will need a Java 1.6 or greater virtual machine to run the pre-compiled program.

SVN Checkout the location_server directory and go to the bin directory. You should find in there the following files:

  • Location.class
  • Main.class
  • ResponseServer.class
  • ResponseServerDispatcher.class
  • Server.class
  • UpdateServer.class
  • UpdateServerDispatcher.class

To run the application simply run

java Main 

in the bin directory. If you are running Windows you will prompted to allow the application to accept incoming connections. You must allow this or you will be unable to talk to the server. You should now be able to query the server on hxxp://localhost:2001 for location information and give it new location information by sending the relevant data to hxxp://localhost:2002.

Compiling the source code

As with the binary installation you must first check the source code out of the SOWN SVN repository. Instead of changing to the bin directory change to the source directory and issue the command

javac Main.java

The project will now build. You can run the server by entering

java Main

just as with the pre-complied binaries.

Bugs/Features/Known Issues

This section contains a list of problems with the software. If you find a bug in the software please add it to the list.

Base64 decode missing

Currently the server does not correctly decode the base 64 encoded inputs given to it by update agents. As a result it returns the base 64 encoding of the location description and website when a client application requests location data.