InterSystems IRIS Data Platform 2019.2  /  Creating Web Services and Web Clients

Creating Web Services and Web Clients
SOAP Session Management
Previous section           Next section
InterSystems: The power behind what matters   

SOAP web services are inherently stateless and thus do not maintain sessions. However, it is often useful to maintain a session between a web client and the web service that it uses. The InterSystems IRIS SOAP support provides a way for you to do this. This chapter includes the following topics:
Also see the section “Specifying Custom HTTP Requests” in the chapter “Fine-Tuning a Web Client in InterSystems IRIS.”
And see “WSDL Differences for InterSystems IRIS Sessions” in the appendix “Details of the Generated WSDLs.”
Overview of SOAP Sessions
You can maintain a session between a web client and an InterSystems IRIS web service. This support consists of the following tools:
The overall flow is as follows:
  1. The web client sends an initial message to the web service. This message does not include the InterSystems IRIS SOAP session header.
  2. The web service receives the message and starts a new web session.
  3. When the web service sends its reply, it adds the InterSystems IRIS SOAP session header to the message.
  4. When the web client receives the reply, it must detect the SOAP session header and extract the session cookie. Then when the web client sends another message, it must use the cookie to create a SOAP session header in that message.
  5. The web service receives the next reply, continues the web session, and includes the SOAP session header again when it responds.
It is not necessary to include a method to log out. The web session times out after a brief interval (the timeout period for the web application).
Enabling Sessions
In order to use InterSystems IRIS support for SOAP sessions, you must be using an InterSystems IRIS web service.
Using Session Information
When sessions are enabled, the web service can use the variable %session, which is an instance of %CSP.Session. Properties of this object contain system information and any information you choose to add. Some of the commonly used properties are as follows:
The %session object provides many other properties, as well as some methods for tasks related to sessions. For further details, see the class documentation for %CSP.Session.

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-16 05:39:10