Building Web Services with FileMaker Pro
by Bill Humphries
|
Pages: 1, 2, 3, 4
Extending the Client and Server
If it's not critical for the application to deliver the most current version of the phone list, then the getAllRecords function could cache the decoded XML in a file, and only call the XML-RPC server after some expiration value has elapsed.
The XML server could be extended with a method to list the open databases on the FileMaker Pro server.
To request a list of the open databases on the server, request the URL:
http://localhost:471/FMPro?-format=-dso_xml&-dbnames
Adding and Editing Records and XSLT
The fp_xml format contains metadata describing the database, along with results. FileMaker Pro returns this format after adding or editing records.
For example, after adding a new record to the database, FileMaker Pro returns:
<?xml version="1.0"?>
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="04/20/2001"
NAME="FileMaker Pro Web Companion" VERSION="5.5v1"/>
<DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="simple"
NAME="phonelist.fp5" RECORDS="6" TIMEFORMAT="h:mm:ss a"/>
<METADATA>
<FIELD EMPTYOK="NO" MAXREPEAT="1"
NAME="Name" TYPE="TEXT"/>
<FIELD EMPTYOK="NO" MAXREPEAT="1"
NAME="Phone" TYPE="TEXT"/>
<FIELD EMPTYOK="NO" MAXREPEAT="1"
NAME="Location" TYPE="TEXT"/>
</METADATA>
<RESULTSET FOUND="1">
<ROW MODID="0" RECORDID="7">
<COL>
<DATA>Todd Clerical</DATA>
</COL>
<COL>
<DATA>408 999-0000</DATA>
</COL>
<COL>
<DATA>Cupertino</DATA>
</COL>
</ROW>
</RESULTSET>
</FMPXMLRESULT>
This return set is not suited for formatting with PRAX. XSLT, or an XML parser, is better suited here. PHP can provide support for both of these techniques; however XSLT and DOM are not part of the standard PHP build. The virtue of XML-RPC is interoperability, and you could write a client in Java or Visual Basic which exploits the relative ease of integrating XSLT and DOM in those languages.
Share your FileMaker and XML experiences in our forum, or ask a question of the author.
(* You must be a member of XML.com to use this feature.)
Comment on this Article
| Titles Only | Titles Only | Newest First |
- broken link
2005-10-12 14:52:59 alanbatie [Reply]
The link to filemaker's xml-http docs is no longer valid (http://www.filemaker.com/xml/examples.html)
- Files from Article
2002-02-11 16:20:31 Bill Humphries [Reply]
If you need the php files from the article, contact me.
- Files from Article
2003-09-01 09:49:31 Scott Castillo [Reply]
Can't get to the URL to download
PRAX.php
or PRAX.inc ???
Can you assist?
scasti1@cox.net
- Files from Article
- Re: Find Command
2001-12-31 18:44:01 Bill Humphries [Reply]
That's a typo in the URL. Should end with:
Austin&-find
Instead.
- Find command
2001-10-30 07:16:26 Mike Green [Reply]
I followed the article, very useful, but when i used the Location=Austin-find command it showed all records and not just Austin?
Any reason?
- Two Corrections
2001-10-22 20:44:19 Bill Humphries [Reply]
I've been trading emails with Chris Hansen of http://www.iviking.org/ who pointed out a couple of errors of fact.
The standard port for FileMaker web serving is 591, not 471. And there was an incomplete XML capablity in FileMaker Pro 5.0.
Chris is also developing XML/PHP/FileMaker code, so I commend you to his site to learn more.
-- Bill
