on 09-02-2011 2:38 PM
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
Hello,
Are you passing the parameter name inputparam to transfer the constants of the StreamTransformationConstants class to the Java runtime?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome guy!
Take a look here (Runtime Constants and following):
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/frameset.htm
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
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
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.