Proxy Service Interface ASP Samples

These samples execute a task and display the results.

Definitions:

The task is defined in a sample task file generated in the designer.

Stateful proxy ASP sample:

<% Language = VBScript %>
Option Explicit
Response.Buffer = true
On Error Resume Next
Dim proxy, outputStr

’Instantiate the proxy
Set proxy = CreateObject("Atm.ConnectorProxyService.ScreenConnectorProxy.1")

’Initialize the proxy for stateful execution
proxy.Open("com.attachmate.connectors.screen.ScreenConnectorAccessImpl",
"C:\\Program Files\\Attachmate\\EAI\\recordings\\Test\\connector\\Test2.xml"

’Execute a stateful task
outputStr = proxy.Exec("StatefulTask1",
"<ScreenInputs><Input><data></Input></ScreenInputs>")
Response.write outputStr

’Execute a second stateful task
outputStr = proxy.Exec("StatefulTask2",
"<ScreenInputs><Input><data></Input></ScreenInputs>")
Response.write outputStr

’Clean up
Proxy.Close ( ) 

Stateless proxy ASP sample:

<% Language = VBScript %>
Option Explicit
Response.Buffer = true
On Error Resume Next
Dim proxy, outputStr

’Instantiate the proxy
Set proxy = CreateObject("Atm.ConnectorProxyService.ScreenConnectorProxy.1")

’Execute a stateless task
outputStr = proxy.Execute
("com.attachmate.connectors.screen.ScreenConnectorAccessImpl",
"C:\\Program Files\\Attachmate\\EAI\\recordings\\Test\\connector\\Test.xml", "Task",
"<ScreenInputs><Input><data></Input></ScreenInputs>")

’Display the results (<ScreenOutputs><Output><result></Output></ScreenOutputs>"
Response.write outputStr

Related Topics
Bullet Using Tasks in Your Applications, Overview
Bullet Sample Task File
Bullet Building Applications Using Native Win32 Technologies
Bullet Proxy Service Interface API Reference
  Attachmate