AnsweredAssumed Answered

Importing XML after HTTP request

Question asked by BruceHolmes on Mar 17, 2010
Latest reply on Mar 25, 2010 by BruceHolmes

Title

Importing XML after HTTP request

Post

I'm using FileMaker Pro 9 Advanced on a Mac OS X, 10.5.8.

I want to send an http request to the post office servers and get in response a zip+4.  They have well established systems for doing this.

On the "importing XML data" page in the help system it says:

"The XML can be the result of an HTTP request sent to a web server. For example, you could set up an Orders database to send tracking numbers to a package delivery company in the form of an HTTP request, and their web server could return the latest package tracking information in XML format, ready to be imported into the Orders database."

So my heart started beating fast.  All was possible.

Hours later my head is spinning and I haven't a clue.  I can find nothing about how to do this.  It's possible I'm just too new to FMP to understand that the solution is right before me, but as far as I can tell I haven't found anything that seems even closely related.

The post office uses a test that looks like this:

Sending:

http://SERVERNAME/ShippingAPITest.dll?API=Verify&XML=<AddressValidateRequest%20USERID="xxxxxxx"><Address ID="0"><Address1></Address1>

<Address2>6406 Ivy Lane</Address2><City>Greenbelt</City><State>MD</State>

<Zip5></Zip5><Zip4></Zip4></Address></AddressValidateRequest>

 

Expect back:

<?xml version="1.0"?>

<AddressValidateResponse>

<Address ID="0">

<Address2>6406 IVY LN</Address2>

<City>GREENBELT</City>

<State>MD</State>

<Zip5>20770</Zip5>

<Zip4>1441</Zip4>

</Address>

</AddressValidateResponse>

 

So the question is, how do I write a script, and what script steps do I use in order to talk to the post office?  My first guess is to use "Open Url" to send the http request.  But then what?  And how does FMPXMLRESULT fit in to all this?  I doesn't seem to be a script step.

Bruce

Outcomes