cancel
Showing results for 
Search instead for 
Did you mean: 

Same file name using JMS adapter on sender side.

Former Member
0 Kudos

Hi Friends,

I got a requirement to capture file name using JMS adapter on the sender side.

Can some one help me in resolving this issue.

Regards,

Jeevan.

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

You can use the DynamicConfigurationBean:

http://help.sap.com/saphelp_nw04/helpdata/en/45/da2239feb22e98e10000000a155369/frameset.htm

You can read the file name from a JMS header field.

stefan_grube
Active Contributor
0 Kudos

See this blog:

/people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping

Former Member
0 Kudos

kindly check this may help u [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516

]

jyothi_anagani
Active Contributor
0 Kudos

Hi ,

You can use Dynamic Configuration in mapping.

Create a UDF with input as file name and copy/paste this code


DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//conf.removeAll();
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

//String filename= conf.get(key);
conf.put(key, fileName);
key= null;

return fileName;

Thanks.

Former Member
0 Kudos

Hi,

Thanks for your reply.

But, I forgot to mension. In my scenario there is no Mapping, it is a bypass scenario and same file name is expected on the receiver side also.

Regards,

Jeevan.

jyothi_anagani
Active Contributor
0 Kudos

Hi Jeevan,

Fine then Just Check the Adapterspcific Message attributes in both Sender and receiver Communication Channels.It will be enough. you will get same file name to receiver.

Thanks.

Shabarish_Nair
Active Contributor
0 Kudos

if both your adapter types are same for the sender and receiver then just check the adapter specific properties and it should be done.

But in case to have different adapter types, then you will have to invoke the code.

if you have no mapping logic, then the best is to use a java mapping which will assign the inputstream to the outputstream (no transformation at all), and place your dynamic configuration in this java mapping.

For help on sample code etc read through - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name