cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT for adding Namespace is not being executed at runtime

Former Member
0 Kudos

Hi Gurus,

I am trying to add a Namespace to inbound xml and I wrote a simple XSLT mapping as below, when I execute this using XML spy or in Operation mapping manually it is working fine and giving me output as expected but at runtime it is not executing, I am getting same input xml as output xml and receiver agreement is failing...

Appreciate your thoughts..

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="*">

<ns0:SalesXmlExtended xmlns:ns0="urn:/company.com/H/sndr">

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

</ns0:SalesXmlExtended>

</xsl:template>

</xsl:stylesheet>

input xml is as below....

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

<SalesXmlExtended>

<SalesReportInfo>

<SalesReport>

<Detail>

<deptNum>0270</deptNum> etc...

output I am getting in XMLSpy and OM is as below, this is exactly what I need...

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

<ns0:SalesXmlExtended xmlns:ns0="urn:/company.com/H/sndr">

<SalesReportInfo>

<SalesReport>

<Detail>

<deptNum>0270</deptNum>

.....

Thanks...

Sukarna...

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If your mapping is successful in OM, you should not have issue mostly with mapping runtime. Check the pipeline steps and see what error do you get in the mapping step. Also check any configuration issue with the receiver communication channel.

Former Member
0 Kudos

Hi Baskar,

Yeah, that is what my issue is , it shouldn't be failing but it is...

I tried by manipulating the required namespace in the input file and it is working fine with out any errors....so I am guessing the XSLT is not being executed...

I am getting below error which is valid because the transformation is not happening

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Technical Routing --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="OUTBINDING">CO_TXT_OUTBINDING_ERROR</SAP:Code>

<SAP:P1>-BS_HOUSE_OF_FRASER_DEV</SAP:P1><SAP:P2>-BD1_100,urn:.com/HoF/POS/EOD/sndr.SI_Out_HoFSales_XML</SAP:P2>

<SAP:P3/>

<SAP:P4/>

<SAP:AdditionalText>No standard agreement found for , BS_HOUSE_OF_FRASER_DEV, , BD1_100, urn:/HoF/POS/EOD/sndr, SI_Out_HoFSales_XML</SAP:AdditionalText

><SAP:Stack>Problem occurred in receiver agreement for sender -BS_HOUSE_OF_FRASER_DEV to receiver -

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>so I am guessing the XSLT is not being executed...

Can you check the payload during mapping step and see your namespace added or not in the payload? As you know mapping step takes place before receiver agreement. Also do configuration test in the ID and see any problem with your sender and business systems or services configured.

Former Member
0 Kudos

Hi Bhaskar,

I tried to update this thread yesterday couple of times but it timed out, I don't know why.

As you suggested, I ran the configuration test and found that the Interface determination is not recognized so operation mapping is ignored saying not found and sending the same XML with out transformation to Receiver determination where it is failing.

When I send an XML with the required namespace then it is working fine. I am guessing that the Interface determination is trying to compare incoming XML namespace with the PI namespace and rejecting the interface determination.

Edited by: Chirumamilla Sukarna on Jan 12, 2012 5:26 PM

Former Member
0 Kudos

For now I have created the interface using the namespace that I am getting from source system and it is working fine but the namespace is not to our naming standards.

Former Member
0 Kudos

I am adding in bits because it is timing out if I put all in one message

Is there any setting in PI that can restrict namespace comparison or is this behavior expected from PI 7.1?

Thanks...

Sukarna...