on 09-24-2013 10:47 AM
Hi All,
We have JMS to File scenario.
XML file with a specific file name is being put in the JMS queue. The JMS channel will poll the file from the queue.
We need to retrieve the file name in the mapping. The file name has an identifier concatenated and we required this identifier in the mapping.
Kindly let me know if there is a way to retrieve the file name.
Thanks,
Meenakshi
Hi Meenakshi,
Please take a look at the following link at the end of the document.
http://help.sap.com/saphelp_nw73/helpdata/en/F4/2D6189F0E27A4894AD517961762DB7/frameset.htm
You need to ask the JMS provider to provide the file name as an additional attribute and then retrieve this in your mapping.
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I think, u can ask ur JMS provider to send the file name in JMS message header and then in ur JMS sender channel u can tick ASMA -> Specify additional JMS message property -> something like FileName (confirm attribute name from ur provider) and then in PI mapping u can use below udf:
try
{
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "DCJMSMessageProperty0");
String filename = conf.get(key);
return filename;
}
catch (Exception e)
{
String exception = e.toString();
return exception;
}
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meenakshi,
I think you can retrieve the file name using dynamic config.
check the below code that may help:
---------------------------
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;
---------------------------------------------
Regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.