The WebSpeed Active Server Page Messenger (WSASP)

Control Files

WSASP.DLL

Object Type

WSAgent

Purpose

The WebSpeed Active Server Page Messenger (WSAgent) allows a developer to integrate WebSpeed applications with Microsoft Active Server Pages. This allows you to take advantage of Microsoft’s server side scripting and ActiveX server interface with Progress 4GL applications.

Comments

The WSAgent server will get and set all CGI web properties and HTTP headers transparently from the user. However, you can override the QueryString and FormData entries before running a WebSpeed script.

Properties

    FormData
    HTTPHeader

Locked

    Output
    QueryString
    ServiceName
    SessionsLogging
    SessionsLogName
    Version

Methods

    CustomizeErrorMessages
    DisconnectService
    GetErrorMessage
    ProcessErrorMessages
    RunScript
    VerifyConfig

FormData

Applies To

WSAgent

Purpose

Overrides any form data passed in by the web server. You must HTTP encode this data before setting FormData.

Syntax

WSAgent1.FormData = string

Data Type

String

Usage

Read only.

Comments

By default, the WebSpeed script will see the form data as passed in by the web server. If you want to change this data or add your own, you would set this property before calling the RunScript method.

See Also

 

HTTPHeader

Applies To

WSAgent

Purpose

Contains the HTTP header returned from executing a WebSpeed script. The header contains an HTTP response code as well as cookies and the mime type of the output.

Syntax

string = WSAgent1.HTTPHeader

Data Type

String

Usage

Read only.

Comments

By default, HTTP headers with the exception of the WebSpeed Transaction cookie are not propogated to the Active Server Page framework. You can use this property to get any HTTP headers you want to return with your page.

See Also

 

Locked

Applies To

WSAgent

Purpose

A Boolean value that indicates whether the messenger is currently in a state aware transaction with a locked agent.

Syntax

Bool = WSAgent1.Locked

Data Type

Boolean

Usage

Read only.

Comments

 

See Also

 

Output

Applies To

WSAgent

Purpose

This prperty contains the HTML output of the WebSpeed script, minus any HTTP headers.

Syntax

String = WSAgent1.Output

Data Type

String

Usage

Read only.

Comments

Normally, you would just return this data to the browser, but you are free to modify it or just throw it away.

See Also

 

QueryString

Applies To

WSAgent

Purpose

Overrides the query string passed in by the web server. You must URL encode this string before setting QueryString.

Syntax

WSAgent1.QueryString = string

Data Type

String

Usage

Read only.

Comments

By default, the WebSpeed script will see the query string as passed in by the web server. If you want to change this string or add your own, you would set this property before calling the RunScript method.

See Also

 

ServiceName

Applies To

WSAgent

Purpose

Sets the Service Name to use for running the WebSpeed script. If ServiceName is a empty string (""), the default service name is used.

Syntax

WSAgent1.ServiceName = string

Data Type

String

Usage

Read/write.

Comments

You use the ServiceName property to select what named Service to use. It functions the same as the Wservice parameter in a normal WebSpeed URL.

See Also

 

SessionsLogging

Applies To

WSAgent

Purpose

A Boolean value that gets or sets whether WebSpeed sessions logging is currently enabled

Syntax

WSAgent1.SessionsLogging = Bool

Data Type

Boolean

Usage

Read/write.

Comments

 

See Also

 

SessionsLogName

Applies To

WSAgent

Purpose

Contains the name of the WebSpeed sessions log file..

Syntax

string = WSAgent1.SessionsLogName

Data Type

String

Usage

Read only.

Comments

 

See Also

 

Version

Applies To

WSAgent

Purpose

Returns a string that contains the version of WSASP.DLL that is being used.

Syntax

string = WSAgent1.Version

Data Type

String

Usage

Read only.

Comments

 

See Also

 

CustomizeErrorMessages

Applies To

WSAgent

Purpose

Returns an HTML page that allows you to customize WebSpeed error messages.

Syntax

string = WSAgent1.CustomizeErrorMessages()

Where

 

Comments

 

See Also

 

DisconnectService

Applies To

WSAgent

Purpose

Disconnects an ASP messenger from the named service.

Syntax

string = WSAgent1.DisconnectService(String ServiceName)

Where

ServiceName is the name of the WebSpeed broker you want to disconnect from.

Comments

 

See Also

 

GetErrorMessage

Applies To

WSAgent

Purpose

Returns a default or customized WebSpeed error message given an error code.

Syntax

String = WSAgent1.GetErrorMessage(Integer ErrorCode)

Where

ErrorCode is the error number of the message you would like to retrieve.

Comments

 

See Also

 

 

ProcessErrorMessages

Applies To

WSAgent

Purpose

This routine processes any custom error message changes done by the CustomizeErrorMessages form.

Syntax

WSAgent1.ProcessErrorMessages()

Where

 

Comments

 

See Also

 

 

RunScript

Applies To

WSAgent

Purpose

Executes the specified WebSpeed script.

Syntax

WSAgent1.RunScript(String ScriptName)

Where

ScriptName is the path and name of the .p, .w, or .r file to run.

Comments

Before calling RunScript, you may want to set the ServiceName, FormData, and QueryString properties. After running the script, the HTTPHeader, Output, and Locked properties will be set. If there is an error running the script, and Error will be raised and Output will contain either the default or customized error message returned.

See Also

 

 

VerifyConfig

Applies To

WSAgent

Purpose

Runs the specified WebSpeed verifying routine and returns the result.

Syntax

String = WSAgent1.VerifyConfig(Integer Level)

Where

Level is the type of verification to run.

Level 1: Roundtrip test from the browser to the messenger.

Level 2: Roundtrip test from the browser to a broker using the WSASP messenger.

Level 3: Roundtrip test from the browser to a WebSpeed agent using the WSASP messenger.

Comments

Before calling VerifyConfig, you will want to set the ServiceName property to the broker you want to use. If the ServiceName property is an empty string (""), the default broker will be used.

See Also