on 11-21-2014 9:13 AM
Hi Experts,
I am trying to create attachment using java mapping and creating the file in target using SFTP adapter, but the content ID which i set in java mapping is not coming to receiver file name in target directory, it is just writing file name as 'Attachment'.
Java mapping:
OutputAttachments outputAttachements = transformationOutput.getOutputAttachments();
String attachmentID = "Done.txt";
String attachmentContent = "Done";
String contentType = "text/plain" + ";charset = \"UTF-8\";" + "name=\"" + attachmentID + "\"";
Attachment attachment = outputAttachements.create(attachmentID, contentType, attachmentContent.getBytes());
outputAttachements.setAttachment(attachment);
Please help me if you already done this before, appreciate your help.
Regards,
Rachana.
Hi Rachana,
Have you enabled Read attachments option in interface/operation mapping
//BR,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
I have created two attachments in java mapping and SFTP adapter creates two files with file names Attachment and Attachment_1, but i already got another attachment for that message which i am picking from sender as additional file, for that attachment SFTP adapter is creating same file name as source file name, only the attachments which i am creating using java mapping is a problem.
Thanks in Advance,
Rachana.
Hi Rachana,
I had a similar requirement, in your SFTP file receiver enable ASMA and check FileName. The idea is to create the attachment via UDF, set the FileName via DynamicConfiguration and then use PayloadSwapBean by using the content type. The file should have the same name as your content ID.
swap.keyName content-type
swap.keyValue text/plain
Regards,
Mark
Hi Rachana,
Not sure if this is a bug or somthing but i have faced this issue. Check this blog for details
Thanks,
Anand
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.