cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter Specific Message Attributes

Former Member
0 Kudos

Hello,

I am trying to use Adapter-Specific Message Attributes (ASMA) to retrieve filename from the adapter. Every place which talks about the ASMA has the samecode.

I have activated in the file adapter and checked box for filename. The message SOAP Header has Dynamic Configuration populated for FileName, still my map gives me <b>null</b> value when I execute 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;

Any ideas.

Thanks

Shravan

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Shravan,

do you execute the piece of code in a message mapping

in the interface determination ?

Regards,

michal

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

Shravan,

if you're testing in message mapping, you'll always get an error, since there's no message header in message mapping itself. Try using Interface Mapping test for this.

Regards,

Henrique.