cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping of Adapter-Specific Message Attributes

h_deleeuw
Explorer
0 Kudos

Hi,

We have the requirement to build a soap request with a custom soap envelop/header which contains a sessionId.

Therefore we developed a xlst mapping which is called directly after a graphical mapping.

In the graphical mapping the session id is written to the dynamic configuration.

The goal is to read this session id in the xslt mapping from the dynamic configuration using XSLT Mapping of Adapter-Specific Message Attributes. We used [this|http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm] documentation as an example.

But we are getting the following error: TransformerConfigurationException triggered while loading XSLT mapping. The error is raised at this node: <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />

This is the coding of the xslt transformation:

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

<xsl:stylesheet version="1.0"

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

xmlns:ns1="urn:enterprise.soap.sforce.com"

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="/">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">

<soapenv:Header>

<urn:SessionHeader>

<xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />

<xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/SOAP', 'sessionId')" />

<xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)" />

<urn:sessionId><xsl:value-of select="$dynamic-value"></xsl:value-of></urn:sessionId>

</urn:SessionHeader>

</soapenv:Header>

<soapenv:Body>

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

</soapenv:Body>

</soapenv:Envelope>

</xsl:template>

</xsl:stylesheet>

Any help will be highly appreciated.

Regards, Henk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Are you passing the parameter name inputparam to transfer the constants of the StreamTransformationConstants class to the Java runtime?

h_deleeuw
Explorer
0 Kudos

Hi, thanks for your reaction.

No, I'm not passing that parameter; the xlst transformation is directly after a graphical mapping.

How should I do this?

Regards, Henk

Former Member
0 Kudos

You're welcome guy!

Take a look here (Runtime Constants and following):

http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm

h_deleeuw
Explorer
0 Kudos

Hi, I'm not sure what you suggesting.

As you can see in de coding I included, we have declared: <xsl:param name="inputparam"/> and we are using: <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" /> in the xslt transformation.

What more should we do?

Regards, Henk

Former Member
0 Kudos

I'm sorry Leeuw,

Have you tried to remove xmlns:ns1="urn:enterprise.soap.sforce.com" namespace declaration?

h_deleeuw
Explorer
0 Kudos

Hi, yes we did try that and lot's of other combination.

The results of those trials are that it seems to go wrong with <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />

When we enclose it with <xsl:if test="function-available('map:get')"> the transformation is not dumping, but the function is not available.

Regards, Henk

Former Member
0 Kudos

A "dummy" question... have you checked ASMA flag in Communication Channel?

h_deleeuw
Explorer
0 Kudos

Yes, in the receiver soap channel.

Former Member
0 Kudos

In Sender Channel??...

h_deleeuw
Explorer
0 Kudos

Yep, tried that as well.

Former Member
0 Kudos

How did you set up ASMA in sender channel?

ps. I apologize for these dummy questions, but is the only way for find a possible solution.

h_deleeuw
Explorer
0 Kudos

It is solved!

At the end it was just of the fact that JDK 1.5 does not allow for Mapping with Java enhancement it is a feature only in SAPXMLTOOL kit, select the box in the Operational mapping.

Reference:

Answers (0)