From recent discussions I had with various people I recognized a confusion of two different types of data connections that can be used with Interactive Forms. I want to discuss XML Schema-based and WSDL-based Data Connections and how they are related to each other since calling web services from an Interactive Form became more and more popular. If you plan to implement a scenario that uses both types of data connections you should know the differences to avoid unexpected results.
Let’s start with XML Schema-based data connections.
Behind the scenes of every interactive PDF-Form there is exactly one XML data structure. The data description is defined by either an XML Schema data connection or a Sample XML data connection. And because there is exactly one data structure you can only define one such data connection (i.e. the options are greyed out if you try to add additional data connections). Sample XML data connections are not used in the SAP context since all frameworks that integrate Interactive Forms provide XML schemas. XML Schemas provide more information like min or max occurrence of data nodes which is leveraged by Adobe LC Designer.
The data binding (on the “Bindings” tab of the object inspector in Designer) defines the binding of a form field to a data node. The binding describes where the value of a form field is stored in the underlying XML data structure (i.e. using the XML Schema/Sample XML data connection).
And this is what’s behind WSDL-based data connections.
WSDL-based data connections are used during runtime when a web service is called. The WSDL-based data connection describes the structure of the request and the response that is created for/received from a web service call. These are temporary data structures that are not related to the underlying XML data structure of the Interactive From.
There are additional fields on the “Binding” tab called “Import/Export bindings (Execute)”. These are used to bind form fields to the structure of the request/response for a web service call.
You also might have noticed that while you can define only one binding to a XML Schema data connection you can have multiple bindings to WSDL-based data connections. You can even use the result of a web service call (i.e. an import binding) as a parameter in the request for another web service call (i.e. export binding).
Now, we can look at the two types of data connections together.
It is good practice that every form is based on either a XML Schema-based or Sample XML-based data description. If you do not use such a data connection you might wonder what the data structure looks like if the data is extracted on the server or you submit only the data structure (e.g. via email). In this case the data structure is derived from the form design (e.g. from the form hierarchy if “normal” binding is used).
I want to note that the data structure is not derived from the WSDL data connection even if there is no XML Schema/Sample XML data connection.
Additionally, multiple WSDL-based data connections (even based on the same WSDL) can be used to call several web service from the Interactive Form.