Entering content frameProcedure documentation Configuring the Inbound JMS Adapter Locate the document in its SAP Library structure

Use

You need to configure the inbound JMS adapter to send JMS messages to the Integration Engine.

To configure the adapter you must specify the following:

Prerequisites

You have:

  1. Installed the corresponding adapter.
  2. Selected the adapter on the configuration screen.
  3. Called the adapter configuration by choosing Configure.

Procedure

The configuration of the inbound JMS adapter comprises six functional subareas:

  1. Java class name for the inbound JMS adapter
  2. Specify the class name as follows:

    classname=com.sap.aii.messaging.adapter.ModuleJMS2Transport

    This specification is mandatory.

  3. General adapter settings

You can set the following general parameters for the inbound JMS adapter:

The default value is true.

This parameter determines whether a transactional JMS session should be used or not. Following processing of a message, a transactional session ends either with a COMMIT, or in the case of an error, with a ROLLBACK.

The default value for this parameter is 0.

This parameter determines how long the system waits before processing further messages if an error occurs. In transactional processing, it can make sense to specify a certain time period, for example, because messages remain in the queue following a ROLLBACK.

  1. The message type to be received or sent

On the JMS side, the JMS adapter knows the following messages:

See the corresponding documentation on JMS for more information.

On the HTTP side, the JMS adapter knows the following message types:

This is essentially a (single or multipart) MIME message with a connection to the transport protocol (HTTP). It transports an XMBMessage.

This is an SAP-defined SOAP message with attachments that is logically based on a multipart-MIME message.

The architecture of the JMS adapter is designed so that every JMS message can be mapped to a HTTP message.

In the configuration, specify which message type you want to send:

TransportMessage.type=TransportMessage or XMBMessage

The default value is XMBMessage.

The following parameter is set at runtime:

JMSMessage.type

  1. The transformation class in which the bindings for the conversion of different message formats are implemented, and the definition of the particular bindings for the message formats.

In the configuration, specify the transformation class to be used under transformClass. The following classes are supplied:

com.sap.aii.messaging.adapter.trans.JMSTunneling

com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding

You can define your own bindings at any point and apply them to the JMS adapter by implementing a class that enhances the class com.sap.aii.messaging.adapter.trans.Transform and entering this class as the transformation class. Use the classes JMSTunneling or JMSSinglePayloadBinding as templates; their functions are explained in the following step:

In the class com.sap.aii.messaging.adapter.trans.JMSTunneling, a binding is implemented for each of the following cases:

As you can see from the class name, each binding is a kind of JMS tunneling. This means that the transport message is transported to the JMS payload.

In the class com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding, a binding is implemented for each of the following cases:

The payload of a JMSTextMessage is used as the payload of a TransportMessage. The HTTP content type is determined from the value of the parameter XMB.ContentType (default value: text/plain).

The payload of a JMSBytesMessage is used as the payload of a TransportMessage. The HTTP content type is determined from the value of the parameter XMB.ContentType (default value: application/octet-stream).

The payload of a JMSTextMessage is used as the payload of a XMBMessage. The header data of the XMBMessage is taken from the configuration, for example:

Example

XMB.SenderBusinessSystem=ExtAdapterSender

XMB.SenderInterfaceNamespace=http://sap.com/xi/xidemo

XMB.SenderInterfaceName=ExtAdapterSenderIF

XMB.ReceiverBusinessSystem=ExtAdapterReceiver

The payload of a JMSBytesMessage is used as the payload of a XMBMessage. The header data of the XMBMessage is taken from the configuration.

While JMS is used by the bindings in the class JMSTunneling as a kind of means of transport, bindings in the class JMSSinglePayloadBinding are much more specific.

The message types specified in step 3 control which binding is used at runtime.

  1. How to address the Integration Engine

Enter the complete address (URL) of the Integration Engine that you want to send the message to:

XMB.TargetURL=http://IntegrationEngineHost:port/pipeline-arguments

This specification is mandatory.

This graphic is explained in the accompanying text

The Integration Engine address can also be accessed dynamically from the System Landscape Directory. The following entry is added to the configuration for this purpose:

XMB.SLDConfiguration=SLDaccessor

In this case, for the system specified with XMB.SenderBusinessSystem, the URL of the corresponding Integration Server in the SLD is exported and the value specified under XMB.TargetURL is used instead. You also need to specify the following:

XMB.TargetURL=<fromSLD>

To be able to access the System Landscape Directory, the SLDaccessor service must be configured correspondingly and the respective entries must be maintained in the System Landscape Directory.

If an authentication was specified for the specified URL (HTTP service) in the Integration Engine, the following specifications are mandatory:

This graphic is explained in the accompanying text

The specifications must match those that you made in transaction SICF in the Integration Engine. If you do not specify a user and password combination, or the combination is invalid, the system will terminate each attempt to access the Integration Engine with the message Transport Exception: http-Error 401 – Unauthorized.

The user must have the authorizations of group SAP_XI_APPL_SERV_USER on the Integration Server.

If you use a different client or language to the default setting in the Integration Engine when logging on, you can also set the following parameters:

  1. Provider-specific settings

For more information about provider-specific settings, see Settings for the JMS Provider.

Example

Below is an example configuration for the inbound JMS adapter:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# JMS-Adapter Configuration

#

# This configuration can be used as a template to configure the JMS adapter

#

rootDirectory=JMS

***************************************************************************

#

# uncomment for receiving JMS messages

classname=com.sap.aii.messaging.adapter.ModuleJMS2Transport

# uncomment for sending JMS messages

#classname=com.sap.aii.messaging.adapter.ModuleTransport2JMS

***************************************************************************

#

# set if a transacted JMS session should be used (default: true)

#JMSSession.sessionTransacted=true

#JMSSession.sessionTransacted=false

#

# set delay in milliseconds before processing next message after an error

# (default: 0)

errorDelay=10000

***************************************************************************

#

# set the message formats you want to process

# formats are only needed if they cannot be evaluated at runtime

#

# JMSMessage Type can be set to TextMessage or BytesMessage

# it is only used for sending JMS messages

#JMSMessage.type=BytesMessage

#JMSMessage.type=TextMessage

#

# TransportMessage Type can be set to TransportMessage or XMBMessage

# it is used for sending and receiving TransportMessages and XMBMessages

#TransportMessage.type=TransportMessage

TransportMessage.type=XMBMessage

***************************************************************************

#

# uncomment and adjust parameters for Transformation Type

# (binding of JMS TransportMessage); insert your class here for an

# individual binding between JMS and TransportMessage

#

# uncomment the following line for using bindings that belong to Tunneling

#transformClass=com.sap.aii.messaging.adapter.trans.JMSTunneling

# uncomment the following line for using bindings that belong to

# SinglePayloadBinding

transformClass=com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding

#

# the following parameters are used in bindings that belong to

# SinglePayloadBinding and require XMBHeader information

#

# uncomment and adjust parameters according to your requirements

XMB.SenderBusinessSystem=ExtAdapterSender

XMB.SenderInterfaceNamespace=http://sap.com/xi/xidemo

XMB.SenderInterfaceName=ExtAdapterSenderIF

XMB.ReceiverBusinessSystem=ExtAdapterReceiver

XMB.TraceLevel=1

XMB.LoggingLevel=1

XMB.QualityOfService=EO

XMB.QueueId=ABCDEFABCDEF

XMB.ContentType=text/xml

***************************************************************************

#

# uncomment and adjust parameters for XMB.Receiver

#XMB.httpPort=3282

#XMB.httpService=/JMS

# uncomment and adjust parameters for XMB.Sender

XMB.TargetURL=http://pwdf0436:8082/sap/xi/engine?type=entry

***************************************************************************

#

# uncomment and adjust parameters for creating SonicMQ

# JMS administrated objects

JMS.QueueConnectionFactoryImpl.classname=progress.message.jclient.QueueConnectionFactory

JMS.QueueConnectionFactoryImpl.constructor=java.lang.String p49512:2506

JMS.QueueImpl.classname= progress.message.jclient.Queue

JMS.QueueImpl.constructor=java.lang.String SampleQ1

***************************************************************************

#

# uncomment and adjust parameters for creating MQSeries

# JMS administrated objects

#JMS.QueueConnectionFactoryImpl.classname=com.ibm.mq.jms.MQQueueConnectionFactory

#JMS.QueueConnectionFactoryImpl.method.setHostName=java.lang.String p24537

#JMS.QueueConnectionFactoryImpl.method.setChannel=java.lang.String JAVA.CHANNEL

#JMS.QueueConnectionFactoryImpl.method.setTransportType=java.lang.Integer {com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP}

#JMS.QueueConnectionFactoryImpl.method.setQueueManager=java.lang.String QM_p24537

#JMS.QueueImpl.classname= com.ibm.mq.jms.MQQueue

#JMS.QueueImpl.constructor=java.lang.String postcard

#JMS.QueueImpl.method.setTargetClient=java.lang.Integer {com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

 

Leaving content frame