on 07-28-2011 11:45 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi,
SetFilename is ok but get file name you need to use dtAS2FileName http://seeburger.com/xi/common/dtAS2FileName
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.