+

Search Tips | Advanced Search

IBM MQ custom channel for WCF: What's installed?

The custom channel for IBM MQ is a transport channel using the Microsoft Windows Communication Foundation (WCF) unified programming model. The custom channel is installed by default as part of the installation.


IBM MQ custom channel for WCF

The custom channel and its dependencies are contained within the Java and .NET Messaging and Web Services component, which is installed by default. When upgrading IBM MQ from an earlier version thanIBM MQ Version 8.0, the update installs the IBM MQ custom channel for WCF by default if the Java and .NET Messaging and Web Services component was previously installed in an earlier installation.

The .NET Messaging and Web Services component contains the IBM.XMS.WCF.dll file, and the IBM.WMQ.WCF.dll file, and these files are the main custom channel assembly, which contains the WCF interface classes. These files are installed in the Global Assembly Cache (GAC) and are also available in the following directory: MQ_INSTALLATION_PATH \bin where MQ_INSTALLATION_PATH is the directory in which IBM MQ is installed.

The following table summarizes the key classes that are required for using the custom channel.

  SOAP/JMS interface (Existing) Non-SOAP/Non-JMS interface (From IBM MQ Version 8.0 )
Custom Channel Assembly IBM.XMS.WCF.dll IBM.WMQ.WCF.dll
Transport Binding Name IBM.XMS.WCF.SoapJmsIbmTransportBindingElement IBM.WMQ.WCF.WmqIbmTransportBindingElement
Transport Binding Importer IBM.XMS.WCF.SoapJmsIbmTransportBindingElementImporter IBM.WMQ.WCF.WmqIbmTransportBindingElementImporter
Transport Binding Config IBM.XMS.WCF.SoapJmsIbmTransportBindingElementConfig IBM.WMQ.WCF.WmqIbmTransportBindingElementConfig
Samples(Oneway) SimpleOneWay_Client, SimpleOneWay_Service MQMessaging_OneWay_Client,MQMessaging_OneWay_Service
Samples(RequestReply) SimpleRequestReply_Client, SimpleRequestReply_Service MQMessaging_RequestReply_Client,MQMessaging_RequestReply_Service

IBM.WMQ.WCF.dll supports both SOAP/JMS and Non-SOAP/Non-JMS interfaces. New applications developed are recommended to use the IBM.WMQ.WCF assembly as it supports both interfaces.


Send MQSTR formatted messages

If the request message is of type MQSTR, we can select to send the reply message in MQSTR format.

We must use an additional URI parameter replyMessageFormat to change the format of the reply message. The supported values are:

    ""
    " " is the default value.
    The reply message is in byte (MQMFT_NONE) format. For example:
    "jms:/queue?destination=SampleQ@QM1&connectionFactory=binding(server)connectQueueManager(QM1)
    &initialContextFactory=com.ibm.mq.jms.Nojndi&replyDestination=SampleReplyQ&replyMessageFormat= "

    MQSTR
    The reply message is in MQSTR (MQMFT_STRING) format. For example:
    "jms:/queue?destination=SampleQ@QM1&connectionFactory=binding(server)connectQueueManager(QM1)
    &initialContextFactory=com.ibm.mq.jms.Nojndi&replyDestination=SampleReplyQ&replyMessageFormat=MQSTR"

Notes:

  1. The value for replyMessageFormat is case insensitive.
  2. Use any value other than " " or MQSTR, causes an invalid parameter value exception.


IBM MQ custom channel samples

The samples provide some simple examples of how the IBM MQ custom channel for WCF can be used. The samples and their associated files are located in the MQ_INSTALLATION_PATH \tools\dotnet\samples\cs\wcf directory, where MQ_INSTALLATION_PATH is the installation directory for IBM MQ. For more information on the IBM MQ custom channel samples, see Use the WCF samples.


svcutil.exe.config

The svcutil.exe.config is an example of the configuration settings required to enable the Microsoft WCF svcutil client proxy generation tool to recognize the custom channel. The svcutil.exe.config file is located in the MQ_INSTALLATION_PATH \tools\wcf\docs\examples\ directory, where MQ_INSTALLATION_PATH is the installation directory for IBM MQ. For more information on using the svcutil.exe.config, see Generating a WCF client proxy and application configuration files using the svcutil tool with metadata from a running service.

Parent topic: Introduction to the IBM MQ custom channel for WCF with .NET

Last updated: 2020-10-04