Web Notification Service 2.1.x


ALERT!This is an extract of the (older) WNS installation guide. The old one remain as reference but may be outdated, e.g. build process. If something is unclear or seems to be missing, refer to this document first. For further questions consult the Sensor Web mailinglist.

Pre-Requirements

Setup eXist database

  • Download the eXist database. The linked revision is essential for deploying the WNS under 64bit systems!
  • Rename the exist-1.4.3-rev17131.war to exist.war to keep configuration simpler
  • Deploy exist.war file to your servlet container and open http://localhost:8080/exist/webstart/exist.jnlp to open exist's web management tool. Note the connection string (needed during database configuration) and login to the database (keep password blank for the first time you login).
  • Create/Change user permissions as needed

Installation Steps

Pre-Build Version

You can download the latest release build from the 52°North download section. Copy the bin/52n-wns-2.1.x.war file into the webapps folder of your servlet instance (e.g. Apache Tomcat). Stop the web archive after the servlet container has deployed it. Proceed with WNS_v2_1_x of the web application.

Build from source

  1. Checkout the latest version from Subversion trunk. Be aware that this is the main development line and may be unstable. Stable releases have been tagged and should be preferred for build:
    svn co https://svn.52north.org/svn/swe/main/WNS/Service/tags/52n-wns-2.1.1/ 52n-wns-2.1.1
    
  2. Copy wns_v2-build-example.properties to ${user.home}/wns_v2-build-dev.properties and adjust the properties to align your needs
  3. Build via Maven mvn clean install -P env-dev
  4. Copy the target/52n-wns-2.1.x.war file to the webapps folder of your servlet container, e.g. Apache Tomcat. Proceed with WNS_v2_1_x of the web application.

Configuration

Main Configuration

The 52n-wns-2.1.x/WEB-INF/classes/config.xml file contains all the necessary information the WNS needs. This means that you setup all the needed services, e.g. the email server. If there is a handler that you will not use, just delete it or comment it out! Edit the 52n-wns-2.1.x/WEB-INF/classes/config.xml with your XML editor, a normal text editor will work also.

Message (Transport) Handlers

Registered handlers are service as communication channels to transport messages via a specific protocol. Search for the element <RegisteredHandlers>.

EMailHandler
The email handler is the major part of the WNS, because mainly the complete communication is done via email. If a SMS, FAX or PHONE protocol is used an email will be send to Ecall.ch
Property Description Need to configure to Your own values?
Host The host address of the SMTP server, e.g. smtp.gmx.de YES
User The username for the email account YES
Passwd The password for the user YES
Sender The complete email address, e.g. user@52north.org YES
Authenticate Does the server needs an authentication before sending a email, also known as “pop before send” or “pop auth”. Valid values are true or false. YES
Port The port the SMTP server uses, default 25. If you use SSL the default port is 465. YES
EmailSubject A string that represents the subject of each email. Not necessarily
SSL Should the server connect via SSL? Valid values are true or false YES
TLS Should the server try to connect via TLS if it is a non SSL connection? Valid values are true or false. YES

XMPPHandler
If you don’t want to use the XMPPHandler function comment it out or delete the element in the config.xml!
Property Description Need to configure to Your own values?
Provider The name of the xmpp class to use for XMPP message sending NO
User The username that you have registered at the provider stated in Host YES
Passwd The password for the user YES
Host The hostname of the XMPP server, where the user is registered, e.g. jabber.org. YES
Port The port of the XMPP server, default 5222 Not necessarily
SMSHandler
Be sure that the EMailHandler is setup properly. To use the Ecall.ch service you have to configure the Ecall.ch account settings. Login to your Ecall.ch account or even register a new one. Click on the link “Email access” in the section “Account settings”. Insert the email address of the element <sender> from the <MailHandler> element in the field “Allowed sender addresses” under the “Format 4: Numbers in ‘TO:’ field” section. Check at the top of the page that you accept messages that can be sent by email. Be sure that you have at least a private ecall account; this SMSHandler will not work with a free ecall account.

If you don’t want to use the SMSHandler function comment it out or delete the entry in the config.xml!
Property Description Need to configure to Your own values?
Provider The full name of the class, e.g. org.n52.wns.sms.SMSHandlerEcall NO
User The username (optional, maybe needed for other service provider) NO
Passwd The password for the user (optional, maybe needed for other service provider) NO
Host The address where the WNS has to send the email to, default msg.ecall.ch. NO

The WNS will concat the phone number to this host address, so an email would be send to +491791234567@message.ecall.ch
PhoneHandler
Be sure that the EMailHandler is setup properly. To use the Ecall.ch service you have to configure the ecall.ch account settings. Login to your Ecall.ch account or even register a new one. Click on the link “Email access” in the section “Account settings”. Insert the email address of the element <sender> from the <MailHandler> element in the field “Allowed sender addresses” under the “Format 7” section. Check at the top of the page that you accept messages that can be sent by email. Be sure that you have at least a private ecall account; this SMSHandler will not work with a free ecall account.

If you don’t want to use the PhoneHandler function comment it out or delete the entry in the config.xml!
Property Description Need to configure to Your own values?
Provider The full name of the class, e.g. org.n52.wns.communication.PhoneHandlerEcall NO
User The username (optional, maybe needed for other service provider) NO
Passwd The password for the user (optional, maybe needed for other service provider) NO
Host The address where the WNS has to send the email, default voice.ecall.ch. NO


The WNS will concat the phone number to this host address, so an email would be send to +492518330089@voice.ecall.ch
FaxHandler
Be sure that the EMailHandler is setup properly. To use the Ecall.ch service you have to configure the ecall.ch account settings. Login to your Ecall.ch account or even register a new one. Click on the link “Email access” in the section “Account settings”. Insert the email address of the element <sender> from the <MailHandler> element in the field “Allowed sender addresses” under the “Format 6” section. Check at the top of the page that you accept messages that can be sent by email. Be sure that you have at least a private ecall account; this SMSHandler will not work with a free ecall account.

If you don’t want to use the FAXHandler function comment it out or delete the entry in the config.xml!
Property Description Need to configure to Your own values?
Provider The full name of the class, e.g. org.n52.wns.communication.FaxHandlerEcall NO
User The username (optional, maybe needed for other service provider) NO
Passwd The password for the user (optional, maybe needed for other service provider) NO
Host The address where the WNS has to send the email, default fax.ecall.ch. NO


The WNS will concat the phone number to this host address, so an email would be send to +492518339763@fax.ecall.ch

Database Settings

Note: Not needed if you have adjusted the properties in a pre-build step and build via Maven (see WNS_v2_1_x).

Search for the element <DataBaseProperties>.
Property Description Need to configure to Your own values?
DBName Name of the database to connect to YES
user The user allowed to connect to the database YES
password The user's password needed for authentication YES
URL Full qualified JDBC connection string, e.g. xmldb:exist://localhost:8080/exist/xmlrpc/db/ YES
checkDBDuration Duration (in minutes) of cleanup thread removing expired messages YES

Capabilities Settings

Note: Not needed if you have adjusted the properties in a pre-build step and build via Maven (see WNS_v2_1_x).

Search for the element lt;CapabilitiesbaseInformation>.
Property Description Need to configure to Your own values?
ServiceIdentification Adjust the metadata settings to your needs OPTIONAL
ServiceProvider Adjust the metadata settings to your needs OPTIONAL
Operation Assign to the href attribute the URL from where the operation shall be available, e.g. http://localhost:8080/52n-wns-2.1.1/wns YES
Topic revision: r2 - 05 Apr 2016, EikeJuerrens
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback