cancel
Showing results for 
Search instead for 
Did you mean: 

Add XSL-File to a EJB-jar-File

thorsten_hautz
Participant
0 Kudos

Hello,

we want to create a module for the mail-adapter.

This module should map the payload-xml-content to a pdf-file, that have to be sent to our customers.

To do this, we have to add the xsl-file to the EJB-jar-File. Now we have the problem that J2EE can't find this XSL-File. We get the error: java.io.FileNotFoundException.

We tried to open the file with

this.getClass.getResource("/filename").

Have we to add any entries to the files ejb-jar.xml or ejb-j2ee-engine.xml?

Thanks for your help.

Greetings

Thorsten

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi Thorsten,

is this xsl an xslt mapping for the PDF creation?

- <b>if so</b> maybe you can add this mapping as a last step

in your message mapping

- or you can include this mapping in a standard adapter module

have a look at my weblog to see both ways:

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

thorsten_hautz
Participant
0 Kudos

hi Michal,

thanks for your answer.

We have to send the original xml-payload and the generated (over XSL-FO) pdf-file as attachments in one mail.

Could this be realized with this solution?

Regards

Thorsten

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>We have to send the original xml-payload and the generated (over XSL-FO) pdf-file as attachments in one mail.

Could this be realized with this solution?

then don't set it as constant

use getContextData method to get the xsl filename

from one of the folders:

moduleContext.getContextData("dirName");

then you only have to add <b>dirName </b> parameter

in the mail adapter configuration (modules tab)

and specify the path to your xsl over there

this way you're adapter module will be reusable

and you'll have both XML-payload and the XSL

(so you'll be able to generate PDF)

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

thorsten_hautz
Participant
0 Kudos

Hi,

this could be the solution.

We will try to solve our problem on this way.

Thank you very much for your help.

Regards,

Thorsten

Answers (0)