Here is my scenario..
I have created a BDC model project in VS2010 for deployment in SharePoint2010. I have added a service reference to a WCF service that we have running on another system. I want my ReadList method to call the WCF service on the other system to pull data to be shown in the list.
I have created a unit test for the ReadList method to verify it works before deploying. The error message that I get is "Could not find default endpoint element that references contract 'TicketsWCF.ITickets' in the ServiceModel client configuration section."
When I add the service reference an app.config is added to the project which appears to have everything that I need for the service to run.
My two questions are
Has anyone gotten a WCF service to a non-sharepoint external system working with BDC
When the model is deployed will the app.config settings get appropriately placed within the sharepoint system?
Unfortunately, I haven't found a way to use an app config file in this case. One way around that is to define your endpoint in code, and possibly save the endpoint address in the farm property bag. Note that you will have to add a Reference to System.ServiceModel.
Then, making calls to your WCF service would be something similar to: