FileMaker
Back to Phone Notify!
Contents |
Consuming a Web Service from FileMaker project
Introduction
In this article we will show how to consume Phone Notify! web service in a FileMaker project. In this demonstration we will be using Web Services Plug-in for FileMaker from FM Nexus. We will also be using the Windows version of the application and the plug-in. There is also Mac OS X version of the plug-in available for FileMaker on Mac.
Requirements
Installing the Plug-in
Please follow the instructions provided with the Plug-in on how to install it. In our case all we have to do is to copy the wsdl folder and WinFmNexWeb.fmx file into the FileMaker Extensions folder (C:\Program Files\FileMaker\FileMaker Pro 9\Extensions):
Obtaining WSDL for CDYNE Phone Notify! Web Service
After you have successfully installed the plug-in you have to provide the Phone Notify! WSDL file. The Plug-in wsdl folder mentioned above is the location for web services wsdl files. Lets get the CDYNE Phone Notify! wsdl file:
- Go to CDYNE Developers section
- Right click get WSDL link and choose "Save target as...".
- Navigate to the wsdl folder ((C:\Program Files\FileMaker\FileMaker Pro 9\Extensions\wsdl), change the extension to .wsdl and save the wsdl file.
Creating FileMaker project
At this point we are ready to work on our FileMaker project.
- Start the FileMaker application and create a new empty database. We named our project Notify.
- Add following fields for the default table which has the same name as your project.
Phone - phone number, to be dialed TextToSay - text for TTS StatusCode - returned status code StatusText - description of the returned status code QueueID - returned queue id, unique identifier of the transaction
- Create a new "Table view" layout for the Notify table
- Select all the fields into the layout
- In layout mode put a button into the header part of the layout. Make sure the layout setup dialog header is shown.
Creating Script
Open the script manager and create a new script. Use the following steps in your script

All the steps above are prety much self-explanatory. We are using NotifyPhoneEnglishBasic method of the service in this project. Third parameter of the method is a license key, use your valid license key or "0" for a pre-recorded demo.
The location of all web methods is under the External functions category from the "View" dropdown control

The Web Services Plug-in in our installation returns response of a web method call as a list of strings. (There is a setting for the plug-in which will revert default behaviour and will return the result as a xml string). For this particular web method the typical return will look like this:
START_RECORD=NotifyPhoneEnglishBasicResult 0 Queued false 4775070 0 false 0 0001-01-01T00:00:00 0001-01-01T00:00:00 0 false END_RECORD
For the description of each field please refer to the Web Service description file. We are using the built-in GetValue function to get a text item from a list of items. We will store each value in our table by using built-in "Set Field" function.
Testing the service
At this point we are ready to test our script. Assign the script to the button we created earlier.
- Add a few test records to the Notify table
- Make calls by clicking the "Call" button
You can use the returned QueueID later to obtain the status of a call using the GetQueueIDStatus method of the Web Service. In this example we have used a very simple method of the Web Service. CDYNE Phone Notify! Web Service has advanced scripting commands that can be used in place of direct text. These commands allow you to build rich interactive phone dialogs, collect user input and much more.







