cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Response XSLT mapping issue

Former Member
0 Kudos

Hi,

Source XML.

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

<ns0:Create__CompIntfc__APC_WORKER2_CIResponse xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI">

<ns0:notification>y</ns0:notification>

<ns0:detail>

<ns0:keyinformation>

<ns0:PERSON_ID/>

<ns0:SUBMIT_DATE/>

<ns0:ACTION/>

</ns0:keyinformation>

<ns0:messages>

<ns0:type/>

<ns0:messagesetnumber/>

<ns0:messagenumber/>

<ns0:messagetext/>

<ns0:explaintext/>

</ns0:messages>

</ns0:detail>

</ns0:Create__CompIntfc__APC_WORKER2_CIResponse>

Target XML

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

<ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><SUCCESS>y</SUCCESS></ns1:Z_HPA_357_PROVISION_USER_IMS.Response>

XSLT Mapping

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

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns1="http://authserv.apc.com/peoplesoft">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />

<xsl:template match="/">

<ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<SUCCESS>

<xsl:value-of select="soap:Create__CompIntfc__APC_WORKER2_CIResponse/a:notification" />

</SUCCESS>

</ns1:Z_HPA_357_PROVISION_USER_IMS.Response>

</xsl:template>

</xsl:stylesheet>

Can somebody help to figure out the issue in higlighted area of XSLT mapping.

We just need to move "notification" value to "SUCCESS" value of RFC.

thanks.

santosh,.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Santosh,

add the source namespace with a prefix:

xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI"

do it most simple generic without path

//

do not forget the prefix

ns0:

use xsl:value-of:

xsl:value-of select="//ns0:notification"

Regards,

Udo

Former Member
0 Kudos

Thanks for your responses.

I tried both the options, but its giving below error while testing in mapping.

TransformerConfigurationException occurred when loading XSLT IMS_Response.xsl; details: Could not compile stylesheet

Any idea where its going wrong.....

-santosh.

udo_martens
Active Contributor
0 Kudos

Hi Santosh,

check the stylesheet and its functionality first in XML Spy before you upload it to PI.

Regards,

Udo

Former Member
0 Kudos

Thanks guys.

This issue is solved.

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Try this ...

<xsl:value-of select="ns0:Create__CompIntfc__APC_WORKER2_CIResponse/ns0:notification" />

or

<xsl:value-of select="ns0:Create__CompIntfc__APC_WORKER2_CIResponse/notification" />

Hope that helps.