In one of out apps we need to consume webservices designed for Stateful communication. Documentation of these webservices state the following: Managing the session state takes place at the HTTP communication layer. As HTTP is a stateless protocol the host maintains the state via HTTP session cookies. When using a SOAP client application toolkit, typically only one operation per request is supported. In this case supporting session state is required. The host session times out after a certain amount of idle time. Session Cookies Before a POS performs any transaction or request with the LIAB web service, it has to identify itself and it must be authenticated. The POS identification and authentication is performed by means of a login with username and password. A session value is stored in the ASP session in a cookie. Therefore HTTP session support is required. Some programming languages support HTTP sessions by default. In other languages this has to be set explicitly. For example, in Microsoft .NET programming environment, the support of HTTP sessions has to be set explicitly by using a 'CookieContainer' object. It seems that Mendix allows only one operation per request, so supporting session state is required Does Mendix support stateful communication? And if not is there a way to work around this limitation?
I posted a support request ticket concerning the above and got the following answer:
We discussed you support request about stateful communication in webservices. The Mendix platform doesn't support this feature out of the box. You can't enable within the microflows. The workaround is to build the webservices in Java actions and create there a management to hold the used sessions. The easiest way is to use the Apacht HTTP client library. http://hc.apache.org/httpclient-3.x/ It is a simple library to send HTTP traffic and adding the HTTP headers and to read memory cookies.