cancel
Showing results for 
Search instead for 
Did you mean: 

Data type / message type creation for Rest Response

Former Member
0 Kudos

Hi Experts ,

I have a Proxy to REST synchronous scenario. During response mapping I am getting the error

Runtime exception occurred during application mapping com/sap/xi/tf/_SAP_Events_MM_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_response/return. Values missing in queue context.

When I run the test from Advanced REST Client the output comes likes below structure.

      <ns2:return>

          <status> </status>

           <ns2:events>

                <ns2:event>

                </ns2:event>

          </ns2:events>

            <ns2:link>

        </ns2:return>

How can I create the datatype / message type which can accept this response from the REST WebService.

"ns2:" is not being accepted in the datatype as a valid XML Tag.

Please provide your valuable inputs.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Nick,

Create your data type like this:

Message type: The red boxes should be as is.

Message mapping test tab generate instance:

And use the java mapping provided in your previous thread .

Regards,

Mark

Former Member
0 Kudos

Hi Mark ,

Thank you so much for the guidance .

I was able to test the java mapping , but iam getting the below error in SXI_Monitor.

Linkage error while loading class events_Javamapping/Events_Javamapping; java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils


I imported the jar file in NWDS in the project build path and no errors were found in NWDS.


Can you please assist .

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Nick,

The apache commons jar file should be imported in ESR as an imported archive. This should be in the same SWCV as your java mapping.

https://commons.apache.org/proper/commons-io/

Regards,

Mark

Former Member
0 Kudos

Hi Mark ,

I got the issue . I had to import IO Utils Jar file in to ESR !

Thanks so much for your help . Much appreciated .

Answers (0)