Hello,
Could you please read through the next few paragraphs and give your advice on how to implement the requirement described below. I created this using K2 Connect and that was easy enough but now I want to achieve the same goal accessing the data through a webservice.
Requirement:
- I want to create a rather simple SmartForm showing the exchange rate between two currencies
- The exchange rates are stored in SAP and they only convert 'foreign' currencies to the same baseline currency: EUR
- So if we want to retrieve the exchange rate between two 'foreign' currencies we have to retrieve the two intermediate exchange rates via a webservice made available by SAP and then combine them into the final exchange rate: GBPtoUSD = GBPtoEUR / USDtoEUR
Using the "Endpoints WCF" ServiceObject I can access the data however the way I see it now I would need to create a SmartObject method doing loads of sequential calls:
- Serialize ExchangeRateInputObject1 (GBPtoEUR) and store the result in a smartObject property
- Access the webservice using the object and store the result in a smartObject property
- Deserialize the ExchangeRateOutputObject1 (GBPtoEUR) and store the result in a smartObject property
- Serialize ExchangeRateInputObject2 (USDtoEUR) and store the result in a smartObject property
- Access the webservice using the object and store the result in a smartObject property
- Deserialize the ExchangeRateOutputObject2 (USDtoEUR) and store the result in a smartObject property
- Call a ServiceObject method that calculates the final rate and store the result in a smartObject property
This required the creation of an additional 'calculation' serviceObject, a bunch of 'storage' smartObject properties and doesn't feel like a very good solution. Ideally I would like to be able to encapsulate all those operations into a single method call having no impact on the SmartObject structure.