cancel
Showing results for 
Search instead for 
Did you mean: 

Problem filling target messages using Multi (message)map

Former Member
0 Kudos

Hi,

I have made a multimap (XML to XML with external message def.) in the (XI) message mapping tool for use without BPM.

The split is determined on 'Message1' level with a UDF.

I tested the map and it runs fine, but only the first message is filled in properly.

For all other messages some subnodes are not filled in.

The subnode appears only once in the other messages, but in the first message it appears there are multiple (this is ok).

To force that i get also multiple subnodes for the other messages i decided to create a test UDF which creates some queues:

int count = 1;

do {

result.addValue(ResultList.CC);

count++;

} while (count <= 10);

But there it goes wrong now, XI does not accept multiple subnodes for the other messages.

So it runs fine for only 1 message with this UDF, but if i use multiple messages it runs in error in the second message with the following error:

Cannot produce target element /ns0:Messages/ns0:Message1/ns1:StandardBusinessDocument[2]/ns2:message/ns2:transaction/command/ns2:documentCommand/documentCommandOperand/ns3:itemDataNotification/itemDataNotificationLineItem. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

This is strange because the node is defined in the XSD as '1...Unbounded' and it runs fine for the firstone.

Anyone an idea what can cause this problem?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi thanks for response, but problem was already solved meanwhile.

The map needed a queue for the header (number of output messages in multimap) and one for the itemlines.

The UDF that reads/builds the itemlines queue is looping over the queue that he first UDF(header) has created.

So in this way forced that for every messages the lineitem queue is build now and not only for the first message.

stefan_grube
Active Contributor
0 Kudos

With this code you only create empty contexts.

Maybe you try:

int count = 1;
do {
result.addValue("");
count++; 
} while (count <= 10);

But from your description it is not possible for me to see why the error occurred. You should look inside your mapping which queue is produced for the target field itemDataNotificationLineItem and if this queue fits to the queue of the parent field itemDataNotification.

Regards

Stefan