Hi Bill,
You are describing a typical system integration scenario that can be solved in numerous way depending on your scenario details. I will try to give you some options:
- Create 2 web services (Plain WCF or WCF Data Services) one for Site A and one for Site B. Call both services when applying an operation on your business objects in your web form. This scenario should be used in case the operations are independent from each other both in time and in data consistency.
- Create 3 web services (Plain WCF and 2 Data services for example). One service for Site A, one for Site B and one integration service that will call Service A and Service B, wrap them in transaction and provide any necessary validation or synchronization logic. You can host the integration service in either sites or even in a new dedicated site. Your client should call the integration service and should not know that Service A and B exist at all. My personal choice will be this option even if it has a bit of overhead because of creation of an additional service.
- Create 2 web services (Plain or Data WCF services). Consider one of you web application the parent (lets say Site A is parent). Create one service for Site A and one for Site B. Call Service B in the implementation of Service A. Put there your validation, synchronization and transaction logic. In you client application call Service A only. This option is similar to option 2, but leaves the web site B as a sub-system of Site A. So any changes made to Site A will most probably affect Site B too.
The easiest way to get a working service client code in to use Add Service Reference tool in Visual Studio. It will generated the necessary code to consume the service and get you running.
Regarding your question which type of service to use I would suggest that you use Plain WCF or WCF Data Service except if your client requires special protocol (like JSON or Rest). RIA services are great for Silverlight applications. If you want to use URL encoded parameters and HTTP protocol you can use WCF DataServices which lays on top of OData protocol implementation and offer great flexibility and rich client support.
Regards,
Viktor Zhivkov
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the
new stuff.