on 07-25-2012 3:34 PM
Hello,
I searched through all the blogs and forums but I still cannot find the error for my configuration. Keep in mind that I tried using FileZilla with the requested file name, and it was transferred successfully.
We have a request for a specific file name in "OC_RRD_NORSKE_Purchase Order_Timestamp.xml". As such I used ASMA.
I also ticked the following attributes in ASMA:
1. Use ASMA
2. Fail if Adapter-Specific Message Attributes Missing
3. File Name
Below is my UDF
UDF: where a = Purchase Order and b = currentDate
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "OC_RRD_NORSKE_"+a+"_"+b+".xml";
conf1.put(key1,filename);
return filename;
-------------
Here is the error log in the Runtime Workbench:
25.07.2012 15:24:59 Success The message was successfully retrieved from the receive queue.
25.07.2012 15:25:00 Success Write to FTP server "10.111.2.34", directory "\test\out", -> file "OC_RRD_NORSKE_00201/12001772/OP_20120725150238.xml"
25.07.2012 15:25:00 Success Transfer: "BIN" mode, size 11825 bytes, character encoding -
25.07.2012 15:25:00 Error Attempt to process file failed with com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid
25.07.2012 15:25:00 Success Acknowledgement creation triggered for type: SystemErrorAck
25.07.2012 15:25:00 Success Acknowledgement creation triggered for type: AckNotSupported
25.07.2012 15:25:00 Error Exception caught by adapter framework: Unexpected reply codeFilename invalid
25.07.2012 15:25:00 Success Acknowledgement sent successfully for type: SystemErrorAck
25.07.2012 15:25:00 Success Acknowledgement sent successfully for type: AckNotSupported
25.07.2012 15:25:00 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Unexpected reply codeFilename invalid: com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid
25.07.2012 15:25:00 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Unexpected reply codeFilename invalid: com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid.
25.07.2012 15:25:00 Error The message status set to NDLV.
-----------
Hi Bryan,
Do you set the adapter specific parameters in the adapter file? In follow the example:
In de follow the example code:
Regards
Marcelo Macedo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have to put the purchase order(variable a) in your file name, then since it has / you cannot create a file name with / and you would get the error
Unexpected reply codeFilename invalid: com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid.
May be you can replace / with _ before passing the variable a to UDF with the help of replace string function.
Thank you for all your answers. Character "/" was indeed not allowed in the filename for FTP.
Solution used:
PO number -> replaceString -> UDF
Kr,
Bryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bryan,
Let me provide a summary of the discussion so far, and my point of view on the problem. Based on the CC monitor log you provided and the configuration screens, it looks like your configuration is OK - I think that's good news . The problem is that some special characters are not accepted by particular operating systems, as part of file names. In your case, it is the "/" character inside the PO number, that causes the problem. You can try to get rid of such special characters for instance with the following statement in your UDF code, just before you the conf1.put statement:
filename.replaceAll("[\\/:*?\"<>|]", "_"); //you can use your own replacement character instead of "_"
Also, you must know that creating a valid file name still has some factors that are not verified by this regular expression. See more detailed discussion on this topic here:
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bryan,
Following link might help you.
http://www.saptechnical.com/Tips/XI/ASMA/Index.htm
Regards
Gagandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use filename declaration as follows
String filename="";
You dont need to do forward slashes with quote here.
>DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
Change as below.
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
Make sure you pass purchase order and current date as string format.
Check whether that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same error persists:
Time Stamp Status Description
25.07.2012 17:31:24 Success Acknowledgement creation triggered for type: AckNotSupported
25.07.2012 17:31:24 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Unexpected reply codeFilename invalid: com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid
25.07.2012 17:31:24 Success Acknowledgement creation triggered for type: SystemErrorAck
25.07.2012 17:31:24 Error Attempt to process file failed with com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid
25.07.2012 17:31:24 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Unexpected reply codeFilename invalid: com.sap.aii.adapter.file.ftp.FTPEx: 550 Unexpected reply codeFilename invalid.
25.07.2012 17:31:24 Error The message status set to NDLV.
25.07.2012 17:31:24 Success Acknowledgement sent successfully for type: SystemErrorAck
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.