AngeloCit Posted November 27, 2014 Posted November 27, 2014 Hello, my problem is with Filemaker 13 and PHP API i have this code: $request = $fm->newFindCommand($layout); $request->addFindCriterion($name, $request_name); $result = $request->execute(); and error throwing me is: [error_message_prefix] => [mode] => 1 [level] => 1024 => [message] => XML error: Not well-formed (invalid token) at line 1 who can guide me or help with this please...pleaseeee
Wim Decorte Posted November 27, 2014 Posted November 27, 2014 manually create the same URL as the PHP API would do and then inspect the XML returned by FM...
AngeloCit Posted November 27, 2014 Author Posted November 27, 2014 manually create the same URL as the PHP API would do and then inspect the XML returned by FM... sorry, but I do not understand how to do what you tell me, I'm a newbie
Wim Decorte Posted November 27, 2014 Posted November 27, 2014 Look on the FM website for the document named "Custom Web Publishing with XML", it will show how you can construct a URL that is the equivalent of your PHP request. When you use that in a browser, you will get XML back from FM or an error. That way you can inspect both your request and what FMS sends back. From the document a quick example: http://host/fmi/xml/fmresultset.xml?-db=vetclinic&-lay=animals&-query=(q1);(q2);!(q3)&-q1=typeofanimal&-q1.value=Cat&-q2=typeofanimal&-q2.value=Dog&-q3=name&-q3.value=Fluffy&-findquery
AngeloCit Posted November 27, 2014 Author Posted November 27, 2014 Look on the FM website for the document named "Custom Web Publishing with XML", it will show how you can construct a URL that is the equivalent of your PHP request. When you use that in a browser, you will get XML back from FM or an error. That way you can inspect both your request and what FMS sends back. From the document a quick example: http://host/fmi/xml/fmresultset.xml?-db=vetclinic&-lay=animals&-query=(q1);(q2);!(q3)&-q1=typeofanimal&-q1.value=Cat&-q2=typeofanimal&-q2.value=Dog&-q3=name&-q3.value=Fluffy&-findquery This XML file does not appear to have any style information associated with it. The document tree is shown below. this is what returns And the URL is: http://192.168.1.122/fmi/xml/FMPXMLRESULT.xml?-db=BIOPSIAS&-lay=MENU&-max=50&-findall
Wim Decorte Posted November 27, 2014 Posted November 27, 2014 Obviously that link is not available outside your network. Did you intend to include a picture of the document tree? Try the link in a developer-friendly browser like FireFox. Safari for instance sucks at troubleshooting this kind of thing. Also, use fmresultset not the old FMPXMLRESULT grammar 1
AngeloCit Posted November 27, 2014 Author Posted November 27, 2014 Obviously that link is not available outside your network. Did you intend to include a picture of the document tree? Try the link in a developer-friendly browser like FireFox. Safari for instance sucks at troubleshooting this kind of thing. Also, use fmresultset not the old FMPXMLRESULT grammar in google chrome show this: <fmresultset xmlns="http://www.filemaker.com/xml/fmresultset" version="1.0"> <error code="954"/> <product build="04/08/2014" name="FileMaker Web Publishing Engine" version="13.0.2.290"/> <datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/> <metadata/> <resultset count="0" fetch-size="0"/> </fmresultset> in firefox show this: write error XML: element not found ubication: http://192.168.1.122/fmi/xml/fmresultset.xml?-db=BIOPSIAS.fmp12&-lay=LISTADO+M%C3%89DICOS&-max=50&-find line number 1, column 1:
webko Posted November 27, 2014 Posted November 27, 2014 That's actually helpful - FileMaker Error 954: Unsupported XML grammar (returned only by web-published databases) And you may well also have bad characters in your dataset... But with your system on an internal network, there's not a lot of troubleshooting we can do for you
Wim Decorte Posted November 28, 2014 Posted November 28, 2014 write error XML: element not found ubication: http://192.168.1.122/fmi/xml/fmresultset.xml?-db=BIOPSIAS.fmp12&-lay=LISTADO+M%C3%89DICOS&-max=50&-find line number 1, column 1: A couple of things in your request: http://192.168.1.122/fmi/xml/fmresultset.xml?-db=BIOPSIAS.fmp12&-lay=LISTADO+M%C3%89DICOS&-max=50&-find - you do not need to specify the file extension - your layout name contains troublesome characters, stick to a-z, A-Z, 0-9 for all things that you need to touch from externall (layouts, scripts, fields,...) - you did not specify any search criteria, try -findall in that case
beverly Posted November 29, 2014 Posted November 29, 2014 Obviously that link is not available outside your network. Did you intend to include a picture of the document tree? Try the link in a developer-friendly browser like FireFox. Safari for instance sucks at troubleshooting this kind of thing. Also, use fmresultset not the old FMPXMLRESULT grammar If your browser likes to "pretty print" the xml, try viewing the source to get the raw xml returned.
AngeloCit Posted December 1, 2014 Author Posted December 1, 2014 Did not receive an XML document from the server the error change without changing the code im`not understand...
AngeloCit Posted December 5, 2014 Author Posted December 5, 2014 the solution was to put a setRange() in the compound query
Recommended Posts
This topic is 3897 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