cancel
Showing results for 
Search instead for 
Did you mean: 

ASMA not working

Former Member
0 Kudos

Hi ,

We have a scenario where Sender is AS2 and Recievr is FILE . We need the file name to be same as the sender adapter picks it.

I have clicked the ASMA tab and also FILENAME on the reciever side.

The ASMA doesnt seem to work.

Please suggest a solution..

Appreciate your quick help..

Thank you

Yashwanth

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos
Former Member
0 Kudos

Hi All,

Thanks for your response.

There is no mapping involved in this scenario.

The below modules have been in the sender AS2 adapter.

1 localejbs/Seeburger/solution/as2 Local Enterprise Bean solutionid

2 localejbs/CallSapAdapter Local Enterprise Bean exit

The reciever is a simple FILE adapter and is using the below modules :

1 AF_Modules/DynamicConfigurationBean Local Enterprise Bean getFileName

2 AF_Modules/DynamicConfigurationBean Local Enterprise Bean setFileName

3 CallSAPAdapter

Also there are keys to get and set the file name in the module configuration.

Still the scenario is not working.

We have another interface with exactly the same settings and it is working perfectly fine.

Please suggest.

Yash

former_member854360
Active Contributor
0 Kudos

Hi,

SetFilename is ok but get file name you need to use dtAS2FileName http://seeburger.com/xi/common/dtAS2FileName

Former Member
0 Kudos

did u check the AS2 Sender configuration part in the wiki??

From the wiki:

The module is used in the receiver File channel to create the receiver Filename with the same name as the AS2 Filename is sent from third party.

naveen_chichili
Active Contributor
0 Kudos

Hi Yashwanth,

There is some thing where you have to do some thihng in mapping.

Check this links:[Link1|http://www.saptechnical.com/Tips/XI/ASMA/Index.htm] and [Link2|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13704] [original link is broken] [original link is broken] [original link is broken];

try {

String filename = "";

String timestamp = "";

DynamicConfiguration conf1 = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");

filename = conf1.get(key1);

timestamp = conf1.get(key2);

filename = filename.replaceAll( ".txt" ,"_" );

filename = filenametimestamp".xml";

conf1.put(key1,filename);

return filename;

}

catch(Exception e)

{

String exception = e.toString();

return exception;

}

Thanks and Regards,

Naveen

Edited by: chichilin on Jul 28, 2011 4:34 PM

Former Member
0 Kudos

Hi,

This will only work if the sender and receiver adapters, both, are file adapters.

For AS2 to file, you would need to either populate the AS2 filename (dtAS2Filename) into the file adapter filename ASMA property in the message mapping or try using the dynamic config bean to achive this.

Regards

former_member854360
Active Contributor
0 Kudos

Hi,

for reading the sender AS2file name you need to need the parameter dtAS2FileName in mapping and assign it to receiver FileName

DynamicConfiguration dynConf = (DynamicConfiguration) param.getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create("http://seeburger.com/xi/common/dtAS2FileName","dtAS2FileName");