on 04-01-2015 6:41 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arjun,
How did you solve this issue then? Is implementing a custom adapter possible in this case as a workaround?
Regards,
Koray
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.