Um, not sure I agree that a view model is relevant if acting as a consumer of an external REST API.
Put another way: it's perfectly fine for entities or regular domain services to act as consumers of external REST APIs, too. What I would do is to create a domain service that actually makes the REST call, so that this can be tested in isolation. That domain service can then provide a suitably simplified API for the other domain objects that need info from that service. HTH Dan On 30 March 2015 at 10:44, Martin Grigorov <mgrigo...@apache.org> wrote: > Hi Johan, > > Using a viewmodel should work. > Recently someone complained that the action method (or maybe the > constructor of the viewmodel?!) has been invoked twice per http request. > Check whether this happens for you too and give us more details so we can > optimize it. For more info check the mail archives from the past two weeks. > > Martin Grigorov > Freelancer, available for hire! > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Mon, Mar 30, 2015 at 12:37 PM, <johandoornen...@filternet.nl> wrote: > > > I would like to consume data from an external REST-api (JSON like from > > http://api.postcodeapi.nu/) and use it in ISIS. Can anybody recommend a > > sensible approach? > > > > > > > > grtz Johan > > > > > > > > > > > > >