cancel
Showing results for 
Search instead for 
Did you mean: 

REST adapter (7.3) - how to email response

bob_harris
Explorer
0 Kudos

Hello

We are using the SAP REST adapter (on 7.3) to post data as a receiver (from JDBC sender) to an external rest web service. The service can return an error code/message (xml format) for specific scenarios e.g. user already exists (when posting new data). In the Error Handling tab, we can raise these returned error codes as an error in PI. However, we would like to also email the response (when these error codes are returned) to a recipient. I've set up the SI as synchronous following a blog (/process-orchestration/blog/2015/05/26/consuming-your-first-restful-service--step-by-step). Is there anywhere in the new REST adapter that allows for the response to be captured an emailed out or do I need to set up an integration process to do this? if the latter, are there any examples anyone could point to (newbie for ccBPM stuff)?

Many thanks

Kind regards

Bob

Accepted Solutions (0)

Answers (1)

Answers (1)

engswee
Active Contributor
0 Kudos

Hi Bob

Before I try to tackle the emailing the error part, can you clarify what should/would happen if the response is successful? Is the response sent back synchronously to the JDBC sender?

Regards

Eng Swee

former_member187171
Participant
0 Kudos

Hi Eng Swee,

I have read your blog about " From PI to HCI: My one month adventure with HANA Cloud Integration", it's really helpful for my study on HCI.

Here I have a requirement which calling a rest API to post document to target system.

The sender channel is SOAP adapter and receiver channel is HTTP adapter.

Here I have a question:

In HCI, how can I transfer an attachment from SOAP to HTTP?

Sorry for occupy this topic for my own question.

Thanks a lot

Best wishes

Misher

engswee
Active Contributor
0 Kudos

Misher

I've replied to your query in your own thread

Regards

Eng Swee

bob_harris
Explorer
0 Kudos

Hi Eng Swee

It's my attempt with the rest adapter so I've set up the SI as synchronous but we're not interested in doing anything with a successful response - only those responses with an error. So my response SI xml is based on the error response rather than the successful xml structure (I would have thought it should have been the same response structure?) based on the document guide previously mentioned. Apart from raising particular error codes as an error (using the xpath error handling in the rest adapter), I'm unsure whether the example I've followed will work given there are 2 different xml structures in the clients response (one for success, other for failure). Am I right in thinking that by setting up the response xml to the error xml structure that we'll capture that but the successes will be ignored?

Many thanks

bob