cancel
Showing results for 
Search instead for 
Did you mean: 

Source structure should contain ns0 header tag.

0 Kudos

Hi experts,

In my scenario, XSD has been created for ISO standard format, when i am consuming xml source file through sftp server it is not creating target structure coz it is expecting ns0 place holder in source xml header tag file.

1) Below is the source file structure.
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xs:pain.001.001.03">
<CstmrCdtTrfInitn></CstmrCdtTrfInitn>
</Document>

2) Below structure is expected by PI to create target structure.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Document xmlns:ns0="urn:iso:std:iso:20022:tech:xs:pain.001.001.03"> <CstmrCdtTrfInitn></CstmrCdtTrfInitn>
</ns0:Document>

Difference between both structures are place holders (ns0:, :sn0), if the same has been edited manually in source file then it creates target structure.
Please suggest solution in order to execute source xml file with original
<Document xmlns="urn:iso:std:iso:20022:tech:xs:pain.001.001.03"> tag.

Regards,
Samir.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

It is working now!!!

In XML schema give target namespace of client and xmlns of internal pi & for accepting ns0 configure elementFormDefault="qualified" in xml schema.

Thnks all for your support!!!

Regards,

Samir Lambe.

Answers (4)

Answers (4)

Muniyappan
Active Contributor
0 Kudos

What happens to mapping when you get ns0 in all tags. It is failing due to ns0 presence in all tags.

You can try below step to make it work with above adapter module settings.

You can export your Message type and save it as xsd. import the same xsd into external definition. refer https://archive.sap.com/discussions/thread/3596169

Please check if it works for xsd case

0 Kudos

Hi manoj,

With application of anonymizer.acceptNamespaces parameter with urn:iso:std:iso:20022:tech:xs:pain.001.001.03 ns0 value i am getting below XML.

<?xml version='1.0' encoding='utf-8'?>
<ns0:Document xmlns:ns0='urn:iso:std:iso:20022:tech:xs:pain.001.001.03'>
<ns0:CstmrCdtTrfInitn></ns0:CstmrCdtTrfInitn>
</ns0:Document>

ns0: is reflecting for all the tags present in file which is also not fulfilling result.

Only first tag <Document xmlns="urn:iso:std:iso:20022:tech:xs:pain.001.001.03"> should suppose to carry ns0: place holder.

manoj_khavatkopp
Active Contributor
0 Kudos

Samir,

Is the source structure XSD or is it custom created Data type?

Br,

Manoj

0 Kudos

Hi Manoj,

It is custome created Data type which has been exported as XSD.

manoj_khavatkopp
Active Contributor
0 Kudos

Set Qualify Schema for elements in your source data type then it wont be any issues if prefix is added to all tags.

manoj_khavatkopp
Active Contributor
0 Kudos

Samir,

Use XMLanonymizer bean in sender sftp channel using below parameter:

Parameter Name: anonymizer.acceptNamespaces

Parameter Value: urn:iso:std:iso:20022:tech:xs:pain.001.001.03 ns0

Br,

Manoj

Muniyappan
Active Contributor
0 Kudos

can you let us know what is your target system?

use java mapping to add the tags and call graphical mapping for mapping logic execution.

0 Kudos

Hi MM,

My target system is JDBC, though w.r.t PI it is not accepting source file. Here i am using 2 mappings first for ISO file to JDBC structure & second is from JDBC structure to JDBC. But scenario fails in first mapping itself as it is not able to create target which will be input for second mapping.

Please suggest any alternative for JAVA mapping.