Skip to Content

ODATA sender to SOAP receiver

Hi,

I am working on CPI. My requirement is to receive OData request, send it to SOAP web service as request, receive SOAP web service response and send it to another entity set of OData service.

I am receiving 1 request from SAP which is having around 100 employee data. The SOAP web service has limitation of receiving 1 employee data in the request at a time. So, I am splitting it in CPI by sending 1 employee in 1 request and sending to SOAP web service.

The issue is in SOAP response which is just returning status code as Success or Failure. There is no employee id or any other key which can help me to identify that the response received is for which employee.

How , CPI can ensure that request send for the particular employee gets correct response status from SOAP web service and updates in SAP.

Regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jun 29 at 05:12 PM

    Hi ,

    One more option after splitting, create a property or header with xpath to store the employee iD (key field). Make a call to Soap service using request-reply, store the Key field(Status). if that field is success or failure form your simple xml or your required action and then send to SAP.

    Thanks and Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 29 at 01:51 PM

    Hello Vijay,

    I think you can leverage hashmap to tackle your scenario.As you are splitting each employee record before sending to SOAP receiver make sure to capture key field ( say Employee No ) and set the value for status as Success ( or some dummy value ) .Once you receive the status from your SOAP request update the hashmap with actual status.Repeat the same process for all the employees and send back the response once all employees status captured to send it back to Odata entity.Below blog might give fair idea about usage of hashmap in sap cpi.

    https://blogs.sap.com/2018/08/09/implementing-dynamic-lookups-in-cpi-using-hashmap-and-lightweight-xml-parsers/

    https://blogs.sap.com/2018/07/24/key-value-mapping-in-sap-cloud-platform-integration-cpi-with-an-integration-flow/

    Regards,

    Sriprasad Shivaram Bhat

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.