Skip to Content
Author's profile photo Ashish Goyal

Sync SOAP to Async Target – Send messageID back to source as response message (Without BPM)

Tags: PI 7.31, noBPM, Sync-Aync Bridge using adapter modules, UDF to read Message ID, Set Message ID as the correlation ID.

So we recently received a requirement where the Source System will send a request in synchronous mode and expects a PI message ID back as part of the response. The Target system in this case is ECC and the message is posted as an IDOC.

As this is a high volume interface we started looking at ways to achieve the same without BPM.

Though in my case the target was IDOC, for POC purposes I used File Receiver Channel.

ESR Objects:

Service Interface:

  • Synchronous outbound interface –  Containing Request and Response for the Source
  • 1st Synchronous inbound interface – Containing IDOC as part of the request and any dummy message type for response. This dummy response will not be used
  • 2nd Synchronous inbound interface – Here Request message will be the response message for SOAP (the one used in Synchronous outbound interface) and any dummy message type for response. This dummy response will not be used. You can use the same dummy MT used in the interface above.

Message Mapping:

  • Map the request soap to IDOC structure
  • Map the SOAP Request to SOAP Response structure and use a UDF here to populate the response field with Message ID.

Operation Mapping:

  • Map Sync outbound to 1st sync inbound interface. Populate the request mapping and leave the response mapping blank
  • Map the Sync outbound to 2nd sync inbound interface. Populate the request mapping and leave the response mapping blank


ID Objects:

Communication Channels:

  • One sender SOAP channel in Best Effort Mode – This is to receive and send request from/to Web service consumer. This adapter uses the following modules:
    1. AF_Modules/RequestOnewayBean – To convert the sync request to Async
    2. AF_Modules/DynamicConfigurationBean – To set message ID as the correlation ID
    3. CallSapAdapter – Standard SOAP module
    4. AF_Modules/WaitResponseBean – Wait for the response message

  • One File Receiver – This to send the request to the target system in asynchronous mode.
  • One SOAP Receiver – This is to send a notification back to Sender SOAP. This adapter uses the following modules:
    1. AF_Modules/DynamicConfigurationBean – To set the correlation ID
    2. AF_Modules/NotifyResponseBean – To send a response back to the sender SOAP channel WaitResponseBean module


Note – The sole purpose of this adapter is to send a notification back to the Sender SOAP channel which is waiting for a response via WaitResponseBean and hence any receiver adapter type can be used here. Also note that the standard adapter module ‘CallSapAdapter’ has been removed from the module list.

ICO Configuration (Scenario works fine with Classic design as well):


Test Results via SOAP UI:

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo omar ra
      omar ra

      Thank you so much.

      I have implemented a solution on SAP PI 7.4 only using SOAP (Snd & Rcv).

      This blog helped to me like a model and i have changed the ICO for an iFlow.

      Regards.

       

      Author's profile photo Former Member
      Former Member

      Thanks Ashish

      Superb article and very well explained steps. I stumbled onto an issue but that was just a mistyping error.

      Thanks for posting the blog. Helped me meet my requirement

      Regards

      Sonal

      Author's profile photo JEENAT PARVEEN
      JEENAT PARVEEN

      Hey Ashish,

       

      what is the Target URL in the "Receiver Soap to Notify Soap Sender" Channel. I am trying to implement the same scenario but facing some error.

      Author's profile photo Philippe Addor
      Philippe Addor

      I think you can use a dummy url (e.g. http://dummy.com). It's not actually calling it, since the CallSoapAdapter step is removed. So it's simply to notify the waiting request and then terminate.

      Author's profile photo Taranpreet Kaur
      Taranpreet Kaur

      I am getting no correlationId found error upon following this need help....

       

      MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: found no correlation ID
      8/26/2020 04:23:31.486 PM Error Exception caught by adapter framework: found no correlation ID
      8/26/2020 04:23:31.486 PM Error Transmitting the message to endpoint <local> using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: found no correlation ID
      Author's profile photo Taranpreet Kaur
      Taranpreet Kaur

      I corrected few settings and now messages are going successfully from ECC to PO but I am getting below error when trying to send resp back to ECC:-

      area="INTERNAL">ATTRIBUTE_UNEXPECTED_VALUE</SAP:Code>

      <SAP:P1>MessageId</SAP:P1>

      <SAP:P2>EAE7E57B533344F1A8760050568EDD71</SAP:P2>

      <SAP:P3>NewMessageId</SAP:P3>

      Author's profile photo Sanjeeb Sarkar
      Sanjeeb Sarkar

      Hi Taranpreet,

      Can you please help me to understand where exactly did you made these changes? I am trying to run a REST loopback scenario and currently stuck with message correlation ID problem .

       

      Thank you.

      Author's profile photo Former Member
      Former Member

      Great work Ashish!! Nicely put blog.
      I followed the blog with IDoc as receiver and it was able to call second interface and modules were called as expected but the response is coming as blank message.