Generating an MQ import binding

Generating an MQ import binding with either a one-way operation or request-response operation is shown in this section. Once generated, the binding properties are discussed.

Prerequisite: You should have a module.
In this set of steps, you will learn how you create an MQ binding for an import. An MQ binding is used when you want to access the WebSphere MQ Messaging Provider.
  1. Open the assembly editor. From the import group on the palette, select an import component and drag it on to the canvas. An import component with no implementation and no interface is created. Right-click the component, select Add Interface from the pop-up menu and add an interface describing your interaction with an WebSphere MQ client. Generate the MQ JMS binding by selecting the component and from the pop-up menu selecting Generate Binding > Messaging Binding >MQ Binding.
    Generating an MQ binding
  2. The MQ Import Binding dialog box opens.
    Import binding for a one-way operation
    An interface with a one-way operation results in the dialog shown above. You must enter an MQ queue manager name, an MQ queue name for the send destination, host name, server channel name and port to proceed. An interface with a request-response operation produces a similar dialog as shown below with an additional field for a receive destination.
    MQ import binding configuration using an interface with a request-response operation

    Beneath End-point Configuration, select Specify properties for configuring WebSphere MQ resources (the default) or Specify JNDI name for pre-configured WebSphere MQ resources. If you choose pre-configured, then add the JNDI names for the connection factory and the send destination for a one-way operation, and send and receive destinations for a request-response operation. Typically, you would choose pre-configured if your system administrator had set up the configuration for you.

    For Connection Mode, select between Use host client connection property, where you specify the host name, server channel and port, or Use client channel definition table (CCDT), where these values are specified in the table.

    In the Data format section, select how the data will be serialized between the business object and the message. The default data bindings are Unstructured Text Message and Unstructured Binary Message for unstructured text and byte messages, and Serialized as XML and Serialized Java Object for XML and Java objects. In the case of XML, your wrapped data objects must be a complex type; they can not be a simple type.

    The alternative is for you to provide your own data binding, in which case select User Supplied. The implementation has to conform to the MQ data binding interface. Click OK. The basic MQ binding is created and shown in the properties view when the Binding tab is selected.

    You do not see a selection for a messaging domain such as point-to-point or publish-subscribe because the binding generator only supports point-to-point. The MQ JMS binding, however, does support publish-subscribe.

    Note: The MQ binding is complete as is and only if you need to change the values do you need to change them in the fields discussed below.
  3. Selecting the Binding tab shows the serialization type, data binding class and header information. WebSphere MQ headers have specific data types and parsers for them determine the data type of each field in the header. Support is provided for the MQRFH and MQRFH2 header. You can also create your own header by implementing the com.ibm.websphere.sca.mq.data.MQHeaderDataBinding class.
    General binding properties
    Note: As you proceed through the fields discussed here, remember that extensive hover help is provided on most of the generated fields.
  4. The End-point configuration tab shows the values you entered earlier for queue manager, send destination and, for a request-response operation, receive destination. Also, the client configuration information is specified if you selected Use host client connection property earlier. The coded character set identifier (CCSID) is specified. Selecting Specify JNDI name for pre-configured WebSphere MQ resources removes the fields and lets you enter the JNDI lookup names for the connection factory, send and receive queues.
    End-point configuration properties
  5. The Message Configuration tab shows the request and response (for a request-response operation) correlation options.

    In the Request Message ID Options field, New Message ID lets the queue manager select a unique message ID for the request (default). Copy from SCA message sets the message ID to be the same as the one carried in the headers of the SCA message or create one if not found.

    Set message type to MQMT_DATAGRAM or MQMT_REQUEST for request-response operation means you have the option of overriding the MessageType field.Override reply to queue of request message means you have the option of overriding the ReplyTo. The import will, by default, force the ReplyTo and MessageType fields to be appropriate values. Advanced users can switch this off, but you will have to use a mediation module to set the fields to whatever you want. Since you can easily break the import by getting these fields wrong, it is recommended you leave these options checked.

    In the Response Correlation Schema field, Correlation ID copy from Request Message ID (default) means the response message's correlation ID will be set to the request message's message ID. Response Message ID copy from Request Message ID means the response message will have a message ID field set to the request message's message ID. Correlation ID copy from Request Correlation ID means the response message will have a correlation ID set to the request message's correlation ID.

    The Response Message Correlation field is what we expect the receiving MQ application to do. If it does not do this the MQ import can not correlate requests and replies.


    Message configuration properties

  6. The Method Bindings tab shows the bound methods. By default, all methods are bound. If you add a method to the interface after you created the binding, however, a Bind operation check box becomes available to add it to the bound methods. The output and input data serialization types are shown. They are by default the same as the serialization types specified earlier.
    Method level binding properties
  7. Selecting the Security Attributes tab specifies the Secure Sockets Layer (SSL) encryption properties if required. The Cipher Suite field lists the cipher types supported. The Peer Name specifies the SSL peer name used in channel negotiation. Selecting FIPS required checks that the client connection uses a cipher suite supported by the Federal Information Processing Standards (FIPS)-approved Java Secure Sockets extension (JSSE) provider. Reset count specifies the number of bytes transmitted before the SSL encryption key is renegotiated. Certificate Revocation specifies a Lightweight Directory Access Protocol (LDAP) server with a list of SSL certificates which have been revoked; that is, they are no longer valid.
    Security attributes for an MQ binding
You have created an MQ binding for an import. Compare this approach with creating an MQ binding for an export, which is similar.
Related tasks
Generating an MQ export binding

Feedback
(C) Copyright IBM Corporation 2005, 2007. All Rights Reserved.