Skip to Content
-1

Source structure should contain ns0 header tag.

Feb 03, 2017 at 08:58 AM

239

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Best Answer
Samir Lambe Feb 28, 2017 at 11:41 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Muniyappan Marasamy Feb 07, 2017 at 07:56 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Manoj K Feb 07, 2017 at 09:49 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Samir Lambe Feb 14, 2017 at 12:22 PM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Samir,

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

Br,

Manoj

0

Hi Manoj,

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

0

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

0
Muniyappan Marasamy Feb 15, 2017 at 10:44 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded