Skip to Content
0

HCI PI - Gather two payloads and transform mapping -> "Cannot produce target element"

Aug 07, 2017 at 12:51 PM

316

avatar image

Dear Community,

I’d like to add to an given xml-payload some additional information via an external REST-service. The Rest-Serice-call is made by a “request-reply” element. To consolidate the initial payload and the rest-reply I used a join and a gather-Elemen:

The consolidated xml (after the gather-element) looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<multimap:Messages xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge">
  <multimap:Message1>
    <Response xmlns:Response="xs">
    <MetaInfo>
      <Timestamp>2017-08-07T11:27:46.595+0000</Timestamp>
    </MetaInfo>
    <View>
      <Atr1>Example1</Atr1>
      <Atr2>Example2</Atr2>
      <Atr3>Example3</Atr3>
    </View>
  </Response>
</multimap:Message1>
  <multimap:Message2>
    <Customer>
      <Timestamp>2017-08-07T12:07:58Z</Timestamp>
      <EMailAddress>test@test.com</EMailAddress>
    </Customer>
  </multimap:Message2>
</multimap:Messages>

In the last step, I added a mapping, so that the payload is transformed in the needed ODATA-payload structure for hybris Marketing.

Although all necessary information is available, I get the following error message:

com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot produce target element /ns0:Messages/ns0:Message1/ImportHeaders/ImportHeader/Contacts/Contact/Timestamp. Queue has not enougth values in context. Target xsd requires a value for this element, but target field mapping does not produce one. Probably the xml-instance is not valid to the source xsd, or the target field mapping does not fulfill the requirement of the target xsd.

Thank you,
best regards,
Peter

hci.png (26.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Aug 07, 2017 at 03:27 PM
0

Hi Peter,

Hope tracing capability is on in your tenant.

Take the xml message before entering into your last mapping step and test this in your iFlow mapping step. Use simulate option in Web UI to test how your mapping is performing.

Thanks,

Apu

Share
10 |10000 characters needed characters left characters exceeded
Peter Meier Aug 08, 2017 at 08:37 AM
0

Thank you! I had the xsd files in the wrong order; I changed "Customer.xsd" <-> "Response.xsd"

Share
10 |10000 characters needed characters left characters exceeded