Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Introduction:-

While doing Migration from SAP PI 7.1 to SAP PO 7.5 , I come across a situation where, I have to do end-2-end testing for newly installed JMS Libraries. Then I search corresponding blog posts, but I am unable to find full details of configuration and testing. Hence I though of creating this blog post. Hope this will help developers.

We will cover below topics in this blog post.

1) Creating JMS Queue in SAP PO 7.5

2) Creating JMS User and Roles for JMS Connection in SAP PO

3) Creating Integrated Configuration

4) Configuration of Hermes (testing tool) for end-2-end process

1) Creating JMS Queue in SAP PO 7.5

Go to SAP PO NWA --> Configuration --> JMS Server Configuration

Select JMS Resources from drop-down as shown below.



Click on Create and select "JMS Queue" from drop-down.



Below screen will pop-up.

Provide any name as per your choice and select "default" from drop-down, as shown below and save.



Below JMS Queue (jmsqueues/default/JMS_Queue_In) created, as shown below.



Like above I have created another JMS Queue (jmsqueues/default/hermes_test_pod).

2) Creating JMS User and Roles for JMS Connection

With the help of SAP security team or BASIS, we need to create one JMS user with both Consumer and Publisher Roles.

Most of times Consumer roles are added initially, but not the Publisher Roles.

Below Consumer Role and Administrator Role assign to user in NetWeaver Administrator (NWA).

  • INTEGRATION_VISIBILITY_JMS_SUBS_CONSUMER

  • Administrator


If Publisher roles are not added, we will get error as "javax.jms.JMSSecurityException: User: Guest has not permission: vpName: default, type: queue, action: consumer, destination:"

I follow SAP Note 2530840 to fix the issue.

As described in the SAP Note,

a) we need to assign below Roles to Group "Everyone" in SAP NetWeaver Administrator (NWA).

  • topic.all.all

  • queue.all.all

  • temp.topic.all.all

  • temp.queue.all.all

  • administration.all.all


Then assign the user with role Everyone.

3) Creating Integrated Configuration

Below Integrated Configuration created in Integration Builder.

This a bypass Interface, where I am posting same file, from source JMS Queue to receiver Queue of SAP PO 7.5.



a) Sender JMS Communication Channel Configuration

Configure JMS Sender Channel with below details.

Choose the correct transport protocol = Access JMS provider with JNDI

JMS Queue = jmsqueues/default/hermes_test_pod  (already created before)

Connection Factory =  Ijmsfactory/default/QueueConnectionFactory

JNDI Server Address = <hostname>:port  (port is your java host httpport + 4)

JNDI Context Factory = com.sap.engine.services.jndi.InitialContextFactoryImpl

Credential: Already created JMS User and Password.



b) Receiver JMS Communication Channel Configuration

Configure JMS Receiver Channel with below details.

Choose the correct transport protocol =  Access JMS provider with JNDI

JMS Queue =  jmsqueues/default/JMS_Queue_In ( already created before)

Connection Factory =  Ijmsfactory/default/QueueConnectionFactory

JNDI Server Address = localhost:port  (port is your java host httpport + 4)

JNDI Context Factory = com.sap.engine.services.jndi.InitialContextFactoryImpl

Credential = Already created JMS User and Password.



4) Configuration of Hermes testing tool for end-2-end process

As I am familiar with Hermes for testing JMS Queue, I will show you step by step configurations for testing.

a) You can download SOAP UI version -5.4.0 and installed in your local system.

After installation, You will find hermesJMS folder with in this, as its part of "SmartBear".

b) Copy and paste hermesJMS folder to your C drive (C:\hermesJMS)

c) Open folder hermesJMS --> bin --> hermes.bat (edit with notepad or notepad++)

d) Update below details as shown below.

  •   set HERMES_HOME=C:\hermesJMS

  • Then go to end of the file, and add below highlighted lines and save.


You can choose java 8 version of your system.

e) Open hermes.bat file.

f) Create new session and provide any session name per your choice.



g) Go to Provider tab, as shown below.

Right click --> Add Group --> Provide any Name as per your choice



h) Right click on created group --> add JARS --> select below JARs from your local system

sap.com~tc~exception~impl

sap.com~tc~je~clientlib~impl

sap.com~tc~logging~java~impl

You can find above JAR files from your basis team or if you have SFTP access to your SAP PO file path, you can find these JAR files.

Path: /usr/sap/<your PO SID>/J00/j2ee/j2eeclient

You can I have already added JAR files under group POD.



i) Then go to Sessions tab as shown below and configure with below details.

--> Plug In as "Default"

--> In Loader, select newly created group in Provider tab (POD in my case)

--> Select Class name as "hermes.JNDIQueueConnectionFactory" from drop-down.

Right click--> Add below 5 Properties and update as below.

--> Binding: jmsfactory/default/QueueConnectionFactory (standard same as above)

--> initialContextFactory: com.sap.engine.services.jndi.InitialContextFactoryImpl

--> providerURL: hostname:[httpport+4]

--> securitycrendential: password

--> securityPrincipal: user

In Destination, add both JMS queue created in SAP PO system.

Right click --> Add --> Update your JMS Queue name and go through all the fields and select OK.

Likewise you can add both your JMS Queue.





j) Once both JMS Queue created, then select Apply and OK. Now Hermes looks as below.



k) Once you double click on any JMS Queue, you will see on bottom of Hermes, its shows "Finished. No messages read". As there is no message in JMS Queue.



l) Now select JMS Queue --> Messages --> Send TextMessage --> Select any test message from your local system (I select XML file).



m) Once the message uploaded successfully, you can able to see the test file, after double click on JMS Queue. Make sure, you stop the Sender Communication Channel.



n) Once you start your Sender JMS Communication Channel, test file will be picked and deleted from source JMS Queue and posted to Receiver Queue.



o) Now you can see one Successful message in SAP PO Message Monitor and test file in receiver JMS Queue.



 

Note: -

  1. This configuration done on SAP PO 7.5 SP7.

  2. This blog post created to test, newly installed JMS libraries in SAP PO 7.5. Even you can use according to your requirements.

  3. Any Suggestion on this blog post is always welcome.

  4. You might find different way of doing this, but I found easiest way to test using Hermes.

2 Comments
Labels in this area