About Verastream Web Services

Providing a Web service to your host applications enables rapid reuse of the business logic that exists on these hosts. Web services provide reusable APIs for creating portals, Web applications, and other business solutions. And, because they are technology independent, they can run on any platform. Developers can use utilities to generate specific files to locate and consume the Web service.

Web Service Standards

Host Integrator, at model deployment, generates both a SOAP (Simple Object Access Protocol) Web service and a REST (REpresentational State Transfer) service that uses JSON (Java Script Object Notation) to call VHI procedures from a Web application.

Deploying the Web Service

In VHI, after a model is deployed using the Design Tool, Web services are automatically provided by the session server as both an embedded SOAP stack and as a REST service. The embedded Web service supports all model procedures and features, including executeSQLStatement and ProcessString event handlers.

Metadata request format

Both model and environment variables are an optional part of every VHI Web service to invoke a web method. See About Model and Environment Variables for more information on using these.

Web Service Ports

Web Services deployed to the session server are set by default to run on HTTP port 9680, or HTTPS port 9681.

Using the WSDL Document

The Web Service Description Language (WSDL) document describes the interface to the Web service, the data types it uses, and the location of the service. Developers use this document to identify inputs, outputs, and methods needed to consume the Web service. Web services generation utilities use the WSDL document to create proxy objects and sample code for the services.

You can access your Web services WSDL documents here:

http://<session server>:9680/vhi-ws for a list of available WSDLs

For example:

http://<session server>:9680/vhi-ws/model/<model name>?wsdl for a non-pooled model
http://<session server>:9680/vhi-ws/session/<pool name>?wsdl for a pooled session

-or here-

https://<session server>:9681/vhi-ws for a list of available WSDLs

For example:

https://<session server>:9681/vhi-ws/model/<model name>?wsdl for a non-pooled model
https://<session server>:9681/vhi-ws/session/<pool name>?wsdl for a pooled session

Using the REST Document

Just like XML, JSON (using JavaScript syntax) is text only and thus can be read and used as data input by any programming language. However, unlike XML, JSON is very light-weight and easy to read. It is also very widely used for interchanging data on the Web.

JSON documents are an easier to use alternative to XML and follow this simple format:

{"employees":[
    {"firstName":"John", "lastName":"Doe"}, 
    {"firstName":"Betty", "lastName":"Brown"},
    {"firstName":"Michael", "lastName":"Jones"}
]}

You can access all available REST services for models or sessions deployed to the Host Integrator session server here:

http://<session server>:9680/vhi-rs for a list of available

For example:

http://<session server>:9680/vhi-rs/model/<model name>?json for a non-pooled model
http://<session server>:9680/vhi-rs/session/<pool name>?json for a pooled session

-or here-

https://<session server>:9681/vhi-rs for a list of available

For example:

https://<session server>:9681/vhi-rs/model/<model name>?json for a non-pooled model
https://<session server>:9681/vhi-rs/session/<pool name>?json for a pooled session

Example

Take a look at a REST Web application that uses the CICSAcctsDemo model to demonstrate Host Integrator's REST service.

Managing Web Service Settings

You use the Administrative Console to enable and disable all VHI Web services. In the Properties panels of the session server, model and session pool configurations you can set server-level policies as well as options for specific models and session pools.

 

Related Topics
Bullet Testing Web Services
Bullet About Web Service Security
Bullet About Model and Environment Variables
Bullet About Stateful Web Services
Bullet About Load Balancing Web Services
Bullet Using Commands to Deploy a Model Package