Imported Web Service Complex XML Structure Usage

What is the best way to use imported web services? We have lots of systems that our MENDIX application needs to interface to. All these systems has got existing Web services that we have imported and can speak to. My problem is, if these webservices return a Complex XML structure as return type, what is the most efficient way to use the returned values? My understanding is that we will create custom entities to map to the XML structures. Upon calling the webservice via a microflow, an instance of the custom entity will get inserted into the datbase and then after the web service call, we have to do a retrieve on that entity to get the last inserted instance. I was hoping to be able to store the returned metadata from the webservice in a variable, or even a couple of variables, use it, and then dispose of it once the process ends. Because we do a lot of calls to webservices outside of the application, we are concerned that it will greatly impact the performance of the system if it does an insert and retrieve to and from the database every time we call a webservice.
3 answers

Hi Frikkie,

Currently we do not support objects to be NOT stored in the database, so complex data returned from a webservice is always stored in the database. Further I think in this kind of cases; first get it working, then deal with performance problems. In my experience performance problems often arise at other places then were you would initially expect them.


I'd like to chime in with Michel here :) We have a bunch of experience with webservices and importing (large) quantities of XML. If the mapping is designed intelligently, it's actually really, really fast. The mapper batches all of the creates and updates which results in a minimal amount of database hits.

The other problem with not storing things in the database is that some webservices return large amounts of data. Keeping all of this in memory can be very inefficient, because the JVM will have to garbage collect a lot, starting to thrash.

In other words, I wouldn't worry about performance until you actually run into performance issues. Even then, there are a bunch of optimizations that can be applied to make it faster.


Thank you. :)