Hi guys,
I have previously posted about attempting to use data from a web-script in a form. Originally I planned to attempt to use JSON (as the web script already returned JSON) but it seemed like it was going to be too arduous of a process, so I am trying again using a sample XML style data connection.
I have modified my web script to return xml as well as JSON (depending on URL parameters). I created a sample XML file data connection, using the web address of the web script as the location. It prompts me for authentication (which it accepts when entered) and advises me that the site uses a self signed certificate (which it does, for now). I created a test form (I am using the trial version of Livecycle ES2) and added a drop down box.
In the List Item Bindings for the drop down box I set it up like so:
![screenshot.PNG screenshot.PNG](/t5/image/serverpage/image-id/2958i6A114950742A4876/image-size/large?v=v2&px=999)
The XML looks like:
<response>
<users>
<user>
<name>Chris O'Kelly</name>
<userName>ChrisO</userName>
</user>
<user>
...
</user>
</users>
<filter>status</filter>
<error>0</error>
</response>
If I preview or save and open the form at this point I get a blank drop down. No data.
However, if I go to File>Form Properties>Preview and add the same link to my xml output where it says data file, it works fine in Preview. It displays the list of names EXACTLY as I want it. It still does not, however, when saved and opened.
I also added
xfa.host.importData("path to our xml output", true); to the initialize event of the initialize event of the drop down, to no avail.
Can anyone see what I am missing that is added by a preview data file and not a sample XML data file connection?