cancel
Showing results for 
Search instead for 
Did you mean: 

help with Multi Mapping (Error converting Message)

jose_llamazares2
Explorer
0 Kudos

Hello, I have a proxy to jms scenario . It worked until I had  to changed the occurence of the message mapping to "0 to unbound" because I need to send multiple message (one for each company code of the source message). Now an error ocurred in the content conversion module of the receiver channel JMS: "Error converting Message: 'java.lang.Exception: Exception in XML Parser (format problem?): 'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Messages' found in document', probably configuration error in file adapter (XML parser error)''; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Can I fix this issue? The PI versión is 7.40

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Edut,

AFAIK - JMS adapter can not work with multi mapping. The option you have are

Change the target structure header node occurrence (modify XSD) and map with source

Or

Perform the two flow

Sourace --> multi mapping --> SOAP (internal service)

(internal service) SOAP --> no mapping --> JMS

The soap adapter will send the message in sequence to JMS and remove the message node.

regards,

Harish

jose_llamazares2
Explorer
0 Kudos

Hi Harish,

About  the first option that you have proposed:

I have a DT as target structure. Do you mean download the DT as XSD and editing it ?

What do I need adding in the XSD to change the target structure header node occurrence?

Thanks!

Harish
Active Contributor
0 Kudos

Hi Edut,

Yes, you can download the XSD from MT or DT and change the occurrence of first node.

regards,

Harish

jose_llamazares2
Explorer
0 Kudos

Hi Harish,

I tried setting maxOccurs="unbounded" property to the first node ("DT_0001_PROVHOST_REQ") but this does not accept that attribute because it is a complex type (view error in image bellow).

I can set this attribute to next node (RECORD) but This generates multiple records in an only messages but I need sending multiple messages to target system.

any idea?

Thank you

jose_llamazares2
Explorer
0 Kudos

Hi HIrish,

Could you explain to me the second option that you are propising, please? I need creating a second ICO?

former_member182412
Active Contributor
0 Kudos

  No need to include Messages and Message1 tags because after the mapping the system will create the separate messages and those messages does not contain Messages and Message1 tags.

Multi mapping will work for JMS adapter also, Multi mapping will work for all the adapters except which are running on ABAP stack because creating child messages happens in adapter engine. and another restriction is both sender and receiver adapter should runs on same adapter engine.

@Edu i think you changed occurrence in message mapping and operation mapping but you did not update the interface determination in the directory.

It should be updated in three places.

  • Message Mapping

  • Operation Mapping

  • Interface Determination, after re select the mapping in interface determination you will be able to see Multiplicity is 0..unbounded then system will generate the child messages, your case it is 1 that is why system is not creating child message hence you still have Messages and Message1 tags in the XML.

  • You can see this in audit log of the message like below.

Regards,

Praveen.

jose_llamazares2
Explorer
0 Kudos

hI Praveen,

You are right!!.

I changed occurrence in MM and OM but I did not update the interface determination in the directory.

I have   re selected the mapping in interface determination and now the multi mapping works!!

Thank you very much, Praveen

thanks to everyone

Regards


Edut


Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi Edut!

Did you change occurance of message in Operation mapping too?

Regards, Evgeniy.

jose_llamazares2
Explorer
0 Kudos

Hi Evgeniy!

Yes I did.

former_member194786
Active Contributor
0 Kudos

Hi Edut,

Can you post the configuration of your channel, so that we can have a look to see if the config is consistent with the payload output generated. BTW, since you have changed the mapping to multi-map, output will contain the nodes (Messages and Message1/Message2..MessageN) in output and hence it makes sense to update the content conversion parameters too.

Regards,

Sanjeev.

jose_llamazares2
Explorer
0 Kudos

Hi Sanjeev,

Ok ... I have not changed the channel after changing to multi-map...


former_member194786
Active Contributor
0 Kudos

Hi Edut,

This is how the output looks like, after multi-mapping:

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

   <ns0:Message1>

      <ns1:MT_1 xmlns:ns1="somenamespace">

         <node1>

            <field1>111</field1>

            <field2>2132134</field2>

            <field3>true</field3>

            <field4>1</field4>

         </node1>

      </ns1:MT_1>

   </ns0:Message1>

   <ns0:Message2>

      <ns1:MT_1 xmlns:ns1="somenamespace">

          <node1>

            <field1>123</field1>

            <field2>adeasd</field2>

            <field3>1122</field3>

            <field4>false</field4>

          </node1>

      </ns1:MT_1>

   </ns0:Message2>

</ns0:Messages>

Consider this and try to adjust the content conversion parameters accordingly. Also, Evgeniy has a good pointer too.

Regards,

Sanjeev.