About Stateful Web Services

Stateful Web services are those that can preserve their state for long running or distributed transactions. Typically, Web service calls are "stateless", which means that subsequent invocations are completely independent. Since the Host Integrator can suspend sessions, Verastream Web services uses stateful Web services to support this behavior. Stateful Web services automatically use the session server suspend/resume functionality.

Invoking stateful Web services

There are two different ways to invoke Verastream Host Integrator Web services.

The first, and preferred, method is:

Standards-based method

Host Integrator SOAP Web services implement the WS-Resource standard, which includes WS-Addressing. If the Web service client understands WS-Resource and WS-Addressing, it can automatically offer stateful behavior with minimal additional programming.

REST services do not understand WS-Resource or WS-Addressing. REST stateful services use environment variables to carry the session ID.

The second method is:

Inband support method - SOAP services

If the Web service client does not understand WS-Resource and WS-Addressing, or has difficulty importing WSDLs that contain references to WS-Resources and WS-Addressing, you can disable this feature on the session server Web service property page in the Administrative Console. However, disabling standards support does not disable stateful Web services in Host Integrator. You can use inband support.

What does "inband" support mean?

Inband support uses proprietary data types in the Web service document payload, instead of using the SOAP header which WS-Resources and WS-Addressing normally require. Because the Web service client tools don't automatically know how to use our proprietary inband support, you have to manually program stateful Web services.

  1. Use wsResourceCreate to allocate a resource (a VHI session) that you will use for multiple invocations on the Web service. The return document includes the session id. You will use this session id for subsequent Web service invocations.
  2. Invoke as many methods on the service, as many times as you need. For each invocation, you need to send the session id obtained in step one, in the session id field of the optional environment variables defined in the WSDL.
  3. When you are finished with the resource (VHI session), use wsResourceDestroy to free the session. For wsResourceDestroy, you need to send the session id obtained in step one, in the session id field of the optional environment variables defined in the WSDL.

The Web service configuration setting suspend timeout controls how long you can leave the session inactive. The Web service will return a SOAP fault, saying the requested resource is not available if you attempt to use the resource after you have destroyed it, or after the suspend timeout has expired.

Stateful Web services suspend sessions with a specified timeout of 60 minutes; sessions not resumed within this period are automatically terminated by the session server.


Related Topics
Bullet About Web Services
Bullet Testing Web Services
Bullet About Web Services Security
Bullet About Load Balancing Web Services
Bullet Using Commands to Deploy a Model Package