cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Exception: Requested index value not covered by interface configuration

former_member192561
Participant
0 Kudos

Hi All,

I have the following error on an ICO in RWB/Message monitoring.  I use XSLT to split one to many. The mapping works fine if the split results in one target message. If the message splits results in multiple target messages then I have the following error.

Executing Request Mapping "http://xxxxx.com/xxxxx/IC/OM_COD_COD_ContactPersonSelfIntiateRequest" (SWCV f7f3c160327f11e4b01dffc6ac15312e

Mapping "http://xxxxx.com/xxxxx/IC/OM_COD_COD_ContactPersonSelfIntiateRequest" failed to execute: MappingException: Requested index value not covered by interface configuration

"Transmitting the message to endpoint using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.service.mapping.MappingException: Requested index value not covered by interface configuration"

Background of ICO

ICO is SOAP Async to SOAP Sync using Sync-Async bridge. ( working fine )

In addition to this , Sender System sends a bulk message which has to be split into Multiple Message for the target. So , I have created an XLST mapping which splits the BULK message into individual messages.

I use XSLT mapping

<xsl:template match="/">

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

  <xsl:for-each select="/ns0:Messages/ns0:Message1/n4:BusinessPartnerSUITEBulkReplicateRequest/BusinessPartnerSUITEReplicateRequestMessage/BusinessPartner/Role[RoleCode='BUP001']">

  <xsl:variable name="i" select="position()"/>

  <xsl:choose>

  <xsl:when test="$i = 1">

  <ns0:Message1>

  <xsl:apply-templates select="."/>

  </ns0:Message1>

  </xsl:when>

  <xsl:when test="$i =2">

  <ns0:Message2>

  <xsl:apply-templates select="."/>

  </ns0:Message2>

  </xsl:when>

.

.

.

.

  <xsl:otherwise>

  <ns0:Message15>

  <xsl:apply-templates select="."/>

  </ns0:Message15>

  </xsl:otherwise>

  </xsl:choose>

  </xsl:for-each>

  </ns0:Messages>


Any suggestion where I'm overlooking 

Amber Badam

Accepted Solutions (0)

Answers (2)

Answers (2)

engswee
Active Contributor
0 Kudos

Hi Amber

Just curious, any particular reason for using XSLT to split the messages? Splitting can also be achieved via multi-mapping in graphical message mapping - might sometimes be easier to develop and debug too.

Regards

Eng Swee

former_member192561
Participant
0 Kudos

After a small break , I'm back to Business again

Multi-Mapping would be very tedious, given the complexity of the request and no. of fields that has to be transformed. I have the following request in Outbound. Sequence of the message types in the request is not constant.

<Root>

<Business Partner>

<role>MAIN</role>

<name>Main_BP</name>

</Business Partner>


<Business Partner>

<role>CP</role>

<name>ContactPerson1</name>

</Business Partner>

<Business Partner>

<role>CP</role>

<name>ContactPerson2</name>

</Business Partner>

...

...

...

<Business Partner>

<role>CP</role>

<name>ContactPersonn</name>

</Business Partner>

</Root>

Target should be following way. I.e. For every Contact Person , I need an individual message sent to

1st Message

<Root>

<TargetMessage>

<name>ContactPerson1</name>

<name>Main_BP</name>

</TargetMessage>

</Root>

2nd Message

<Root>

<TargetMessage>

<name>ContactPerson2</name>

<name>Main_BP</name>

</TargetMessage>

</Root>


nth Message.

<Root>

<TargetMessage>

<name>ContactPersonn</name>

<name>Main_BP</name>

</TargetMessage>

</Root>



When I execute the XSLT mapping in STLUS Studio it works fine. It generates n number of individual messages.



However in PI I get the following error

Executing Request Mapping "http://xxxxx.com/xxxxx/IC/OM_COD_COD_ContactPersonSelfIntiateRequest" (SWCV f7f3c160327f11e4b01dffc6ac15312e

Mapping "http://xxxxx.com/xxxxx/IC/OM_COD_COD_ContactPersonSelfIntiateRequest" failed to execute: MappingException: Requested index value not covered by interface configuration

"Transmitting the message to endpoint using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.service.mapping.MappingException: Requested index value not covered by interface configuration"


engswee
Active Contributor
0 Kudos

Sorry, XSLT not really one of my key strengths so I'm not able to comment further on this. Saying that, I won't be surprised if there are limitations of the XSLT processing in PI compared to other external tools.

former_member700883
Discoverer
0 Kudos

Hi.
I have a similar problem. How did you manage to solve this problem?
Thank you!

iaki_vila
Active Contributor
0 Kudos

Hi Amber,

First of all, you don't need a variable, you can use the position() function inside the xsl:when, but this is not the cause of the problem.

On the other hand, i've thought if your XML doesn't have any Role tag with the attribute RoleCode with the value BUP001 you don't generate the messages tag, and this would be a problem.

Have you set the service interfaces with the correct XSD structure ns0:messages/ns0:message?

Have you define in your XSLT the n4 namespace?

Have you test with an external tool the XSLT (XSLT Transformation - Online Toolz)?

You have an example here Multi Mapping with Java and XSLT mappings - Java Development - SCN Wiki but your code seems to be according with the example.

Regards,

former_member192561
Participant
0 Kudos

Hi Inaki,

when occurrence of RoleCode is once, then the mapping works fine. When RoleCode appears more than once in the source then the XSLT goes some how wrong.

When executed standalone on STYLUS studio or XSLT transformation tools, XSL works absolutely fine with any number of RoleCode Occurrences.

Do you know, if one could use variables inside XSLT for PI ?