Appendix C. Connecting to data sources with web services
Using web services allows you to connect to just about any data source, as you can create the connection from within your web methods and expose the data. This is great for data sources that don’t have a direct way of connecting to them, and perhaps rely on ODBC. Also, web services can help you get around certain issues, such as BDC not offering any support for Oracle stored procedures.
In this appendix, we’ll explore how to author your own WCF web services to provide the data in a format that works well with the Business Data Catalog. It’s sometimes assumed that, because an application exposes data via web services, you can consume those web services with the Business Data Catalog. Often that’s not the case, as we’ve seen with SAP. The web services really need to provide the data in a format that’s acceptable and works well with BDC.
Of course, you don’t have to write your web service as a WCF, but this is generally becoming useful, as you can pass your data securely using WCF, and you can use multiple end points, giving you additional options for protocols and transports. If you’re unfamiliar with WCF, there’s a useful article available on the MSDN: http://msdn.microsoft.com/en-us/library/ms731082.aspx.
Web services that you create should have three methods for each entity that you want to connect to. These correspond to:
- Finder method
- Specific finder method
- ID enumerator