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.
Follow these steps to get started:
1. Download Haploo Listener Package
- Within your haploo account management portal, go to the downloads menu.
- Download the HaplooListener.war package on to your FileMaker Server. (Windows Server Support Only)
2. Copy the Package to FMS Publishing Engine
-
Copy this WAR file into your Web Publishing Engine to deploy this service.
Destination FolderC:\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 -
Login to your FileMaker Server 18 Admin Console to check / change a couple of settings.
A. Enable ODBC / JDBC Connections
B. Enable Web Publishing Engine ( WebDirect Can Be On or Off)
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
- 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.
- 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}"
- 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
- You should see some output in the blue powershell execution workspace the confirms the above powershell script did complete. (Should Complete in Seconds).
- You can now close this window / application
B. Creating IIS Rewrite Rule with the IIS GUI
-
Using Windows / Cortona Search look for a program named: IIS Manager
-
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
-
Now that FMWebSite is Highlighted, Select the URL Rewrite module for FMWebSite.
-
While inside the URL Rewrite module in the Actions panel, select Add Rule(s) to start constructing a new rewrite url rule.
-
Now select Blank Rule as the rule type to begin. Complete the newly presented form like so:
As for the conditions section be sure Match Any is selected under Logical Grouping.
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!
- 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
- 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