IBM Books [Return to Library] [Contents] [Previous Topic] [Bottom of Topic] [Next Topic] [Help]

User's Guide


Creating HTML forms for MQSeries Internet Gateway

Two types of HTML forms are used by the MQSeries Internet Gateway. Your MQ message information is entered in an input form, and, if you want to continue using your Web browser while the MQSeries application is dealing with your request, you require a reply retry form from which to check when the reply is available. Both types of form are described on this page, with links to samples that are provided in the '/doc' subdirectory of your MQSeries Internet installation.

Note:Because of the way most browsers work, if you have more than one outstanding message that specifies a particular reply retry form, only the latest reply retry message is visible to the end user. This means that other outstanding message replies cannot be accessed and they remain on the MQSeries output queue. If you want to send another message using a particular form, before the previous message has completed, start a new instance of the browser to send the new message.


Message input forms

The message input form contains two main parts:
MQSeries Internet Gateway keyword settings
This part of the form must follow the structure shown in the examples and samples.

The HTML input form can contain information about the MQ resources that should be used, and what to do if the MQ application does not reply, by giving values for the MQSeries Internet Gateway keywords.

If you want to use keyword values that are contained in your own 'INI' file, you must set the MQIGwIniFile keyword in your form. You probably also want to set MQIGwQueue to define which application queue the form should use.

Form design and display information
This information will depend on the input data that is required for your MQseries application, and how you want your forms to look. You can use any design formatting you wish.

Code examples are provided, showing how to set keywords with links to working example forms.

Note:If you are viewing this information from your Web server installation, you can Submit the forms that are displayed by the links. Otherwise you can only view the forms from these links.


HTML form for the sample application DMQSAMP1

This form puts a message on the DMQSAMP1 queue using the default queue manager, and uses the Gateway queue, DMQGATEWAY for the return data. <P>Click on "Submit" to send a message to the DMQSAMP1 application.</P> <H4>Sample Form</H4> <FORM ACTION="/dmq-bin/dmqsamp1.mqf" METHOD="POST"> <!--If you are using a Domino or Apache server, the ACTION must be be changed to: "/dmq-bin/dmqcgi.exe"--> <INPUT NAME="MQIGwQueueManager" TYPE="hidden" VALUE=""> <INPUT NAME="MQIGwQueue" TYPE="hidden" VALUE="DMQSAMP1"> <INPUT NAME="MQIGwReplyQueue" TYPE="hidden" VALUE="DMQGATEWAY"> <INPUT NAME="MQIGwWaitInterval" TYPE="hidden" VALUE="10000"> <font size=+1> <INPUT TYPE="submit" VALUE="Submit"> </font> </FORM>

Click here to display an example form.


HTML form for the sample application DMQSAMP2

This form, puts a message on the DMQSAMP2 queue and allows you to create and submit a message, and then add and submit further text, and to create multiple sessions.

To use the form:

  1. Select Start session
  2. In the returned form, enter text and then press the Add text button
  3. The returned form contains the entered text. Enter more text and press Add text
  4. To close and release the session, select Exit.
    If you close your browser without using the 'Exit' button, the session is not released.
To get another session, return to your original form and select Start session again, or open the form in another Web browser session. <H4>Sample Form</H4> <P>Click on <b>Start session</b> to run the CGI sample.</P> <center><h3>Example of a multi-form session</h3></center> <FORM ACTION="/dmq-bin/dmqsamp2.mqf" METHOD="POST"> <!--If you are using a Domino or Apache server, the ACTION must be be changed to: "/dmq-bin/dmqcgi.exe"--> <INPUT NAME="MQIGwQueue" TYPE="hidden" VALUE="DMQSAMP2"> <INPUT NAME="MQIGwWaitInterval" TYPE="hidden" VALUE="10000"> <INPUT NAME="MQIGwContext" TYPE="hidden" VALUE="All"> <INPUT TYPE="submit" VALUE="Start session"></RIGHT></TD> </FORM>

Click here to display an example form.


Reply retry forms

The reply retry form is only needed if you set a timeout for your MQSeries application response by giving a value to the MQIGwWaitInterval keyword. The filename of your reply retry form also has to be set in the MQIGwWaitHTML keyword. You are recommended to use different reply forms for each application so that, if there is more than one message outstanding, the end user can differentiate between them . If you do not supply your own form, the sample timedout.htm is used.

The following code example shows the required content of the retry form. As with the input forms, HTML information can be added to make the form fit your design requirements.

<H4>Sample Form</H4> <HTML> <HEAD> <TITLE>MQSeries Internet Gateway Status</TITLE> </HEAD> <body> <A NAME=Top_Of_Page>&nbsp;</A> <!-- beginning of message area --> <H2>MQSeries Internet Gateway Status</H2> <hr> <p>This is a sample timed-out form that is sent if the Wait Interval has been exceeded. <P>To check if your reply is available press <b>Retry</b> (and wait again). <!-- end of message area --> <center> <FORM ACTION="/dmq-bin/sample.mqf" METHOD="POST"> <!--If you are using a Domino or Apache server, the ACTION must be be changed to: "/dmq-bin/dmqcgi.exe"--> <!-- Insert here any keyword definitions that you used in your request form --> <i><INPUT TYPE="submit" NAME="dmqretry" VALUE=" Retry "></i> </FORM> </center> </body> </HTML> The areas of the form that can be modified are: The other information should not be changed.

Click here to display an example reply retry form.


[Return to Library] [Contents] [Previous Topic] [Top of Topic] [Next Topic] [Help]


[ Home | Order | Search | Contact IBM | Legal ]
(C) IBM Corporation 1997. All Rights Reserved