Skip to Content
avatar image
Former Member

Need to get the Mail attachment name as it is to the receiver file adapter

I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.

Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.

Any help would be appreciated.


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 23, 2008 at 01:24 AM

    Hi VJ

    Looking at your requirement. Is there a possibility that you can get filename for the attachment in content of attachment.

    If not then as you are swapping it this will change attachment name.

    Did you tried with Dynamic Configuration bean in sender mail adapter. Set the filename properly to attachment name. Give it a try.

    In module you should be able to fetch the name and add to payload. As while mapping to target dont pass this. Where did you got stuck ?



    Add comment
    10|10000 characters needed characters exceeded

    • Does any one have a work around for Module testing even before deploying it on to the XI server?

      Where can one get the message data for static testing on the XI server? Did anyone try writing the message data to disk from with in a module?


  • Dec 29, 2008 at 11:25 PM

    Try this code:

    There is no way to test this outside the adapter engine.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Stefan Grube


      You are a god among men. My adapter now appears to have worked after I reverted back to the 7.0 code and ignored the Deprecation warnings, but only when I exported the EAR and JAR files manually ( context right click export options from within NWDS ) and not letting the deploy step create them for me. So I exported the JAR file first then the EAR file, deleted the libs from withing the EAR file then added the EAR to the deploy list.

      Again, thanks for the assistance. You should join the OSS gang as I got a quicker and more beneficial response from you.


      Mike Greer