XFA Specification
Chapter 11, Forms That Initiate Interactions with Servers
Invoking ADO APIs Through the Source Set DOM
341
After the data has been copied from the Connection Data DOM to the Form DOM and Data DOM the
transaction is complete. At this point the XFA processor clears the Connection Data DOM. This prevents
any possible interference between consecutive web service transactions and simplifies security analysis.
One thing remains to be arranged. There must be some way to trigger the data exchange with the web
service. This can be done using an execute child of event. For example,
<field name="getQuoteBtn" ...>
...
<ui>
<button ... />
</ui>
<event activity="click">
<execute connection="TickerPriceWS"
executeType="import"
runAt="client"/>
</event>
</field>
The field
getQuoteBtn
is a button. When the user clicks on the button, the XFA processor initiates the
web service transaction.
The
execute
element has a
runAt
property which specifies whether the transaction is to be initiated on
the XFA client, on the XFA server, or both. Note that the XFA server is in no way related to the web service
server. The XFA server is the computer that served the template to the XFA client. The web service server
may be located somewhere else and have no knowledge of XFA. Hence,
runAt
does not affect the web
service server. Rather it determines whether the XFA client, the XFA server, or both, may act as a client to
the web service server.
The
execute
element also has an executeType property. This can take the values import and re-merge.
When the value is imported, the XFA processor updates the existing nodes in the Form DOM and Data
DOM with the values from the Connection Data DOM. However if the value is re-merged, the existing
nodes are not updated in place. Instead the Form DOM is cleared and a fresh merge operation is
performed between the Template DOM and both the Connection Data DOM and the Data DOM. In this
merge operation, as the template is traversed, candidate data for binding is sought not only in the Data
DOM but also in the Connection Data DOM. If suitable data is found in the Connection Data DOM, it is
appended to the Data DOM. The result is that, if data from the Connection Data DOM can be appended
the Data DOM and bound to the Form DOM, it is. But any data in the Connection Data DOM that does not
match suitable template structure remains un-copied and is lost when the Connection Data DOM is
cleared. The re-merge operation has the advantage that the output message can include dynamic
structure (optional elements or variable numbers of occurrences of elements) and the form adapts just as
it would to dynamic structure in an ordinary data document. However many web services produce output
messages with static structures which are more efficiently processed using import.
Schema and WSDL
Note:
Information on this topic will be provided in a later release of this specification.
Invoking ADO APIs Through the Source Set DOM
The Source Set DOM is used to control interactions with a source of sink of information via the ActiveX®
Data Object (ADO) interface. Usually ADO is used to access databases, however it is sometimes used for
other purposes. XFA’s implementation of the API is strongly oriented to data base access.
Home Index Bookmark Pages
Pages: Home Index All Pages