cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping Issue with data without namespace

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey

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

Thanx

Aamir

Former Member
0 Kudos

Aamir,

I am using http adapter in which doesn't support module. I have already tried that with SOAP Adapter. It's not solving my problem.

Moreover there are more than one namespace which need to be added in my structure.

Thanks

Amit

Former Member
0 Kudos

Just wild guess:)

I am not 100% sure but i guess XSLT mapping does not checks the incoming payload against the sender message type.Within XSLT mapping you can add/remove namespace as you would like,use this XSLT mapping before your actual message mapping in interface mapping.

I am saying this coz recently i was able to generate XSLT mapping(in altova Map Transform) without even specifying any sender or receiver Message type and it worked just fine.

Thanx

Aamir

Former Member
0 Kudos

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

Answers (0)