Skip to Content
avatar image
Former Member

Message Mapping Issue with data without namespace

Hi,

I have a common xsd imported which has its own target namespace into my SWC namespace. Based on this xsd I have generated a Message Interface and webservice and given the wsdl to third party system for invoking my webservice.

The problem is I have done the message mapping based on xsd which has namespace but whereas the third party system which is consuming my webservice is sending the xml data without any namespace and because of which my mapping is failing (target structure is not getting generated as expected). I have tested the mapping with namespace and without namespace from IR already. I have explained this below with example.

I cannot change the xsd as it is a common and even cannot ask the end system to change the data format they are sending as they are sending the same data to some other systems also, which are not complaining.

How to resolve this issue in XI?

Actual xml data generated from my imported xsd (with namespace) 

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Root xmlns:ns0="http://employee/types">
   <ns0:EmployeeDetails>
      <ns0:EmployeeId>12</ns0:EmployeeId>
        <ns0:EmployeeName>XYZ</ns0:EmployeeName>
</ns0:EmployeeDetails>
</ns0:Root>

------------------------------------------------------
Actual Data coming from third party system (without namespace)

<?xml version="1.0" encoding="UTF-8"?>
<Root>
   <EmployeeDetails>
      <EmployeeId>12</EmployeeId>
        <EmployeeName>XYZ</EmployeeName>
</EmployeeDetails>
</Root>

Thanks

Amit

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 03, 2008 at 09:00 PM

    Hey

    If your sender adapter supports module enhancements you can try using XMLAnonymizerBean as given in the below blog

    https://blogs.sap.com/?p=43421

    Thanx

    Aamir

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I think that you could add a first XSLT mapping before your message mapping in the message interface mapping, that will create the same source msg extended with the required namespace ...

      Let me know if you need more info

      Chris