enable the web service - LSIR/gsn GitHub Wiki
In some occurrences the GSN the web service interface might be disabled by default. You can easily check this by
- installing and starting GSN by [wiki:install-gsn source] or [wiki:installer binary]
- visit
http://localhost:22001to check whether GSN is running (given that the GSN port was not changed) - visit
http://localhost:22001/services/GSNWebService?wsdlwhere the WSDL should be published - if an XML (the web service definition) is displayed, all is fine and the web service is running
- if you get a 404 error instead, the web service needs to be enabled
in order to enable the web service interface you have to edit the config file for it
- if still running, stop gsn
- open the config file at
webapp/WEB-INF/web.xml - there are 2 areas to uncomment (you can uncomment by removing the comment tags which are
<!-- and -->) - one is almost at the beginning of the file, starting and ending with the tag
<servlet> - one is rather at the end of the file, starting and ending with the tag
<servlet-mapping> - after closing and saving the file try to start GSN again and visiting above mentioned
The web service interface uses SOAP 1.2 for invoking methods.
You have to send a soap envelope with the parameters to the respective service address such as http://localhost:22001/services/listVirtualSensorNames.
There are various existing libraries for easily creating your own web service clients.
For a detailed description of the possible web service calls use the standard GSN Web Service reference for the standard GSN Web Service]
This paragraph is a short developer documentation. Usual GSN users can safely ignore it.
In order to change the standard web service
- change the WSDL at
webservices/standard/META-INF/GSNWebService.wsdlto your needs - from the
build.xmlin the root directory run the ant taskdev-ws-wsdl2java - from the
build.xmlin the root directory run the ant taskdev-ws-package - the new ws package should have been generated at
webservices/standard/GSNWebService.aar - copy the file
GSNWebService.aartowebapp/WEB-INF/services/GSNWebService.aar - run GSN; the new WSDL should be published at
http://localhost:22001/services/GSNWebService?wsdl - optional: you may run the ant task "clean" from
standard/build.xmlto clean the source tree from non-necessary files