cancel
Showing results for 
Search instead for 
Did you mean: 

REST Receiver Channel - Configuring non CRUD methods

0 Kudos

Hi Experts,

I have a scenario where I need to consume a restful service using PATCH as the method. The four CRUD methods GET,PUT, DELETE and POST are available on the REST Operation tab.

But there is no standard drop-down for non-CRUD operations like PATCH, HEAD, TRACE etc...

Reading through blogs, looks like there are several ways to achieve this, but I'm not too familiar with the concepts yet to judge what the best option is.

Could someone please suggest what the best/simplest way to configure a PATCH (or any other method for that matter) on the rest receiver channel?

Thanks a lot for your time.

Cheers,

Arjun Ajjarapu

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi There,

I've posed the question to SAP and received the following response

So at this stage, it looks like non-crud operations are NOT possible.

Thanks for your help

Arjun Ajjarapu

engswee
Active Contributor
0 Kudos

Hi Arjun

Thanks for updating this thread with the reply from SAP. It'll be a good reference for others who come across this in the future.

Rgds

Eng Swee

Answers (4)

Answers (4)

former_member499364
Participant
0 Kudos

SAP has mentioned we can use it with Parameter Name: overrideHttpMethod

Parameter Value: PATCH for the REST receiver as well.

https://launchpad.support.sap.com/#/notes/2498897

I agree with Eng Swee and want to know has anyone tried to use PATCH in REST sender and receiver channels and if it works.

Former Member
0 Kudos

Hello Arjun,

How did you solve this issue then? Is implementing a custom adapter possible in this case as a workaround?

Regards,

Koray

RaghuVamseedhar
Active Contributor
0 Kudos

Arjun,

Please check, if you can use PUT instead of PATCH (as it is not available). PUT will use more bandwidth, but I think it should not be an issue.

Methods

When to use the PATCH method

0 Kudos

Hi Raghu,

Thanks for your response. I'll save that as the last resort option if using PATCH on the receiver channel is not possible.

engswee
Active Contributor
0 Kudos

Hi Arjun

All the blogs on SAP's REST adapter and even the online help indicates that only GET, PUT, POST and DELETE are supported.

Configuring the Receiver REST Adapter - Advanced Adapter Engine - SAP Library

Rgds

Eng Swee

0 Kudos

Thanks for your response Eng Swee. I've gone through those blogs, and there are references to being able to use other methods.

over-riding the rest operation setting in the url like: '?operation=patch'   

There is also an adapter attribute for Rest Operation (operation).

Are you saying that it's not possible to do it?

engswee
Active Contributor
0 Kudos

Hi Arjun

I wouldn't give you an authoritative answer that it's not possible because (a) I don't work for SAP and (b) I don't have SAP's REST adapter (yet) in my system (using Advantco's instead) so I can't test it out for sure.

My response is based on my reading of the recent SAP REST adapter blogs and the online documentation.

Based on the blog below, the overriding part seems to be applicable to the sender REST channel. It allows you to provide an parameter arbitrarily named as "operation" to the caller that will then determine the internal operation of the channel irrespective of the actual HTTP Method used by the caller.

But you are asking about a receiver REST channel. If you look at Step 4 of the "calling Remote APIs" part, it only talks about the 4 operations


If the HTTP operation has to be determined dynamically you specify the source of the value to be used as selection criteria and provide a matching value or GLOB expression for each of the four HTTP operations.

This matches the description in the online documentation for the REST receiver under "Mapping Source Values to Operation" which only describes the 4 operations.

Configuring the Receiver REST Adapter - Advanced Adapter Engine - SAP Library


If you have selected a source that provides a dynamic value (everything but Manual Value), you can specify the value associated with an operation by entering an Expression. The REST Operation tab provides an entry field for each operation. If more than one value of the defined source is associated with an operation, you can define additional mappings in the Additional Operation Mapping Rules table by adding rows and entering GET, POST, PUT, or DELETE in the Operation column and the respective value in the Expression column.

Of course there is no harm trying it out to see if you can forcibly do a PATCH. As I always say "you'll never know if you never try"

Rgds

Eng Swee