Skip to Content
Former Member
Apr 03, 2006 at 12:39 PM

Adapter-Specific Attributes Retrieval



I am trying to retrieve the filename from the sender message type to be used in the mapping. In order to achieve this I ticked the Adapter-Specific message properties on both Sender and receiver CC. I created a user-defined function FilenameY with the following code to retrieve the file name. I am not importing any packages.

//write your code here

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("","FileName");

String ourSourceFileName = conf.get(key);

return ourSourceFileName;

Unfortunately I am getting the following message when I test mapping TESTMsgMapping. Any ideas why this is happening?????

RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class method FilenameY$[]

Thank you