The FMS Haploo Listener Service (For Pulling)

Prev Next

Summary: This article will show you how to equip your FileMaker Server 18 to LISTEN (Pull) data from Haploo Cloud Servers. After successful completion of this article your FMS will be pulling (you'll use other plugins for posting) data from your sync / replication data infrastructure.

FMS Availability
In order to use this Haploo Feature, you must ensure your FileMaker Server's Webdirect or Admin Console is reachable from the world wide web. This involves topics like opening ports on your firewall, using custom domain names, setting up SSL certificates for encryption, and other common web hosting tasks. We do not cover these topics.
Make a Server Backup
This installation is relatively an easy process that proposes little risk. But making a backup is always a great idea before implementing any server changes or installations

Follow these steps to get started:

1. Download Haploo Listener Package

  1. Within your haploo account management portal, go to the downloads menu.
  2. Download the HaplooListener.war package on to your FileMaker Server. (Windows Server Support Only)

2. Copy the Package to FMS Publishing Engine

  1. Copy this WAR file into your Web Publishing Engine to deploy this service.

    Destination Folder
    C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\jwpc-tomcat\
    In some cases, you may need to restart the FMS Service or the Windows Server
  2. Login to your FileMaker Server 18 Admin Console to check / change a couple of settings.
    A. Enable ODBC / JDBC Connections
    image.png

B. Enable Web Publishing Engine ( WebDirect Can Be On or Off)
image.png

C. Ensure the FileMaker Solution User Account that Haploo uses to post into your FMS Hosted File has the ODBC/JDBC extended priviledges enabled. This account needs to be able to modifiy, insert, and delete records.

3. Add Web Route to IIS for New Service

There are a few different ways of accomplishing this step. We will review two of them.

A. Programically Creating IIS Rewrite Rule with Powershell

  1. Using Windows Cortona Search look for a program named: Windows Powershell ISE. Run this program as an Admin user by Right-Clicking the application in the search results. Then select Run as Administrator.
  2. Paste the following code (script) into the white powershell workspace.
$site = "iis:\sites\FMWebSite"
$filterRoot = "system.webServer/rewrite/rules/rule[@name='RestfulAPI$_']"

Clear-WebConfiguration -pspath $site -filter $filterRoot
Add-WebConfigurationProperty -pspath $site -filter "system.webServer/rewrite/rules" -name "." -value @{name='RestfulAPI' + $_ ;patternSyntax='Regular Expressions';stopProcessing='False'}
Set-WebConfigurationProperty -pspath $site -filter "$filterRoot/match" -name "url" -value "^link/(.*)"
Set-WebConfigurationProperty -pspath $site -filter "$filterRoot/conditions" -name "logicalGrouping" -value "MatchAny"
Set-WebConfigurationProperty -pspath $site -filter "$filterRoot/action" -name "type" -value "Rewrite"
Set-WebConfigurationProperty -pspath $site -filter "$filterRoot/action" -name "url" -value "http://127.0.0.1:16020/link/{R:1}" 

  1. Now that you've pasted this code above into the white editor space. Execute the script by clicking the green play arrow or by pressing F5
  2. You should see some output in the blue powershell execution workspace the confirms the above powershell script did complete. (Should Complete in Seconds).
  3. You can now close this window / application

B. Creating IIS Rewrite Rule with the IIS GUI

  1. Using Windows / Cortona Search look for a program named: IIS Manager
    image.png

  2. After launching this application, use the connection panel on the left side of the application to expand the sites folder to reveal the FMWebSite site object. Left Click this Object

  3. Now that FMWebSite is Highlighted, Select the URL Rewrite module for FMWebSite.
    image.png

  4. While inside the URL Rewrite module in the Actions panel, select Add Rule(s) to start constructing a new rewrite url rule.

  5. Now select Blank Rule as the rule type to begin. Complete the newly presented form like so:
    image.png

As for the conditions section be sure Match Any is selected under Logical Grouping.
image.png

The most important input for this re-write rule is the actual Rewrite URL (Use Mustache Brackets for R:1):

http://127.0.0.1:16020/link/{R:1}

6.Now, go back to the rules list and move this new rule named RestfulAPI to the top of the rules list by using the actions panel to the right and the Move Up button.

4. Last Step! Testing the Listener Service!

SSL Required
Your IIS Webservice must be using SSL over 443.
  1. Perform a LAN side test to ensure the installation worked. Open a web browser on your FMS and navigate to this url.
https://localhost/link/service/message/ping
  1. If the first test was successful, performan a WAN side test to ensure your firewall and server are ported to the web correctly. Haploo services's must be able to reach your FMS Listener from the internet. We recommend running this test from your iPhone or iPad on a celluar network. Do not run this on the FMS or on the LAN where the FMS resides.
  https://mydomain.com/link/service/message/ping