cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help in XSLT Mapping

maheswarareddykonda
Active Contributor
0 Kudos

HI,

I am trying to write the code for valuemapping in xslt code by using below link.

my actual requirement is need to fetch source system name by using xslt code and need to validate by value mapping and pass to target.

below is the code i written but unfortunatly its not working and error is header_valuemapping.xsl: line 17: Variable or parameter 'SenderService' is undefined.

can any one please help me , where i am wrong?

<wsse:Username>

<xsl:param name="SenderService"/>

<xsl:variable name="SS">

   <xsl:value-of select="$SenderService"/>

</xsl:variable>

   <xsl:value-of select="vm:executeMapping( 'USER', 'USER1', $SenderService, 'TARUSER', 'TARUSER1')"/>

</wsse:Username>

<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">

<xsl:value-of select="vm:executeMapping( 'PWD', 'PWD1', $SenderService, 'TARPWD', 'TARPWD1')"/>

</wsse:Password>

Accepted Solutions (0)

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Maheswarareddy,

Have you defined xmlns:wm="com.sap.aii.mapping.value.api.XIVMService"?


Try to set <xsl:param name="SenderService"/> before your <xsl:template match="/">

Regards.


maheswarareddykonda
Active Contributor
0 Kudos

Hi Inaki,

Yes, i have declared above namespace.

any other clues please.

former_member186851
Active Contributor
0 Kudos

Hello Mahesh,

I guess in the value of select statment you should give the parameter name as "SS".

<xsl:value-of select="vm:executeMapping( 'USER', 'USER1', "$SS", 'TARUSER', 'TARUSER1')"/>

Try this.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Raghu,

i had tried that too, that time error is same but instead SenderService its getting popup with SS..like below

header_valuemapping.xsl: line 17: Variable or parameter 'SenderService' is undefined.

any other clues please..

former_member186851
Active Contributor
0 Kudos

Hello Mahesh,

Try like this

<xsl:param name="="$SenderService"/>

<xsl:value-of select="vm:executeMapping( 'Sender', 'Designation', $SenderService, 'Receiver', 'Designation')"/>

And also include

xmlns:vm="com.sap.aii.mapping.value.api.XIVMService"

maheswarareddykonda
Active Contributor
0 Kudos

HI Raghu,

i tryied as u suggested, its throwing an error "An attribute whose value must be a QName or whitespace-separated list of QNames had the value"

I declared namespace too.

former_member186851
Active Contributor
0 Kudos

Oops It was typo error. Change the param name like below

<xsl:param name="$SenderService"/>

maheswarareddykonda
Active Contributor
0 Kudos

thanks, i have corrected that time itself and not working.

anyway i am able to get sender system name , incase i keep only below code

<xsl:param name="SenderService"/>

     <xsl:variable name="SS">

       <xsl:value-of select="$SenderService"/>

     </xsl:variable>

  <xsl:value-of select="$SS"/>

and i am expecting output of above code need to be keep in value mapping, i had tryied so many ways with changes but its not working...

please suggest..

former_member186851
Active Contributor
0 Kudos

I doubt you can send the variable as the input to the value mapping.

Try parameterized XSLT mapping with Java