on 06-12-2009 7:44 AM
Hi all,
I have the requirement of getting same file name with timestamp on the receiver side (EX.Filename_timestamp) by modifying the Adapterspecific messageattributes refering the following blog
and wrote the code as specifeid in the blog as follows mapped to some
dummy variable on the target side
//write your code here
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");
FileName = conf1.get(key1);
TimeStamp = container.getTransformationParameters().get
(StreamTransformationConstants.TIME_SENT).toString();
FileName = FileName.replaceAll( ".txt" ,"_" );
FileName = FileName;
conf1.put(key1,FileName);
return FileName;
but iam getting an error as follows in the receiver side communication channel moniroting.
Message processing failed. Cause:com.sap.aii.af.ra.ms.api.RecoverableException: Rename failed.:
com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.
An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor.
Can anybody give me an idea of how to reslove the error.
Thanks,
Ram.
check if your ftp server have predefined maximum limit on length of filename ,
(try small name or by giving without time stamp)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
> An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor.
Check that your Id doesn't have authorisation to rename the file.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont think it is a permission issue...it seems to be due to the way the UDF is defined....are you successful in giving the fileName (without TImeStamp)....
also can you change the String FileName = ""; to String fileName = ""; .....may be it is conflicting with the
DynamicConfigurationKey key1 = DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/File","FileName");
Also when you do Dynamic Configuration the return statement is not needed....the value gets populated into the ASMA attribute directly....
Edited by: abhishek salvi on Jun 12, 2009 12:59 PM
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.