Chuck Posted April 1, 2009 Posted April 1, 2009 I have a script that downloads, via FTP using the SmartPill PHP plugin, a set of XML files. I've written an XSLT stylesheet to transform this into the FMPXMLRESULT XML that FileMaker expects when importing an XML file. If I have downloaded the file and import it manually it works. If I have the SmartPill PHP plugin download the file (saving it to /private/tmp/ on Mac OS X Leopard with FileMaker 10, BTW), it imports successfully. However, when I try to import the file within a script, the Import script step gives the following error: "XML Parsing error: An exception occured! Type:SMLPlatformException, Message, Could not open file: filemac:/Half Dome/private/tmp/3660.xml, Line Number: 0, Column Number: 0" Again, going to the exact same file manually and importing it and using the exact same XSLT stylesheet is successful. Any suggestions? Thanks, Chuck
Chuck Posted April 10, 2009 Author Posted April 10, 2009 Well, this seems to be a first. No one knows anything? Perhaps some additional information will help. First of all, the file path of the Import Records script step is set via a variable. Second, if I create a different script an include an Import Records step and manually select the file rather than have it be set with a variable, no error occurs. It imports successfully. Given those two facts, I may simply download via FTP, name the file to some known name, and see if that works, but it seems like a workaround rather than a solution.
comment Posted April 10, 2009 Posted April 10, 2009 What happens if you try downloading to, and importing from, the desktop instead of the temp folder?
Chuck Posted April 10, 2009 Author Posted April 10, 2009 Well, I did try my home folder rather than the tmp folder, and the result was the same.
comment Posted April 10, 2009 Posted April 10, 2009 Well, I don't know. I would run more tests trying to eliminate possible causes, but it's hard to do that by posts. I don't know where your stylesheet is, and how you point at it, for example - and that too could be a factor.
CRoberts Posted May 21, 2009 Posted May 21, 2009 Hi Chuck I have come across the same problem and noticed something after scratching my head for a day that will hopefully shed some light. I use plug-in for listing files in folder and then processing each XML file contained. If I write script that specifies "File" to be used and prompt for comfirmation - rather than no prompt - and select a file, then it applies XSLT and imports data. However, if I specify the field via "Calculation" then it doesn't. It appears to expect a HTTP Request from that Calculation and not just text, although it says that the calculation is either HTTP Request or File. I have written many scripts to check the file exists and it is the same path as a manually selected file, so I can only surmise either: 1. Undocumented (or missed documentation) syntax for Calculation for file 2. There's a bug in there. Please can someone help. I'm stuck otherwise.
Jonas Mächler Posted June 9, 2009 Posted June 9, 2009 I have the same problem there, a happy note saying XML-Parsing-Error: An exeption occured! Type:XMLPlatformException, Message:Could not Open File "POST HTTP://..." LineNumber 0 Column Number 0 but as you see from the Message, I'm trying to use it with a HTTP-Request (which is tested and working!) and I'm not using any Plug-Ins (I'm against it ) But Filemaker doesn't even try to connect to the Server provided in the HTTP-Request. Has anyone ever had success with such a HTTP-Request?? Or am I getting something completely wrong? (I am trying to send a SOAP-(HTML)-Request to a webservice from which the response is transformed with a existing xslt and imported to FM)
comment Posted June 9, 2009 Posted June 9, 2009 AFAIK, you can only use a GET request (in the form of a URL), not POST.
Jonas Mächler Posted June 9, 2009 Posted June 9, 2009 Oh.... It would have been too nice... I was already suspicious, because I've never read about somebody interacting between FM and SOAP like this, now I know why... But a local php will help. I'd say to call that field "HTTP-Request" is a bit exaggerated by our dear friends @ FileMaker's But thank's Comment you've helped me saving a lot of time!!
comment Posted June 9, 2009 Posted June 9, 2009 Well it IS a HTPP request - one kind out of many. Mind you, I don't KNOW for sure that it cannot take a POST request - but if it does, I haven't been able to figure out in what form. These things are completely undocumented. I suggest you submit a feature request to FMI. They have neglected the XML aspect ever since it came out, and the more people complain about this, the higher priority it will get: http://www.filemaker.com/company/feature_request.html http://forum-en.filemaker.com/fm/board?board.id=fdbk2
Recommended Posts
This topic is 5646 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now