cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Sender Adapter with multiple sMIME attachments

0 Kudos

Hi!

I 'm using XI 3.0 SP 15.

I have problems with my Mail-Sender-Adapter.

The mails, I fetch, contain a certificate and multiple xml-attachments. The xml's represent an IDOC-structure (INVOIC.INVOIC02).

The task is to first check the certificate, and then to send each of the XML attachments separately to an SAP-System.

1) We have twelve partner which use this e-Invoicing interface. How do I administer the certificates and do I have to create for each partner a "Sendervereinbarung"?

2)

The second problem is, that I have multiple payloads which have to be processed separately. How can this be done?

kind regards and thanks a lot for your help

MArtin

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

No one else replies, so let's have a try

> 1) We have twelve partner which use this e-Invoicing

> interface. How do I administer the certificates and

> do I have to create for each partner a

> "Sendervereinbarung"?

For each certificate you need a different sender agreement and therefore a different sender channel.

Provide different email addresses and poll the mail server with different users.

Regards

Stefan

0 Kudos

As we have multiple xml-attachments, I guess we have a major problem anyway.

I guess Certificate verification in the sebder agreement is done after the Module Processing of the email-adapter isn't it?

Due to the multiple attachments we have to write a customer specific Module for the email-adapter anyway.

I guess the only way is that the module validates the certificate against the J2EE KeyStore and then extracts the various xml attachments to a file share.

A File sender adapter then polls the file share and the sender aggreement / receiver agreement /mapping ... process starts.

The only question is if the file adapter works also without a sender agreement, so that the xml's are stored on the file share

Do you have an idea, if this works? or do you see any alternatives?

thanks alot for your help!!

MArtin

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

there are two ways:

- you can do everything inside a java proxy for instance

(certificate validation + sending attachements one by one to the integration engine)

so more programming I guess cause you have to do everything inside this java proxy

- or you can combine processing:

a) first you validate the certificate and place attachements somewhere

b) then in a new process you can pull attachements into the integration engine (with sender agreement form some file storage) just another integration process

that uses validated attachements

Regards,

michal

stefan_grube
Active Contributor
0 Kudos

> As we have multiple xml-attachments, I guess we have

> a major problem anyway.

>

> I guess Certificate verification in the sender

> agreement is done after the Module Processing of the

> email-adapter isn't it?

No, the module processing is done after the XI message has been created be the mail adapter and you can deal with the attachments there.

But the incoming mail <b>must</b> be S/MIME. The encoded mail itself can be multipart. It is not possible to have a multipart mail with S/MIME attachment.

Regards

Stefan

0 Kudos

A short cutout of the email eml-file, which we have to process: Can XI handle this?

X-Mailer: Microsoft Outlook Express 6.00.2900.2180

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

Return-Path: centrala.decin@interpap.cz

X-OriginalArrivalTime: 30 Nov 2005 13:09:07.0624 (UTC) FILETIME=[3F135280:01C5F5AF]

This is a multi-part message in MIME format.

-


=_NextPart_000_0003_01C5F5B7.131AF040

Content-Type: multipart/mixed;

boundary="----=_NextPart_001_0004_01C5F5B7.131AF040"

.....

stefan_grube
Active Contributor
0 Kudos

Yes, but this mail is treated like a non-encrypted mail with attachments. The S/MIME part is stored in an attachment and you have to do the verification and the decryption yourself.

If you want to use the standard decryption, your mail has to look like this:

....
MIME-Version: 1.0

Content-Type: APPLICATION/PKCS7-MIME; SMIME-TYPE=enveloped-data; 

NAME="[a=cft00072][v=Omzetbelasting][k=Omzetbelasting.xml][s=1]"
Content-Transfer-Encoding: BASE64
Content-Disposition: ATTACHMENT; FILENAME="[a=cft00072][v=Omzetbelasting][k=Omzetbelasting.xml][s=1]"

MIILNwYJKoZIhvcNAQcDoIILKDCCCyQCAQAxggEEMIIBAAIBADBpMGExCzAJ....

The encoded content itself can multipart.

Regards

Stefan

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Martin,

>>>The second problem is, that I have multiple payloads which have to be processed separately. How can this be done?

in standard you can od it like this

/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step

but I don't think it works with many attachments

so most probably you'll have to do it in your own adapter module (or java proxy)

Regards,

michal

0 Kudos

Hi Michal thanks for such a quick answer!!

I thought it would be that way and therefore I looked for the EJB PayloadSwapBean to copy it and modify it for my own purpose, but i did not find it on our installation.

I the Jar fiole should be in the package:

usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.aii.af.modules

but there is no such package on our system - can you tell me where to find it??

stefan_grube
Active Contributor
0 Kudos

Here:

C:\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.aii.af.app\EJBContainer\applicationjars

Regards

Stefan