cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter-Specific Message Attributes - error

Former Member
0 Kudos

Hi, I get this error in the RWB:

Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header

Any Ideas?

The code looks like this:

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;

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

In the sender file adapter did you select the adapter sprecific identifiers --> filename?

Test it in the runtime and check !

Regards

Bhavesh

Former Member
0 Kudos

Good question. I use a RFC adapter, so maybe I cant use this method. I want to dynamically create the directory and filename, based on the message content. But I dont want the target message to contain filename and directory.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

><i> I want to dynamically create the directory and filename, based on the message content.</i>

This is possible. The problem in your code is you are using the get method..

<b>String ourSourceFileName = conf.get(key);</b>

This line is used to get the filename. Now you do not have a sender file adapter and so you cannot use this.

To set the filename, use the code,

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

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

conf.put(key,FileNameforTarget);</i>

FileNameforTarget will contain the filename!

Regards

Bhavesh

Former Member
0 Kudos

Thanks!

Answers (0)