Simple Web Service Technical Guide

Using the Host Simulator

Using the Host Simulator

Previous topic Next topic  

Using the Host Simulator

Previous topic Next topic  

A useful feature of Flynet Viewer is the screen simulator.

 

This provides a script that can be defined as a host in the admin. console  which is then accessible from a browser and will simulate the host application.A sample simulator script is available to be used with the sample files so that access to the host application on Flynet's iSeries is not required to run the web service.

 

Unfortunately it is not possible to demonstrate the edit and add functionality as the simulator script is static and the data displayed is as it was when the application was recorded, the screens however behave in exactly the same way as the host application making it a useful tool for demonstrating the web service generator.

 

To activate the simulator script , once you have downloaded the file FlynetTelecomms.sms it should be placed in the directory C:\Program Files\Flynet\Viewer\SimHostScripts.The Flynet Screen Simulator must be active and running , it will typically be shown as an icon  in the system tray , the script must be compiled. To do this click on the simulator icon and select the simulator script file by clicking on settings and select the file.

 

C:\Program Files\Flynet\Viewer\SimHostScripts\FlynetTelecomms.sms

 

Then take the compile option, the script is now ready to be used.You may need to define this in your Admin. console but this should then be accessible by typing Http://localhost/scterm in your browser.

 

To use any of the examples provided in full you will need to set up a connection to the Host.

 

With Flynet Viewer it is possible to create a simulation of an actual application, in this example one that resides on an iSeries,with the use of the Host Screen Simulator no actual connection is required to a 'live' host.

 

To use the simulation script provided, place the file FlynetTelecomms.sms in the directory C:\Program Files\Flynet\Viewer\SimHostScripts

The Flynet Screen Simulator service must be running, to check this and compile your script,check the simicon

Screen Simulator Icon in the System Tray, check the settings and make sure the file C:\Program Files\Flynet\Viewer\SimHostScripts\FlynetTelecomms.sms is selected as the Active Script file.Once selected click on the compile option.The Script is now ready to use.

 

screensimcompile

 

Next, to make things easier to follow when defining the Host during the Web Service generation stage,define a Host named Telecomm using the Admin. Console.To do this open the Admin. Console and go to Service Settings.Click on Hosts and take to option to 'Add a new Host Definition'

 

addnewhostdef

Name the Host Telecomm and leave all the other settings as the default setting then click Apply and close.

 

Finally you will need to add a line to the Web.Config file in the Directory C:\inetpub\wwwroot\scterm.

 

Look for the code as shown in the section below:

<!-- one per each host you want to give options for, host1, host2, host3 and so on-->

     <add key="host1" value="Host1;First Flynet Viewer Host"/>

 

Add the following line immediately below the section above.

 

<add key="host2" value="telecomm;telecomm"/>

 

The code should now look like this.

 

<!-- one per each host you want to give options for, host1, host2, host3 and so on-->

     <add key="host1" value="Host1;First Flynet Viewer Host"/>

     <add key="host2" value="telecomm;telecomm"/>

 

Save the Web.Config file.

 

To test everything is working o.k , open up your internet browser and type in the line http://localhost/scterm/

 

Once the Flynet Viewer window appears click on the preferences Icon shown on the bottom left of the screen,you should see 'telecomm' as one of the options to select (see  below).

 

fvpreferences

 

Once the session is active you can sign on to the Simulated application as you would the actual iSeries application,the user name and password are set to flynetsim, the entry is not case-sensitive.