Skip to Content

PI 7.4: XSLT Mapping for Dynamic Configuration.

Hi Experts,

I am getting the below error while executing XSLT mapping. I am trying to set file name dynamically in mapping(this would be used in receiver file adapter).

Transformer Configuration Exception occurred when loading XSLT Concur_TransformToFile.xsl; details: The first argument to the non-static Java function 'put' is not a valid object reference.

this is the XSLT mapping

<?xml version="1.0"?>

<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:template match="/">

<xsl:variable name="FileName" select="//FileName"/>

<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', 'FileName')"/>

<xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $FileName)" />

</xsl:template>

</xsl:stylesheet>

Any idea why it is throwing this error.

Thanks,

Sandeep Maurya.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2015 at 08:47 AM

    Did you ever find the cause of this error? I'm facing the exact same issue in PI 7.4.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2014 at 03:00 PM

    Hello,

    Inputparam parameter declaration is missing? Add the same and then check.

    XSLT Mapping of Adapter-Specific Message Attributes - Enterprise Services Repository - SAP Library

    Thanks

    Amit Srivastava

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2014 at 03:30 PM

    Hi Sandeep,

    Follow the steps pointed out by Former Member in this thread http://scn.sap.com/message/4886813#4886813


    It worked for me.


    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2014 at 04:38 PM

    I have modified ur XSLT -

    Copy/paste below code and test.

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

    <xsl:variable name="FileName" select="//FileName"/>

    <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','FileName')"/>

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

    <xsl:variable name="new-value" select="concat($dynamic-value, $FileName)"/>

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

    </xsl:template>

    </xsl:stylesheet>

    Thanks

    Amit Srivastava

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.