Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Summary

The SAP Web Application Server can be used as a JMS provider. This article describes how to configure PI to access the queues of a SAP WAS and how to use an open source tool called Hermes JMS to post and read messages from these queues.

In a future blog I will tell you how to send messages from message mapping or adapter module to the application server PI itself is running on. This gives you the possibility of asynchronous feedback during your message processing.

Setup the queues for communication

First of all you will have to create the queues you are going to use for communication. You can do that using the Netweaver Administrator. Goto the menu path “Configuration Management”>Infrastructure and choose “JMS Server configuration”. Typically you will need one sender and one response queue. You can create your own queues or use the existing demo queues for simplicity.

Configuration of PI

Configuration in PI is pretty much straight forward as you can reuse the default configuration of a newly created JMS communication channel. You only have to adjust queue names host and port information. In our simple example we will just read a message from the sender queue and write it without any changes to the receiver queue. We will use sapDemoQueue for reading with PI and sapDemoQueue2 for writing. Here is how it should look like for you for the sender channel. Receiver channel will have exactly the same configuration with a different queue name.

I leave it up to the reader to setup the complete scenario between a sender service and a receiver service without mapping.

Accessing the queues with Hermes JMS

The interesting thing is now how to upload test messages and check that they are processed and delivered correctly to the receiving queue. There is a powerful open source tool called Hermes JMS [3] that will work as a JMS client for a wide range of JMS providers. You can view edit post delete messages, create queues and topics and many more things.

There are different ways to configure Hermes JMS. One is described in [1]. I have used the standard jms client libraries from SAP. It is described in the sap help how to get them, see [2]. This way you will access the JMS Provider with standard JMS API.

First of all I suggest having a look at one of the demo videos on the Hermes JMS web site [3]. If you want to jump start do as follows. Create a new session (Menu Action>New>New session) go to the providers tab and add a classpath group with the client libraries (note that the tabs are shown at the bottom not at the top of the canvas).

Press apply and go to the session tab and fill in the connection details

Note that the port to be used will be 5+

5 Comments