cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT mapping error in PI 7.1

Former Member
0 Kudos

Hi,

The below xslt compiles and runs fine with SAPXML toolkit but the same fails with error

u201CCannot find external method 'java.util.Map.get' (must be public).".

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:map="java:java.util.Map"

xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"

xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">

<xsl:output indent="no" />

<xsl:param name="inputparam"/>

<xsl:template match="/">

<!-- change dynamic configuration -->

<xsl:variable name="dynamic-conf"

select="map:get($inputparam, 'DynamicConfiguration')" />

<xsl:variable name="dynamic-key"

select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />

<xsl:variable name="dynamic-value"

select="dyn:get($dynamic-conf, $dynamic-key)" />

<xsl:variable name="new-value"

select="concat($dynamic-value, 'subfolder\')" />

<xsl:variable name="dummy"

select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />

<!-- copy payload -->

<xsl:copy-of select="." />

</xsl:template>

</xsl:stylesheet>

Regards,

Vishal

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

Java mapping in XSLT requests SAPXMLTOOLKIT. so check the flag in operation mapping.

Former Member
0 Kudos

Hi Stefan,

I want use Jdk xsltc parser in order to gain performance. The XSLT runs fine with sapxmltoolkit but it throws the error when a jdk parser is used (i.e when the sampxmltoolkit checkbox is unchecked).

Regards,

Vishal

former_member200962
Active Contributor
0 Kudos

Without using SAP XML Toolkit option if you want to use the XSLT mapping then please note that the JDK should be JDK5. For JDK versions below 5 you wont be able to process the XSLT without using the above mentioned option.

Regards,

Abhishek.

Former Member
0 Kudos

I am already using jdk 5 for the same.

Could anybody tell me how can I access map as a parameter in xsltc. I read in some forum that map cannot be accessed directly in xsltc. Is this correct or Is there any way to access it ?

former_member192105
Participant
0 Kudos

Hi,

I am already using jdk 5 for the same.

Can you please tell me what is the setting(s) that need to be done for XSLT to be used with JDK5.

I have a knowledge on how to develop a XSLT mapping, but fail to understand what is the relation between XSLT and JDK5.

It will be very helpful to me if you post your reply to my question here:

Appreciate your help and time.

Thanks.

stefan_grube
Active Contributor
0 Kudos

> I am already using jdk 5 for the same.

> Could anybody tell me how can I access map as a parameter in xslt.

This is not possible. JDK 5 does not support Java calls in XSLT.