cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic configuration bean in JMS Adapter

Former Member
0 Kudos

Hello Experts,

My scenario is JMS(Active MQ) to File.Its just Passthrough scenario and no mapping involved.

Filename will be coming in one of the JMS Property (say businessId) and I need to set this filename to file adapter.

I have refered the stefan's blog and used the Dynamic configuration bean module in sender JMS adapter.

getFilename key.1 write http://sap.com/xi/System/JMS DCJMSMessageProperty4

getFilename value.1 module.filename

setFilename key.1 read http://sap.com/xi/System/File FileName

setFilename value.1 module.filename

But required filename is not populated in the target File.Any other configuration is missing here?

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Experts,

We can able to set the JMS Message properties using Dynamic configuration bean.But could nt able to read the JMS properties from activeMQ JMS Queues.Please help and provide your suggestion.

Tried many options ,but always getting the error

The JMS property sender that corresponds to the dynamic header DCJMSMessageProperty0 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

Regards,

Karthiga

former_member203665
Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Eng,

Please see the screenshot below.

Please help,how to fix this.

Harish
Active Contributor
0 Kudos

Hi Karthiga,

The dynamic configuration is having JMS header, so the problem might be that sender is not sending the property or sender is sending in some other header field which is not read/configured in sender channel.

Please try to test using the RFHUtill tool as given in blog.

regards,

Harish

engswee
Active Contributor
0 Kudos

Hi Karthiga

Your dynamic configuration section is there but there are no values from the JMS property. That is why it is null when processed on the receiver side.

Can you please provide a FULL screenshot of your JMS sender channel, including all the different tabs?

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng,

Sender system uses activeMQ JMS.Any specific configuration required at PI side to read the property from ActiveMQ JMS system?

I am using access JMS Provider Generically transport protocol.

JMS property and Modules mentioned in the above screenshot.still getting the same error

The JMS property sender that corresponds to the dynamic header DCJMSMessageProperty0 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

Regards,

Karthiga

Former Member
0 Kudos


Hi Eng,

Next option is java mapping.Can u be provide me the java code for the filename transfer from JMS to file.No mapping in my scenario,so cant use UDF.

Please check if the below code is correct.

public class xxx extends AbstractTransformation {

private Map param;

  public void setParameter(Map param) {
      this.param = param;
  }

DynamicConfiguration conf = (DynamicConfiguration) param.get(
          StreamTransformationConstants.DYNAMIC_CONFIGURATION);


private static final DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty6");
String MyFileName = conf.get(key);

         DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
        conf.put(key1,MyFileName);

}

engswee
Active Contributor
0 Kudos

Hi Karthiga

If your DCJMSMessageProperty6 is not being populated during message pickup from JMS property businessId at JMS sender channel, even if you use Java Mapping, the value will be empty.

Can you please check the DynamicConfiguration section of the SOAP Header as described by Harish above? Please provide a screenshot of that section.

Please also provide where exactly you are getting the error below. A screenshot would be really helpful.

The JMS property businessId that corresponds to the dynamic header DCJMSMessageProperty4 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng,

Please see below screenshot.Added 2 dynamic configuration bean.Please check and let me know if i am missing anything?filename is coming in businessId property.

Regards,

Karthiga

engswee
Active Contributor
0 Kudos

Hi Karthiga

The config looks fine, it should get populated in property6.

Where exactly are you hitting the error? Can you provide a screenshot?

Also, can you check with the JMS provider if indeed the value is being populated into businessId property during runtime?

Rgds

Eng Swee

Former Member
0 Kudos

Hi Karthiga,

If you are using businessId in JMS Message Properties then don't you try using the same in Module Config  Parameter value.Try using businessId there also.(write http://sap.com/xi/XI/System/JMS businessId)

Hope this may be useful

Former Member
0 Kudos


Hi Experts,

Please suggest how to pass the file name using dynamic configuration bean without mapping.I have already referred stefan blog and made the configuration in PI.But the required filename is not generated.

Former Member
0 Kudos

Hi Karthiga,

From the error i understand that file name is not coming in the DCJMSMessageProperty4

May be it is present in other property, please check the Payload and confirm.

Former Member
0 Kudos

Hi Naga,

How to read the JMS Property into PI using dynamic configuration bean.My scenario is just pass through.no mapping involved in it.Sender uses active MQ JMS.

I have already configured the additional JMS properties in sender JMS CC.added IntegrationName,sender,receiver,doctype,businessId.

But none of the property received in PI.Any configuration is missing here?

Harish
Active Contributor
0 Kudos

Hi Karthiga,

If you are on dual stack then please check the dynamic configuration in SXMB_MONI. The dynamic configuration should have DCJMSMessageProperty4 like below

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Response -->

<SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty4">FILENAME</SAP:Record>

</SAP:DynamicConfiguration>


regards,

Harish

Former Member
0 Kudos

Hi Harish,

Problem here is JMS adapter is not reading the JMS property itself.I am getting below message in JMS adapter.

The JMS property businessId that corresponds to the dynamic header DCJMSMessageProperty4 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

How to fix this issue?please help.

Harish
Active Contributor
0 Kudos

Hi Karthiga,

I would suggest to test using RFHUtill tool. Please refer the below blog

regards,

Harish

engswee
Active Contributor
0 Kudos

Hi Karthiga

Can you please provide a screenshot of your sender JMS channel configuration, in particular the part with the ASMA setting?

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng swee,

I have added the DCJMSMessageProperty4 in JMS sender advanced tab.

I could see below error in JMS adapter.

The JMS property DCJMSMessageProperty4 that corresponds to the dynamic header DCJMSMessageProperty4 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

Sender system is sending the filename in one of the JMS property called businessId.Should i need to configure businessId somewhere in JMS adapter?

Former Member
0 Kudos

Hi Eng swee,

I am getting below error.

The JMS property businessId that corresponds to the dynamic header DCJMSMessageProperty4 is missing from the JMS message ID. Hence it cannot be added as a dynamic header to the XI message.

How to fix it? Please help.

Regards

Karthiga

engswee
Active Contributor
0 Kudos

Hi Karthiga

Did you set the ASMA properties in both your sender JMS channel and receiver File channel?

For the JMS adapter, as shown below, you will need to enter the DCJMSMessageProperty4 into the table

Configuring the Sender JMS Adapter - Configuring the JMS Adapter in the Integration Directory/PCK - ...


  • If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).

In the table, enter the names of the JMS message properties whose values are to be included in the message header of the PI message.

The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.

For the File adapter, you need to check the ASMA FileName attribute.

Once you have this configured, in your message, you should be able to see that the value is in the DynamicConfiguration section of the SOAP header.

Rgds

Eng Swee

Former Member
0 Kudos