Microsoft KB Archive/821489

= HOW TO: Set Up and Test the BizTalk Adapter for MQSeries =

Article ID: 821489

Article Last Modified on 12/13/2003

-

APPLIES TO


 * Microsoft BizTalk Adapter for MQSeries 1.0 Enterprise Edition

-



IN THIS TASK

 * SUMMARY
 * Prerequisites
 * Set Up BizTalk Server to Send to MQSeries
 * Set Up MQSeries to Send to BizTalk
 * Create a Channel and a Port in the BizTalk Messaging Manager
 * Create a Mapping for the Job in the BizTalk Adapter for MQSeries
 * Write a Test Message to the MQSeries Queue
 * REFERENCES



SUMMARY
This step-by-step article describes how to install and test the Microsoft BizTalk Adapter for MQSeries.

back to the top

Prerequisites
 Log on to your computer running BizTalk Server as the local Administrator. Install MQSeries Server 5.2 or MQSeries 5.3 on your computer running BizTalk Server. When the installation has completed, run the IBM MQSeries Default Configuration Wizard to set up the Default Cluster and Queue Manager. To run the Default Configuration Wizard, click Start, click Programs, click IBM MQSeries or IBM WebSphere MQ (for MQSeries 5.3), click MQSeries First Steps, and then click Default Configuration. If you have installed MQSeries Server 5.2:  Set the IBM MQSeries Service to Manual, and then restart the computer. Download and then install CSD04 for MQSeries 5.2. To do this, visit the following IBM Web site:

ftp://ftp.software.ibm.com/software/mqseries/fixes/winnt52/U200163/U200163A.exe

  Set the IBM MQSeries Service to Automatic, and then restart the computer.

Note If you do not restart the computer at this step, the BizTalk Adapter for MQSeries will not install correctly.</li> Install the BizTalk Adapter for MQSeries 1.0. To start the setup process, locate the setup folder, and then double-click BizTalkAdapterForMQS.msi. When installation has completed, verify that the BizTalk Adapter for MQSeries service is set to Manual, and then restart the computer.</li></ol>

back to the top

Set Up BizTalk Server to Send to MQSeries

 * 1) Create a local queue in MQSeries to receive documents from BizTalk Server (for example, FROMBTSTOMQSERIES ).
 * 2) In the Messaging Manager, create a BizTalk port that has the following properties:
 * 3) * A Name: of ToMQSeries
 * 4) * From an Organization
 * 5) * Primary Transport is AIC
 * 6) * Select AICMQ AIC component from the list
 * 7) Create a channel for the port. Name the channel ToMQSeries, and at the end of the channel wizard, click Advanced to view the Override options dialog box.
 * 8) In the Override options dialog box, click the Primary Transport tab.
 * 9) On the Primary Transport tab, click Properties.
 * 10) In the Properties dialog box, type the following information:
 * 11) * Servername The NetBIOS name of the computer running MQSeries (for example, testbox01 ).
 * 12) * Queue Manager The name of the queue manager you are using to hold the queue (for example, QM_testbox01 ).
 * 13) * MQ Series Queue Name The name of the local queue that you created in step 1 (for example, FROMBTSTOMQSERIES ).
 * 14) Start the DirectIntegration.exe sample to send a document to the channel that you created in steps 3 through 6. The DirectIntegration sample is located in the \Program Files\Microsoft BizTalk Server\SDK\Messaging Samples\DirectIntegration\EXE\ folder on your computer running BizTalk Server. Verify that the document has arrived in the destination MQSeries Local queue. To do this, double-click the queue in the MQSeries Queue Manager.

back to the top

Set Up MQSeries to Send to BizTalk
 Open the Microsoft Management Console (MMC) for the BizTalk Adapter for MQSeries.</li> Right-click the MMC, click New, and then click Job.</li> Type the following information: <ul> MQSeries Host Name The NetBIOS name of the computer running MQSeries (for example, testbox01 ).</li> Queue Manager Name The Queue Manager name that was created when you installed MQSeries. Typically, this name is QM_ (for example, QM_textbox01 ).</li> Transmission Queue Name This is the name of the transmission queue that is created after this job is exported to MQSeries. To reduce confusion, make this a descriptive name such as XMITTOBIZTALK. This is the MQSeries queue that is used to transmit documents to the BizTalk Adapter for MQSeries mqhelper component.</li></ul> </li> After you create this job, it may be helpful to rename the job. You can use a name for the job that logically represents the mqhelper version of an IBM MQSeries queue manager. The mqhelper uses its version of the queue manager to send documents from MQSeries to BizTalk. Therefore, a name such as BIZTALKQM may be easy to remember.</li> After you create and then rename this job, right-click the job, click All Tasks, and then click Export MQS definitions. Save this job to a file named BIZTALKQM.mqs .</li> At a command prompt, change to the directory where you saved the BIZTALKQM.mqs file.</li> Type the following command at the command prompt, and then press ENTER: <ul> For MQSeries Server 5.2, type

Runmqsc  BIZTALKQM.mqs output.txt

</li> For MQSeries Server 5.3, type

runmqsc  < BIZTALKQM.mqs

</li></ul>

Substitute the correct MQSeries queue manager name for  when you run this command. This command creates two queues in MQ Series, one remote definition queue named BIZTALKQM, and one local MQSeries queue named XMITTOBIZTALK.</li> Right-click the BIZTALKQM remote definition queue, and then click Properties.</li> Type a value for Remote Queue Name. Because BIZTALKQM logically represents the mqhelper version of an IBM MQSeries queue manager, the value for Remote Queue Name logically represents the mqhelper version of an IBM MQSeries queue. It may be helpful to use a descriptive name such as BIZTALKQ .</li></ol>

back to the top

Create a Channel and a Port in the BizTalk Messaging Manager
To create a channel and a port in the BizTalk Messaging Manager to process documents from MQSeries, create a port to file and a matching channel. It may be helpful to give the channel a descriptive name such as ToBizTalk.

back to the top

Create a Mapping for the Job in the BizTalk Adapter for MQSeries

 * 1) Open the MMC for the BizTalk Adapter for MQSeries.
 * 2) Right-click the BIZTALKQM job, click New, and then click Mapping.
 * 3) Type the following information:
 * 4) * MQSeries Queue Name This must be the same as the Remote Queue Name that you used to configure the BIZTALKQM MQSeries remote definition queue in step 9 of the &quot;Set Up MQSeries to Send to BizTalk&quot; section (for example, BIZTALKQ ).
 * 5) * Channel Name The name of the BizTalk Messaging channel that you want MQSeries to pass the document to (and an envelope if the document is not an XML document). In this example, select the channel that you created in the &quot;Create a Channel and a Port in the BizTalk Messaging Manager&quot; section (for example, ToBizTalk).
 * 6) * For this example, enable the Submit with a pass-through flag option because the document that you will be receiving from MQSeries will be only one line of text.
 * 7) Start the BizTalk Adapter for MQSeries Service.

back to the top

Write a Test Message to the MQSeries Queue
Write a test message to the MQSeries queue that is monitored by the job that you created in the BizTalk Adapter for MQSeries. To do this, follow these steps: <ol> <li>On the computer running MQSeries, run the AMQSPUT sample application from a command prompt (the AMQSPUT sample application must be in your path environment variable). AMQSPUT takes two parameters, the queue name (for example, BIZTALKQM) and the MQSeries queue manager name (for example, QM_testbox01).</li> <li> If the AMQSPUT sample application runs successfully, the following output appears: <pre class="fixed_text">Sample AMQSPUT0 start target queue is BIZTALKQM </li> <li>Type a line of text as sample data (for example, This is a test to verify the MQSeries Adapter Receive function ), and then press ENTER.</li> <li>View the folder that you specified in the BizTalk Messaging port to file that you created in the &quot;Create a Channel and a Port in the BizTalk Messaging Manager&quot; section to receive documents from MQSeries. A file that contains the text that you typed in step 3 appears in this folder.</li> <li>Press CTRL+C to quit the AMQSPUT sample application.</li></ol>

back to the top

<div class="references_section">