cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping - Dynamic FileName is not getting assigned to the attachment

Former Member
0 Kudos

Hi Experts,

I am facing an issue in my java mapping . Dynamic filenames are not getting reflected while I am creating attachments in my mapping and configuring it via mail adapter .

I am getting both the attachments with the name : Attachment.txt

Following is the code that I am using ...

 

Attachment att1 = out.getOutputAttachments().create(

"content id1","text/plain;charset=\"UTF-8\";filename=\"abc.txt\"", b1);

Attachment att2 = out.getOutputAttachments().create("content id1","text/plain;charset=\"UTF-8\";filename=\"def.txt\"", b1);

 

The above code is working perfectly on PI 7.31 EXT_04_REL .... But its not working on PI 7.31 EXT_07_REL....

Please let me know if there is any workaround...

Regards

Vinay

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Look like the reason why it is working on  PI 7.31 EXT_04_REL server is that it is a dual stack server and mapping is running in IE

But the same mapping is not working on PI 7.31 EXT_07_REL which is a single stack(java) server .

Issue might be related to mapping execution in AE .

I will be raising an SAP note for the same . Will keep you all updated .

Regards

Vinay

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Attachment att1 = out.getOutputAttachments().create(

"content id1","text/plain;charset=\"UTF-8\";filename=\"abc.txt\"", b1);

Attachment att2 = out.getOutputAttachments().create("content id1","text/plain;charset=\"UTF-8\";filename=\"def.txt\"", b1);

The content id should have the attachment name, so your code should look like

Attachment attachments = out.getOutputAttachments().create("abc.txt","text/plain",b1);

attachments = out.getOutputAttachments().create("def.txt","text/plain",b1);

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for the response . I tried by mentioning the file name in the content id section as mentioned by you . Still facing the same issue.

Regards

Vinay

manigram
Active Participant
0 Kudos

Hi,

Kindly share the error details, it will easy to analysis .

Regards,

Manigandan

Former Member
0 Kudos

Hi Manigandan,

I am not getting any error . I am able to send attachments via email with 2 different payloads but the both the attachments are having the same name : "Attachment.txt", "Attachment.txt".

I am not getting an attachment by the names "abc.txt" and "def.txt"

Regards

Vinay