cancel
Showing results for 
Search instead for 
Did you mean: 

XML generated with different prefix for the same namespace

RicardoRomero_1
Active Contributor
0 Kudos

Hello!

We have a standard WS in two systems that have different SAP version.

We have a custom program to generate a XML with a transformation. (same code in both systems)

In the system with the latest sap version the XML is generated like this:

And in the old one:

As you can see these three nodes are generated with same namespace but the last one has different prefix only in the old system.

---

This is a problem because another standard program is expecting this three nodes with the same prefix. And it's returning an error in the old system only.

Code copied from the standard report:

    CONCATENATE 
mv_header_ns_prefix ':Cabecera/'                 
mv_header_ns_prefix ':Titular/'                 
mv_header_ns_prefix ':NIF'                 
INTO iv_value_name.

"... it's looking for a node like this "n1:Cabecera/n1:Titular/n1:NIF"

lo_xml->parse_xstring( EXPORTING stream = iv_xml ).
lo_xml->find_node( EXPORTING name = iv_value_name
                           RECEIVING node = lo_node ).

---

Do you know if we can do something to generate the XML properly?

I dont have much experience with WS so any clue would be appreciated.

Thanks in advance.

Regards.

chaouki_akir
Contributor
0 Kudos

What is the name of your standard WS ?

What is the name of your standard program ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor
0 Kudos

First of all, it's not an invalid XML (just a non-optimized one, etc.), but it's your "standard program" which is limited. Why do you say "standard"? If "standard" means that SAP developed it, then ask them to correct it.

RicardoRomero_1
Active Contributor

Hi, Sandra.
Yes, SAP developed it.
Ok, I'll try to ask them to correct it.