JMS Connect User's Guide

CHAPTER 3

Creating a JMS Component

This chapter outlines the process of creating a JMS Component for use in an exteNd web service. At the same time, the semantics and usage of message header fields and properties are discussed in the context of JMS messaging; and tips are given for making the most effective use of JMS-based exteNd web services. You should familiarize yourself with this chapter before creating and deploying web services that rely on components created with the JMS Connect.

 
Top of page

Before Creating a JMS Component

Creating a JMS component requires that you know the answers to the following questions:


Procedure To create a new JMS Component:

  1. Select File>New>xObject then open the Component tab and select JMS. The "Create a New JMS Component" Wizard appears.

    CreateNewJMSComponent

  2. Enter a Name for the new JMS Component.

  3. Optionally, type Description text.

  4. Click Next. The XML Templates Info panel of the "Create a New JMS Component" Wizard appears.

    XMLTemplatesPanel

  5. Specify the Input and Output templates as follows.

  6. Select an XML template for use as an Output Part using the same steps outlined above.

    NOTE:   You can specify an input or output XML template that contains no structure by selecting {System}{ANY} as the Input or Output template. For more information, see "Creating an Output Part without Using a Template" in the User's Guide.

  7. Click Next. The XML Temp/Fault Template Info panel of the New HP3000 Terminal Component Wizard appears.

    NewComponTF

  8. If desired, specify a template to be used as a scratchpad under the "Temp Message" pane of the dialog window. This can be useful if you need a place to hold values that will only be used temporarily during the execution of your component or are for reference only. Specify the templates as indicated in Step 6 above.

  9. Under the "Fault Message" pane, select an XML template to be used to pass back to clients when an error condition occurs.

  10. As above, to add additional temp or fault XML templates, click Add and choose a Template Category and Template Name for each. Repeat as many times as desired. To remove an XML template, select an entry and click Delete.

  11. Click Next. The Connection Info panel of the "Create a New JMS Component" Wizard appears.

    FinalJMSComponentWizardPanel

  12. Select a Connection type from the pulldown list. (The pulldown list choices reflect the available JMS Connection Resources that were created earlier. For more information on creating JMS Connection Resources, see "Creating a JMS Connection Resource" on page 23).

  13. Click Finish. The component is created and the JMS Component Editor appears.

 
Top of page

About the JMS Component Editor Window

The JMS Component Editor is similar in appearance to the XML Map Component Editor window (and in fact includes all the functionality of the XML Map Component Editor, plus additional Action types specific to messaging). Like all other Component Editors, the JMS Component Editor window includes an Action Model pane (which is typically in the lower right corner, although it doesn't have to be), a Native Environment pane (upper right), and mapping panes for input, output, and/or temporary DOMs.

The Native Environment page appears as a grey pane until you create or highlight a Message Action, at which time it displays a message status pane containing either two or three tabs, depending on whether the current Message Action involves browsing, sending, or receiving.

If you activate the Action menu (or do a right-mouse-click inside the Action Model pane) and select New Action, you will see that all of the same actions that are available in the XML Map Component are also available in the JMS Component, but with four new action types:

AllTheFunctionality

The four JMS-specific actions are the subject of the next chapter.

 
Top of page

About the Native Environment Pane

The JMS Component Editor's Native Environment pane (which is initially grey) will display various types of information associated with a message whenever a JMS Message Action is highlighted in the Action Model pane. The available categories of information (indicated by tabs at the top of the pane) include Message Body, Message Header, and Message Filter. The first two categories are common to all message actions (Send, Receive, and Browse). The Message Filter category, however, is visible only for Receive and Browse.

HeadersInNatEnvPane

In the above illustration, the Message Header tab has been selected (with a Receive Message action highlighted in the Action Model pane). The Native Environment pane has been enlarged to show all available message headers and properties. For information on message header and property field usage, see "Message Headers and Properties" on page 127.

When the Message Body tab is selected, the Native Environment Pane will display content in a manner appropriate to the body type. For example, if the message contains an XML document, the Native Environment Pane will display a DOM tree; whereas if the message contains a COBOL copybook, it will display the contents of the copybook. See "Actions Unique to the JMS Component Editor"(starting on page 48) for additional information.

When the Message Filter tab is selected, the Native Environment Pane will display a selector-edit area. See "Working with Message Filters (Selectors)" on page 94 for more information.




Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...