Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We are trying to deploy a Business Connectivity Services(BCS) Model solution where the properties in the model depend on the structure of the data exposed by a web service.

Ideally the BCS Model would expose a collection of key/value pairs which are then converted to columns in a sharepoint list later as this would mean that the same model could be used for several different datasets, however from what we can tell this is not how BCS Models have been designed, as they rely on the model to be strongly typed in order to reflect the entity being imported.

As it stands we are therefore looking at a solution which enables the user to "create" a new external list by providing the url to a remote dataset through a custom page in sharepoint central admin, that will then automatically construct the BCS Model project (by altering a project template) and then compiling and releasing the resulting feature on the fly.

This way we can create the "fixed" class with properties that represent the structure of the data being imported.

for example, datasource A could expose

<cars>
<car>
<color>blue</color>
<make>ford</make>
</car>
<car>
<color>red</color>
<make>lotus</make>
</car>
</cars>

in which case we need a BCS Model for "car" which has two public properties , color and make however datasource B could expose

<invoices>
<invoice>
<amount>£34.00</amount>
</invoice>
<invoice>
<amount>£34.00</amount>
</invoice>
</invoices>

in which case we need a BCS Model "invoice" with a single public property for amount.

Would appreciate anyones feedback on this approach or the 'best practice' way of achieving this.

share|improve this question

2 Answers 2

You will need to build a custom BCS connector to achieve this, as opposed to a ".NET" connector. This is the approach to use where the back-end system is not static. There is a comparison between the two types of VS2010 connector on MSDN. Whilst this is the general approach you might use, what you are trying to achieve will require a considerable amount of development work to make a connector versatile enough for what you are trying to achieve.

This blog article might be useful.

share|improve this answer

I would say that many are chasing this bonanza as the complexities are way too many (connections, authentication, via secure store or not, and nevertheless the complex entities, associations, etc.), however I would dare consider using rather a WCF based approach where you could propose set of "available entities" which could already be created as definitions beforehand, and using some kind of REST approach you could return XML definitions which could be used directly in Page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.