We are trying to deploy a business connection model (BCS) solution in which the properties of the model depend on the data structure exposed by the web service.
Ideally, the BCS model will provide a collection of key / value pairs, which will then be converted to columns in the sharepoint list later, as this will mean that the same model can be used for several different data sets, however, from what we can say about This is not the case as the BCS models were designed, because they rely on a model that will be strongly typed to reflect the imported object.
So, we are considering a solution that allows the user to “create” a new external list by providing the URL to the remote dataset via a user page in the central sharepoint admin center, which will then automatically build the BCS model of the project (by changing the project template) and then compile and releasing the resulting function on the fly.
In this way, we can create a “fixed” class with properties that represent the structure of the imported data.
For example, data source A can set
<cars> <car> <color>blue</color> <make>ford</make> </car> <car> <color>red</color> <make>lotus</make> </car> </cars>
in this case, we need a BCS model for the "car", which has two public properties, color and make however data source B can set
<invoices> <invoice> <amount>£34.00</amount> </invoice> <invoice> <amount>£34.00</amount> </invoice> </invoices>
in this case, we need a BCS invoice model with a single public property for the amount.
Thank you for any feedback on this approach or “best practice” for achieving this.