Handling HTTP requests with InboundAdapter
Hi Guys,
I currently have a service that uses an InboundAdapter to get a JSON file and process it given that the client is pushing data to us, but now we have another client where we need to request the JSON file by sending a HTTP request then get the file and process it, kind of a Get rather than push, how can I create a service that handle that?
Thanks
Product version: Ensemble 2014.1
While technically this could be written using a custom class extending Ens.BusinessService, what you describe has you playing the 'Operation' role more than the 'Service' role. We do this with many integrations and have a design pattern that works well for us.
In short, you need:
You appear to be on a very old version of Ensemble so not sure how much recent documentation will be relevant to your use case and you likely will face a lot more difficultly using Ensemble 2014.1 than you would with something 2019.x or newer, but here's a few reference links to get the thought processes going:
Using the HTTP Outbound Adapter | Using HTTP Adapters in Productions | InterSystems IRIS for Health 2021.2
Creating REST Operations in Productions | Using REST Services and Operations in Productions | InterSystems IRIS for Health 2021.2