on 08-03-2009 10:27 AM
Hi guys,
I'm trying to set up a scenario where the file will be placed into a terget directiry based on values from the incoming message. I can't use variable substitution as my target message does not contain the needed value, so I'm trying to set up a dynamic configuration in an UDF. Unfortunately, this is not working.. Any ideas, what could be wrong? The receiver FTP adapter always just takes values from it's configuration. It doesn't help when I try to change it in mapping.
This is the java map code in the UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
conf.put(key, a);
conf.put(key2, "tfilename.txt");
return "";
Thanks a lot for any help,
Olian
I hope that you have checked the ASMA variables (FileName and Directory) in your File receiver CC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope you have mapped this UDF to a node properly.
In sxmb_moni, could you find DynamicConfiguration tab in Soap Header?
Also have you selected "Adapter Specific Message Attributes" in file channel?
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use below code it will work fine
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
String a=conf.get(key);
String b=conf.get(key1);
var1 = a+b; ;
return var1;
map this udf to root element of your receiver structure.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.