cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI Router not working

sugata_bagchi2
Active Contributor

Hello Experts,

I am receiving an XML in the below format - just shared the part of the XML below

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.03">
<CstmrPmtStsRpt>
<GrpHdr>
<MsgId>6906979972</MsgId>
<CreDtTm>2022-01-05T14:00:31.574-05:00</CreDtTm>
<InitgPty>
<Id>
<OrgId>
<Othr>
<Id>ZZ76832855100PX</Id>
</Othr>

In the XML there is a node and field based on which I need to Route.

But I can see Router is not working when there is this attribute -
xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.03" for the Document node

If I remove the attribute it is working.

But, when I tested this in http://xpather.com/ it is working with the attribute .

In my router I have given the following logic -

count(//TxInfAndSts/TxSts[text()="RJCT"]) >0
sample XML and Xpath rule can be found here -

http://xpather.com/00uuxGWl

Any help is appreciated.

Thanks

Sugata

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi Sugata ,

Update you namespace mapping like below :

xmlns:*=urn:iso:std:iso:20022:tech:xsd:pain.002.001.03

And XPATH in router to :

count(//*:TxInfAndSts/*:TxSts[text()="RJCT"]) >0

Thanks,

Manoj K

sugata_bagchi2
Active Contributor
0 Kudos

Thank you Manoj that worked.

I have tried with the xml namespace without the * and never realized we can use wildcard for prefix there.

Thank you for sharing this.

Thanks

Sugat

Answers (1)

Answers (1)

sam_anish1
Participant

Hi h592632 ,

Check out Namespace Mapping row of the runtime configuration properties table in below link. It will help resolve your problem.

Namespace Mapping in Runtime Configuration of Iflow

Thanks & Regards

Sam