on 08-07-2008 6:23 AM
Hi,
While creating User Defined function with this following code for dynamic fieldname
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
which options should i select for cache Value, Context, Queue
for Augument , what name shd i mention.
Regards,
Varun
Hi,
U can't test the mapping having the udf which dynamically access the adapter specific settings directly. U need to configure the whole scenario first , then only u can test it.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
In Sender Communicatioin Channel. Give the File name as *.xml, so that it can pick any file irrespective of the Name.
In Advanced mode check the check box Set Adapter-Specific Message Attributes & File
In Receiver Communication Channel also do the same setting of Advanced Mode Check box for Set Adapter Specific Messag Attribure and for the File
Define the UDF as cache type ..
regards,
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
If (ourSourceFileName != null)
{
Return ourSourceFileName;
}
Return "NoFileName.txt";
Let us know if this works.
Regards,
Suddha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.