on 08-31-2009 8:00 AM
I am having XML file to XML file scenario. I want same file name as receiver. So I have used message speific attributes. But I want file ext .mxml instead of .xml. Any help is appreciated.
hi,
then you need to change the extension in the mapping for example (using ASMA)
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This could be done with dynamic configuration(change the file extension in the udf as already been suggested) and without variable substitution.
Additional reference for Dynamic Configuration /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
Hope that helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Use Adapter specifc identifiers in sender file adapter
2. use the following code (you can use it by assigning this to the root node of the target)
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// access dynamic configuration
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String valueOld = conf.get(key);
if(valueOld == null) valuNew="default.mxml";
else {
// compute new value
String valueNew = valueOld.replaceAll(".xml", ".mxml");
// set new value
conf.put(key, valueNew);
}
3. Use variable substitution in receiver channel
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
or u can use the message transform bean for changing the same...
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use OS command (after processing) to rename the processed file.
The syntax should be something like "ftp rename f% /<path>/f%.txt"
Ps note : I am doubtful about this solution....but can have try.
Even Adapter module will be an open option...
Thanks
Swarup
Edited by: Swarup Sawant on Aug 31, 2009 9:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.