” has mixed Content.
One of my scenario had this mixed content element and was required to be handled in XI.
The first problem was how to create the datatype. In the Data Type creation once an element is given Type, subelement cant be created for this. If subelement is created the parent automatically becomes complex type.
Inserting subelement for an element having global type, results as shown in screenshot below.
Assigning type to complex element, results as shown in screenshot below.
The problem was solved by creating “xsd” of the input structure and importing it as external definition. Similarly the output structure was also imported.
The scenario was finished using these external definitions and Graphical Mapping. The entire scenario worked fine without any errors, but the output payload didn’t had text values of the mixed content element.
This was a round about solution that solved my problem initially.
In this method, the problem was handled by use of File Adapter Modules.
1. Get the input payload inside the adapter module.
2. Parse it using any XML parser that can handle mixed content.
3. Convert the mixed content element to normal complex type element by putting the text values into another subelement. Something like this
the scenario was successfully finished, by using external definitions (xsd) for datatypes and JAVA Mapping as mapping technique.
This seems to be a strange scenario and this blog is to share it with the developer community.