Hello Community,
Suppose I have a "BusinessPartner" SmartObject with data stored in multiple back-end systems but I want to be able to deliver the data to the SmartObject in a uniform fashion no matter where the data is stored and in what format.
Example ListBusinessPartnerAddresses(businessPartnerID, out addresses)
The reason for this is that I want the SmartObject to be loosely coupled to its data sources, so that when the data is migrated to another source I just have to create a new ListBusinessPartnerAddresses method in the ServiceObject for that data source and update the reference in the SmartObject.
When data is retrieved from SAP I am able to create a K2 Connect ServiceObject and transform the data retrieved from SAP into my desired format using a custom code function. However when the data is retrieved from a webservice I register a new ServiceInstance in the "SmartObjectTester" I seem to have no control over the methods and seem to be forced into adding the following steps in my SmartObject (and would much rather have these encapsulated in the ServiceObject method)
- Serialize request object
- Call webservice
- Deserialize respons object
- Transform data
So finally my question: Where have I gone wrong or is there no way to do this?