on 07-30-2010 12:54 AM
Hi, I am working on Email to file scenario, where I have to connect to exchange server and take the attachment of the email (xml file) and save it on to PI server. I have configured sender mail communication channel with following details:
Protocol: POP3
Message protocol: XIPAYLOAD
Mail attributes: keep attachments
Module:
1 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean 1
2 localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
1 swap.keyName Content-Description
1 swap.keyName Content-Description
1 swap.keyValue attachment,filename="MailAttachment-1.xml"
1 swap.keyValue MailAttachment-1
Also, configured receiver file adapter.
Since I donu2019t have to read mail content , I havenu2019t created any design components in ESR. I have just refrred to dummy namespace, interface (both sender and receiver). in receiver determination, interface determination, sender agreement and receiver agreements.
It was working fine, not sure what changes happened. Now I could see the attachment payload in message monitor.
Under Inbound message->payloads->
MailMessage ( text/xml;charset=utf-8 )
MailAttachment-1 ( text/xml;name="****************")
But the fille that is getting created doesnu2019t have the contents of the attachment (xml file) . It has some other information, shown below:
Directory: ******
Name: ********.xml
=NextPart_002_01CB2C5B.B033B325#
content-type:text/plain;charset="us-ascii"#
content-length:30#
content-transfer-encoding:quoted-printable#
#
<<**********.xml>>=20#
#
=NextPart_002_01CB2C5B.B033B325#
content-type:text/html;charset="us-ascii"#
content-length:#
content-transfer-encoding:quoted-printable#
#
#
=NextPart_002_01CB2C5B.B033B325 #
Can you please let me know what is going wrong here.
1 swap.keyName Content-Description
1 swap.keyName Content-Description
1 swap.keyValue attachment,filename="MailAttachment-1.xml"
1 swap.keyValue MailAttachment-1
Should Content-Disposition not included? Also there should be a semicolon between attachment and filename in swap. keyValue
1 swap.keyName Content-Disposition
1 swap.keyValue attachment;filename="MailAttachment-1.xml"
1 swap.keyName Content-Description
1 swap.keyValue MailAttachment-1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh/Abhishek,thanks for the response. I tried these options , but still file is nogetting created from xml attachment.
as i mentioned , i could see the attachment payload in monitor.
There are two payloads i could see in monitor, i could not see the contents of the first payload. But i think , file is getting created from this payload.Second payload is the xml attachment data.
do i have to create mail namespace in esr, even though i dont really need to do any mappings.
OR payload swap module is not working properly because of any parameters missing / wrongly entered.
surprisingly it was working fine few days back, not sure whether any parameters got changed...
But i think , file is getting created from this payload.Second payload is the xml attachment data.
when you use the PayloadSwapBean then the attachment goes into the mapping...the details from the attachment are considered...i think the same has been mentioned by Michal in his blog on PayloadSwapBean
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
I think there is something missing in the config.
Hello,
any news an that????
I am facing the same problem with the mail sender adapter PI7.11
What is confusing for me,
ist that the order of swap.keyName and swap.keyValue is allways differetn when I save the adapter.
It is not like in the blog from Michael.
Is this an PI problem????
I can see the mail content and the mail attachment in monitoring, but both are not swapped.
best regards
Werner
using following parameters in module resolved my problem:
MOdule name Type Module Key
-
AF_Modules/PayloadSwapBean Local Enterprise Bean transform sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Key Parameter Name Parameter value
-
transform swap.keyName Payload-Name
transform swap.keyName MailAttachment-1
-
Thanks for sharing this VAMSI.
I was stuck until your suggestion of using swap.keyName = "Payload-Name".
Also for the second module parameter I had to use swap.keyValue = "MailAttachment-1".
After this the payload swaps were finally successful for us.
Thanks also to Michal for blogging about this long ago.
Aaron Myers, Hi!
Could explain a little more how your Module look like after the solution reported?
It was like this?
Processing Sequence:
AF_Modules/PayloadSwapBean | Local Enterprise Bean | TRANSFORM
Module Configuration:
TRANSFORM | swap.keyName | Payload-Name
TRANSFORM | swap.keyValue | MailAttachment-1
I Guess 1 swap.keyName Content-Description is changed to 1 swap.keyName payload-name in PI 7.1
please check it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.