Expand my Community achievements bar.

Populating Drop Down List Items via Web Service

Avatar

Former Community Member
We have version 8.2 of LiveCycle and are trying to populate a drop down list of values via a web service. We have successfully build a web service in WorkBench that will query a database for unique values in a particular Oracle database table. Those values are required to populate the drop down list in the form. We're having a problem figuring out the approach and best practice.



The web service was created by using the "Query Multiple to XML" activity. The properties tab of the activity require the following:



b Root Element Name



b Repeating element Name



b Column Name Mappings



We have used "form1" as the root element name and "test" as the repeating element name because those are the xml structure of the PDF form in question. We then mapped the column name from our SQL query to the element name "section" in our column name mappings. Unfortunately, the resulting xml has a repeating element of "test", although that element only appears once in the PDF xml. If we leave the root element name and repeating element names blank, the resulting xml defaults to "root" and "element". Not sure what we are supposed to do in this case?



Then, in the form that we want to call this web service, we add a "data connection" using the WSDL created by our new process. When we create the data connection, I then see the invoke request and invoke response, as well as invoke button in the data view. We dragged the button onto the form and then I enabled dynamic labels in the form. For the target drop down list, I clicked on "List Items" and selected the data connections, then configured the binding. For the binding, I selected invokeResponse->outputXML->document. The problem is that the entire output xml is then entered in the drop down. It does not parse the XML output to populate the drop down.



Questions:

1) How do we do parse the XML for the drop downs?

2) Do we need to create more output variables in our web service that parses the XML into some sort of list format?

3) What are the best practices for populating a drop down list in version 8.2?



Thanks
14 Replies