cancel
Showing results for 
Search instead for 
Did you mean: 

Access XSLT in EJB Adapter Module

Former Member
0 Kudos

Hi!

I want to use a XSLT in my adapter module. If I add this XSLT to my EJB project in the SAP Netweaver Developer Studio, how can I access it via Java?

I tried something in this way:

Source xsltSource;

xsltSource = new StreamSource(new InputStreamReader(NameOfTheClass.class.getResource("NameOfXSLT.xsl").openStream()));

But this ends with a NullPointerException

How can I access the XSLT?

Best regards,

Daniel

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Daniel,

This blog by michal accesses XSL mapping in the Adapter using Adapter Modules. Check if this can help,

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

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

thanks for the link to Michals blog.

Meanwhile, I found the problem in the code, this solution works:

Source xsltSource = null;

xsltSource = new StreamSource(

new InputStreamReader(

NameOfTheClass.class.getResourceAsStream("NameOfTheXSLT.xsl")));

Best regards,

Daniel