on 09-12-2006 3:11 PM
Hi!
I'm sending mails with a dynamic generated filename using the mail-adapter and mail-package. The file extension of the attachment should be ".txt" and the content-type should be "application/EDIFACT"
When I change the content-type of the attachment in my adapter module by
...
TextPayload attachment = msg.createTextPayload();
attachment.setName("something_dynamically_generated.txt");
attachment.setContentType("application/EDIFACT");
...
The content-type is changed properly, but the file extension ".bin" is added.
The result is in my example:
something_dynamically_generated.txt.bin
How can I stop XI from extending my filename?
I tried with the MessageTransformBean, but it had no effect.
Best regards,
Daniel
Hi,
Try changing the content type like text/plain.
Also check out this doc might be helpful
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I posted the question to fast
The problem is solved... It seems that this behaviour is changed between SP15 and SP18.
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudharshan,
we upgraded from SP15 to SP18, then the problem occured no more.
I created the attachment in an adapter-module for the mail adapter. Sample code:
TextPayload attachment = msg.createTextPayload();
attachment.setContentType("Application/EDIFACT");
attachment.setName("SomethingDynamicallyGenerated.txt");
attachment.setText(string_which_contains_the_new_payload);
msg.addAttachment(attachment);
It seems that the mail adapter checks now if a filename extension is given. If this is the case, it adds no extension by itself.
I tested different configurations like mail package and variable transportbinding / adapterspecific attributes, it worked every time.
Best regards,
Daniel
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.