cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CPI Message mapping is it possible to retain empty XML elements on the target XML?

Raj_Nallaguntla
Explorer
0 Kudos
4,234

Hi All,

checking if its possible to send empty xml elements as for eg <ABC/> ( empty tag) on the target xml,

XML file generated from CPI MM does not include the empty tag when no value found on the source.

I understand that no value of sending empty xml element on the target

but have specific requirement to match the legacy xml file which includes empty elements . any idea or pointers ?

Thanks,

View Entire Topic
yatanveersingh
Active Participant

HI Raj,

In case the value is not coming you can use function MapWithDefault in message mapping.

Yatan

Raj_Nallaguntla
Explorer
0 Kudos

Hi Yatan,

I tried the MapWithDefault but it expects some value as default value which in my case is blank

so it will not work unless there is a way to pass just blank and not Null.?

Also I noticed if the element is included in source XML then the target retain the empty tag as expected

Source <ABC></ABC>

target <ABC/>

only if the source does not contain the tag altogether then it skips on the target totally.

Thanks

Raj