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.
- broken link
2005-10-12 14:52:59 alanbatie - Files from Article
2002-02-11 16:20:31 Bill Humphries - Files from Article
2003-09-01 09:49:31 Scott Castillo - Re: Find Command
2001-12-31 18:44:01 Bill Humphries - Find command
2001-10-30 07:16:26 Mike Green - Two Corrections
2001-10-22 20:44:19 Bill Humphries