![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
HP3000 Connect User's Guide
CHAPTER 2
While there are many ways to go about creating HP3000 Components, the most commonly used steps in creating a simple component are as follows:
Enter Record mode and navigate to the program using terminal emulation available via the component editor's Native Environment Pane.
Drag and drop input-document data into the screen as needed.
In this chapter, we'll focus on the first two steps: creating your XML Templates and creating and a configuring an HP3000 Connection Resource. Both of these are important first steps in being able to use HP3000 Components.
Although it is not strictly necessary to do so, your HP3000 Component may require you to create XML templates so that you have sample documents for designing your component. (For more information, see Chapter 5, "Creating XML Templates," in the exteNd Composer User's Guide.)
In many cases, your input documents will be designed to contain data that a terminal operator might type into the program interactively. Likewise, the output documents are designed to receive data returned to the screen as a result of the operator's input. For example, in a typical business scenario, a terminal operator may receive a phone request from a customer interested in the price or availability of an item. The operator would typically query the host system via his or her HP3000 terminal session by entering information (such as a part number) into a terminal when prompted. A short time later, the host responds by returning data to the terminal screen, and the operator relays this information to the customer. This session could be carried out by an exteNd Composer Web Service that uses an HP3000 Component. The requested part number might be represented as a data element in an XML input document. The looked-up data returned from the host would appear in the component's output document. That data might in turn be output to a web page, or sent to another business process as XML, etc.
NOTE: Your component design may call for other xObject resources, such as custom scripts or Code Table maps. If so, it is also best to create these objects before creating the HP3000 Component. For more information, see the exteNd Composer User's Guide.
Once you have the XML templates in place, your next step will be to create a Connection Resource to access the host program. If you try to create an HP3000 Component in the absence of any available Connection Resources, a dialog will appear, asking if you wish to create a Connection Resource. By answering Yes to this dialog, you will be taken to the appropriate wizard.
When you create a Connection Resource for the HP3000 Component, you will have two choices: a straight "HP3000 Connection" and an "HP3000 Logon Connection." Generally speaking, you will use the straight HP3000 Connection to connect to your host environment. The Logon Connection is used for connection pooling, which will be explained in greater detail in Chapter 6 of this Guide.
You will use a live HP3000 Connection to connect to a host environment of your choice. After setting up your Connection Resource, it will be available for use by any number of HP3000 Components that might require a connection to the host in question.
To create an HP3000 Connection Resource:
From the Composer File menu, select New, then xObject, then open the Resource tab and select HP3000 Connection.
NOTE: Alternatively, under Resource in the Composer window category pane, you can highlight Connection, click the right mouse button, then select New.
Select the HP3000 Connection type from the pulldown menu. The dialog changes appearance to show just the fields necessary for creating the HP3000 connection.
In the Host or IP Address field, enter the physical (IP) address or hostname alias for the machine to which you are connecting.
In the Telnet Port field, enter the number of the TCP/IP port. The default port number is 23.
In the Terminal Type field, enter the type of terminal you wish to specify when handshaking with the host. Select one of the values in the pulldown menu (currently HP 700/92 or HP 700/96).
In the Code Page field, specify a code page (See "About Code Page Support on page 22."
Enter a UserID and Password. These are not actually submitted to the host during the establishment of a connection. They are simply defined here. (The Password is encrypted.) Right-mouse-click and choose Expression if you want to make these fields expression-driven. See discussion further below.
NOTE: After you've entered UserID and Password info in this dialog, the ECMAScript global variables USERID and PASSWORD will point to these values. You can then use these variables in Send Buffer expressions (or as described under "Native Environment Pane Context Menu" on page 27).
Check NSVT to use the NSVT protocol instead of Telnet. When this option is chosen, the Port number will be ignored and the connection will be made using NSVT port 1570.
Check Autowrap Characters if you want the cursor to move to the first position of the next line as soon as the cursor reaches the end of the line.
Check 8-bit Data Characters if the communicated data is in 8-bit character format. For 7-bit characters, uncheck this option and the 8th bit will be truncated.
Check Backspace Send Delete if you want the BACKSPACE key to delete data.
Check Terminal New Line if the ENTER key should generate a carriage return/line feed combination.
Check HP Return Equals Enter to generate an Enter Key when pressing the Return Key.
If the system expects an answerback, fill in an HP AnswerBack Message. This can be entered either as a constant or an expression (see discussion about Constants and Expressions below).
Click the Default check box if you'd like this particular HP3000 connection to become the default connection for subsequent HP3000 Components.
Click Finish. The newly created resource connection object appears in the Composer Connection Resource detail pane.
Code Page support in exteNd Composer Connection Resources allows you to specify which Character Encoding scheme to use when translating characters sent between exteNd Composer and other host systems. exteNd Composer data uses Unicode character encoding (the Java and XML standard). Existing legacy and other host systems use a variety of character encoding schemes (i.e., Code Pages) specific for their language or usage. A mechanism is needed to translate the character encoding between these systems if they are to communicate with one another. This is handled in exteNd Composer by specifying the Code Page used by a host system in the Connection Resource.
You can specify Connection parameter values in one of two ways: as Constants or as Expressions. A constant-based parameter uses the static value you supply in the Connection dialog every time the Connection is used. An expression-based parameter allows you to set the value in question using a programmatic expression (that is, an ECMAScript expression), which can result in a different value each time the connection is used at runtime. This allows the Connection's behavior to be flexible and vary based on runtime conditions.
For instance, one very simple use of an expression-driven parameter in an HP3000 Connection would be to define the User ID and Password as PROJECT Variables (e.g.: PROJECT.XPath("USERCONFIG/MyDeployUser"). This way, when you deploy the project, you can update the PROJECT Variables in the Deployment Wizard to values appropriate for the final deployment environment. At the other extreme, you could have a custom script that queries a Java business object in the Application Server to determine what User ID and Password to use.
To switch a parameter from Constant-driven to Expression-driven:
Click the right mouse button in the parameter field you are interested in changing.
Select Expression from the context menu and the editor button will appear or become enabled. See below.
Click on the Expression Editor button. The Expression Editor appears.
Create an expression (optionally using the pick lists in the upper portion of the window) that evaluates to a valid parameter value at runtime.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...