Salesforce

Using the Requesters (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Using the Requesters (Magic xpa 3.x)

The Internet requesters are used to execute Magic xpa programs from an HTML file on a browser and to return the program results to the browser.

Note: The Rich Client also uses Web requesters.

You can specify the requester and the requester properties in the following ways:

  • Submit an HTML form where the action attribute is a URL that references the requester, with properties either appended to the URL or submitted as hidden fields.

  • Specify a hyperlink where the URL references the requester with the properties appended to the URL.

  • Enter a URL that references the requester with the properties appended to the URL.

Referencing the Requester

The following explains how to use the requester from an external HTML page or from the browser directly. If you are using the requester from a page created by a Magic xpa program, Magic xpa creates the appropriate HTML code automatically.

The method used to reference the requester in a URL depends on which requester is used and how it was installed. Some examples appear in the table below.

Requester

Possible URL Reference

CGI

http://servername/cgi-bin/MGrqcgi.exe

ISAPI

http://servername/scripts/MGrqispi.dll

Parameters

All of the parameters available when calling other requesters are also available when calling the Internet requesters. These parameters are: APPNAME, PRGNAME, ARGUMENTS, PRIORITY, USER, PASS.

Note: The above parameters are reserved keywords that the Web requesters (MGrqispi.dll, MGrqcgi.exe) handle internally, and do not pass them to the Runtime engine.

Specifying parameters

Parameters can be specified either as hidden fields or as part of the URL.

An example of each method, using the ISAPI requester, follows below. The actions to be performed in each example are the same:

  1. Call the HTMLOrdersList program in the PetShopDemo application.

  2. Specify a priority for the request.

  3. Specify a user and password pair.

Hidden fields example

<FORM action="/scripts/MGrqispi.dll l"
method="POST">

<INPUT type="hidden" name="APPNAME"
value="PetShopDemo">

<INPUT type="hidden" name="PRGNAME"
value="HTMLOrderList">

<INPUT type="hidden" name="PRIORITY" value="4">

<INPUT type="hidden" name="USER"
value="supervisor">

<INPUT type="hidden" name="PASS" value="12345">

<INPUT type="submit" name="" value="Submit">

</FORM>

URL example

The URL method to perform the example request is:

<A href="/scripts/MGrqispi.dll ?APPNAME=
PetShopDemo&PRGNAME=HTMLOrderList&PRIORITY=
4&USER=supervisor&PASS=12345>

Call PetShopDemo - HTMLOrdersList

</A>

When using the URL method to specify parameters, bear in mind that some characters cannot be used as they are in parameter values but must be URL-encoded instead.

For example, if you want to include a space, you must enter the space as the URL-encoded string %20. The parameter for the application name Pet Shop Demo should be entered as

APPNAME=Pet%20Shop%20Demo

Reference
Attachment 
Attachment