cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in synchronous Response Message mapping at Integration Engine

Former Member
0 Kudos

Dear Experts,

My scenario is ECC Outbound Proxy <==> SAP-PI 7.31 <===> WEb Service (WEB Page)

I am sending request to Web service of web page by using HTTP_AAE adapter (Get Method).After testing the proxy, I am able to see the succesful

synchronous  message in Tx SXMB_MONI of SAP-PI.There is no data/payload in the message.I had the put the trace as 3 in config to check the issue.

The config I did :

MT_ECC_Request and MT_WS_Request

MT_ECC_Response and MT_WS_Response

SI_ECC_OB:

Request Message : MT_ECC_Request

Response Message : MT_ECC_Response

SI_WS_IB:

Request Message : MT_WS_Request

Response Message : MT_WS_Response

Message Mapping:

MM_Request

MT_ECC_Request (Source) and MT_WS_Request (Target)

MM_Response

MT_WS_Response (Source) and MT_ECC_Response (Target)

Operation Mapping:

Request tab:

MT_ECC_Request (Source) and MT_WS_Request (Target)

Response Tab:

MT_WS_Response (Source) and MT_ECC_Response (Target)

I assumed there would be issue in the response mapping , double verified but could not found the issue.

Regards

Rebecca Alice

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Alice,

The reason for this is that there is a mismatch of the root message name in the webservice response e.g

<RESPONSE> but you are using <ns0:MT_Response>. Please recheck your response message mapping by loading the RESPONSE payload.

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

I did the response mapping test and I could find the ESR mapping test results produces the tartget structure but without any data.This is basically 1:1 mapping and each mapping is using node function : mapWithDefault

How to map the source and target structure if there is mismatch in the root node.

Source structure is

<RESPONSE>

<EXPR>USD</EXPR>

<EXCH>INR</EXCH>

<AMOUNT>1</AMOUNT>

<NPRICES>1</NPRICES>

<CONVERSION>

<DATE>Fri, 01 Jun 2001 14:06:30 GMT</DATE>

<ASK>0.02130</ASK>

<BID>0.02128</BID>

</CONVERSION>

</RESPONSE>

Target structure is

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

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

- <ns0:Message1>

- <ns1:MT_Response_OB xmlns:ns1="urn:curr.exchange.rate.integration.automation">

  <EXPR />

  <EXCH />

  <AMOUNT />

  <NPRICES />

- <CONVERSION>

  <DATE />

  <ASK />

  <BID />

  </CONVERSION>

  </ns1:MT_Response_OB>

  </ns0:Message1>

  </ns0:Messages>

Log of mapping test:

13:33:33 Start of test 

  • Document start
  • Start tag [ns0:Messages]
  • Add raw attribute [ xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"]
  • Start tag [ns0:Message1]
  • Start tag [ns1:MT_Response_OB]
  • Add raw attribute [ xmlns:ns1="urn:curr.exchange.rate.integration.automation"]
  • Start tag [EXPR]
  • Put value []
  • Close tag [EXPR]
  • Start tag [EXCH]
  • Put value []
  • Close tag [EXCH]
  • Start tag [AMOUNT]
  • Put value []
  • Close tag [AMOUNT]
  • Start tag [NPRICES]
  • Put value []
  • Close tag [NPRICES]
  • Start tag [CONVERSION]
  • Start tag [DATE]
  • Put value []
  • Close tag [DATE]
  • Start tag [ASK]
  • Put value []
  • Close tag [ASK]
  • Start tag [BID]
  • Put value []
  • Close tag [BID]
  • Close tag [CONVERSION]
  • Close tag [ns1:MT_Response_OB]
  • Close tag [ns0:Message1]
  • Close tag [ns0:Messages]
  • Document end

Execution of mapping on server took 4 milliseconds

Executed successfully  13:33:33 End of test    

PLS HELP ME ON THIS!!!!

Regards

Alice Rebecca

zameerf
Contributor
0 Kudos

Did you get the wsdl file from web service provider to construct External Definition which can be used in service interface/mapping?

I guess that might solve the issue.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

     Instead of using MT_Response_IB, your message type should look exactly like the one below

Source structure is

<RESPONSE>

<EXPR>USD</EXPR>

<EXCH>INR</EXCH>

<AMOUNT>1</AMOUNT>

<NPRICES>1</NPRICES>

<CONVERSION>

<DATE>Fri, 01 Jun 2001 14:06:30 GMT</DATE>

<ASK>0.02130</ASK>

<BID>0.02128</BID>

</CONVERSION>

</RESPONSE>

Create a datatype and message type that looks like that, use it in your service interface and response message mapping.

Hope this helps,

Mark

Former Member
0 Kudos

Hi Zameer,

The 3rd party is not SOAP based API. The data can be retrieved through HTTP_AAE Get method.

So there is no WSDL file.

I manually created the Response structure based on their response.

In the pipeline steps, it fails at the "XML Validation Inbound Channel Response" step.

Regards

Alice Rebecca

Former Member
0 Kudos

Hi Mark,

Below is my Target structure as per the source structure. But I don't think this would work as its impossible to create the same structure without the xml tags and namespace in MT and DT editor.

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

<ns0:RESPONSE xmlns:ns0="urn:curr.exchange.rate.integration.automation">

   <Response>

      <EXPR/>

      <EXCH/>

      <AMOUNT/>

      <NPRICES/>

      <Conversion>

         <DATE/>

         <ASK/>

         <BID/>

      </Conversion>

   </Response>

</ns0:RESPONSE>

Regards

Alice Rebecca

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

It is possible to remove the XML namespace in your message type by:

1. Opening your message type

2. Edit

3. Remove the entry under XML namespace.

4. Save and activate

Regards,

Mark

zameerf
Contributor
0 Kudos

I guess you can also add an XSLT mapping before your message mapping.

This XSLT should be able to add the namespace, so that your mapping would work correct.

Also, you can remove the <Response> node in your new structure as you already have RESPONSE as the message type.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Rebecca,

Why are you building your mapping to include the "mapWithDefault" for the Messages, Message1 & MT_Response_IB nodes?  For the mapping of the three levels of the XML that only deal with the structure of the XML content I would simply map 1:1 without using that function.  Since this is a nested structure you could be telling the mapping system at runtime to ignore all nested values in the XML.  I've never seen the usage of "mapWithDefault" on these nested structures before... merely at the element level to ensure one is created even if the element does not exist in the source.

Regards,

Ryan Crosby

Former Member
0 Kudos

Dear Mark,

Great !!! Lots of thanks for your input. The issue is solved.

Regards

Alice Rebecca

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Alice ,

I hope what Mark suggested to remove the XML namespace would help. Yes you may receive warning information once you activate the changes without XML namespace i.e. Using an empty namespace contradicts the WS standard.

You can ignore the message and test the response message mapping.

Regards

Robinson Thomas