Using the Requesters (Magic xpa 2.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.
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.
Possible URL Reference
When installing Magic xpa on 64-bit machines, the 64-bit requester dlls are installed in the scripts folder.
In addition, two subfolders called 32bit and 64bit are created and contain the relevant dlls.
If your Web server is configured to use 32-bit dlls, you need to manually copy the 32-bit dlls to the scripts folder.
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.
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:
Call the HTMLOrdersList program in the PetShopDemo application.
Specify a priority for the request.
Specify a user and password pair.
Hidden fields example
<FORM action="/scripts/MGrqispi.dll l"
<INPUT type="hidden" name="APPNAME"
<INPUT type="hidden" name="PRGNAME"
<INPUT type="hidden" name="PRIORITY" value="4">
<INPUT type="hidden" name="USER"
<INPUT type="hidden" name="PASS" value="12345">
<INPUT type="submit" name="" value="Submit">
The URL method to perform the example request is:
<A href="/scripts/MGrqispi.dll ?APPNAME=
Call PetShopDemo - HTMLOrdersList
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