cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA sender to SOAP receiver

former_member183906
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member666312
Active Participant
0 Kudos

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

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor
0 Kudos

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-x...

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

Regards,

Sriprasad Shivaram Bhat