cancel
Showing results for 
Search instead for 
Did you mean: 

MessagesRoot-Tag error when doing multimapping that includes java mapping

Former Member
0 Kudos

Hello

I have created a multi mapping integration that has 3 message mappings in the operational mapping.  The first two are standard graphical mappings and the third is a java mapping.  All works fine when I test the operational mapping but when I run the integration I get the following error...

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- -->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">GENERIC</SAP:Code>

<SAP:P1>Messages</SAP:P1>

<SAP:P2>Root-Tag</SAP:P2>

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:Stack>MessagesRoot-Tag</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

I am assuming that the error is coming from the Java Mapping but that seems to work fine when run in eclipse...has anyone ever seen this error before?

I have attached a pic of the operational mapping.

Thanks

Matthew

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Basically you use sequence mapping. The output of one mapping should serve as input to the next mapping. Take your runtime payload data from SXMB_MONI and test it against operation mapping. This will be the good result.  Also try to add debug line in the java mapping and print the entire xml document structure. Then you need to compare against the target structure which you suppose to send. The error could be even in the first or second message mapping which does not send value to some fields in java mapping. If possible also capture errors in the exception block in the java mapping. This would show the result location. Hope that helps.

Former Member
0 Kudos

Baskar

The runtime payload from sxmb_moni works when tested against the operational mapping.

I have also used the output from the second mapping in a file to test the java mapping in eclipse and that seems ok as well.

Is there a way add a line of code to debug the mapping when it is being run properly in PI rather than straight in eclipse?

Thanks

Matthew

allamudi_loordh
Active Participant
0 Kudos

can you please check the cardinality for inbound interface ..it is given as 0..unbound. please change it to 1. same update in your interface determination once.  may i know what java mapping does. is it populating the required target structure. you can use some trace level statements inside java mapping where the logic is getting applied that you feel.

regards,

loordh.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Matthew,

                  You need to add trace statements in the java mapping code to see the program flow as shown in this example. It is possible that  java mapping is not getting as input, a proper XML as expected by the code during runtime.

Regards

Anupam

Former Member
0 Kudos

Allamudi

Basically the interface is taking a multi line message and outputting each line as an indivdual physical file.  The 0...unbounded cardinality is needed to split the original message so that they can go into the java mapping as individual messages.

I have tested the java mapping by itself and when the cardinality was 1 it worked...change it to 0..1 or 0...unbounded and it gives the MessageRoot error.

Any ideas how I can get the original message into individual message but leave the cardinality as 1?

I am trying to aviod BPM.

Thanks

Matt

allamudi_loordh
Active Participant
0 Kudos

If you are populating multi line what about the message mapping that you have given.pls check signature..how you have given

anupam_ghosh2
Active Contributor
0 Kudos

Hi Matthew,

                    Need the source xml, target xml produced by mapping, expected target xml by the business and the java mapping code to comment further on the issue.

Regards

Anupam

rajasekhar_reddy14
Active Contributor
0 Kudos

Take second level mapping output and test java mapping in eclipse .Compare output of java mapping with target expected XML structure.

zameerf
Contributor
0 Kudos

Hi Matthew,

Are you trying to test this from RWB? If so, you have to remove the Messages,Message1 nodes and test with actual payload expected from source side.

Regards,

Zameer

Former Member
0 Kudos

Zameer

It works fine in RWB its only when I run as properly that it gives the error.

Thanks

Matthew