Try OpenEdge Now
skip to main content
Web Services
Introduction : Overview of SOAP Web services in OpenEdge : Creating OpenEdge SOAP Web services : Defining requirements : Session models
 
Session models
The session model of your Web service matches the session model of the AppServer-enabled application. There are two session models:
*Session-free — This connectionless model uses an AppServer running in state-free mode. This is the recommended model for Web services.
*Session-managed — This connection-oriented model uses AppServers running in stateless, state-aware, or state-reset operating modes. This model should only be used when the application must maintain a private, persistent connection with a client.
The session-free model supports a connectionless and context-free interaction between the client and Web service application. This session-free model is far more scalable than the session-managed model because the AppServer accepts client requests from all clients as fast as it can execute them, and executes them in no particular order. No AppServer resource (memory or process) is reserved for indefinite use by a single client, as is the case with the session-managed model. With this model, the AppServer application must be written to be context-free, and all mechanisms otherwise available for context management on the AppServer are not supported.
The session-managed model provides varying types of support for maintaining and managing session context across client requests, throughout the life of the client connection. With this model, the type of context management supported depends on the actual operating mode of the AppServer, and the AppServer application must be written to maintain session context accordingly. The AppServer handles all requests from a single client sequentially in this model, completing each request before accepting another, which allows an orderly maintenance of context from one request to the next. To achieve this sequential handling, your Web service and its clients must use object IDs and SOAP headers to maintain context. Handling these elements increases the complexity of programming for a session-managed model. For more information on object IDs and SOAP headers, see Retrieving and sending object IDs: handling SOAP headers.
For information on configuring and programming AppServers, see OpenEdge Application Server: Administration and OpenEdge Application Server: Developing AppServer Applications. For more information on choosing a session model for your OpenEdge SOAP Web service, see Session Models and object IDs.