on 09-10-2009 9:16 PM
Hello,
I want to set the file name of an file receiver by means of setting dynamic attributes in an UDF.
I use the following code and map the output to the root node of the target message (one input variable is var1)
-
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String myFileName = var1;
conf.put(key, myFileName);
return "";
-
When I want to test the mapping using the test tab I get a null pointer exception:
Exception:[java.lang.NullPointerException] in class com.sap.xi.tf
Could the reason be, that setting dynamic attributes does not work when testing a mapping as the mapping has to be called by the IE runtime or is there any other reason?
Hi Florain,
When you test in mapping you will get this error. To test this you need to run an end to end test. Then you will not get this error and this udf also will run.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your confirmation.
Not very nice, but at least I know it is not a problem of the UDF itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florain,
I can understand, but that is how it is designed because the filename paramter can be picked up only during the runtime. But if you use other parameters like interface, sender name etc you can test it in mapping. Please go to test tab and click on parameters tab. There you see few parameters for runtime also. You can put some value there and then you can test the mapping and you will not receive that error. You dont have filename there, so thats the reason why you are getting error. Hope in next release SAP would come up with this option.
Regards,
---Satish
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.