on 04-17-2015 8:07 AM
Hello All,
I need urgent help.
I am using Synchronous Sender Rest Adapter where I want to add few standard HTTP header values in the response.
Do I have a standard Adapter module to do so ? Or I would have to write a custom module?
I need to add these two fields in Response Header sent by Rest Adapter.
"Access-Control-Allow-Origin" = "*"
"Access-Control-Allow-Headers" = "Authorization"
Thanks,
Pragya
Hi Pragya,
can you please let me know, were you able to solve this issue.
Thanks & Regards,
Maheswarareddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maheswara,
I was unable to achieve it. Checked with SAP too, but it didn't help.
I suppose they are going to provide this feature in newer packages.
Sorry for delayed response, didn't check SCN for very long.
Also, you can check comments on blog : http://scn.sap.com/message/15919846
Helps explain the process in general and why is it not possible via module.
let me know if you were able to achieve this.
Thanks,
Pragya
Hi Pragya,
1. In receiver channel of NWDS, under Adapter-Specific setting, in REST URL tab, please enter url pattern with Access-Control-Allow-Origin={origin}&Access-Control-Allow-Headers={headers} after ?
2. Select Value Source as "Manual Value" and Pattern element name as origin and headers in separate fields.
3. As a value please enter the respective values * and Authorization.
4. In REST Operation tab select Value Source as "Manual Value" and Static Value as "GET"
Regards,
Souvik
Hi Pragya,
My few cents, you can achieve it adding XSLT mapping into response.
regards,
Roberto.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pragya,
we have similar requirement in my project also..can you please let me know ..in case you handled that Response HTTP Headers.
Thanks,
Maheswarareddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
the snippets which you uploaded seems related to Request side..
but i am looking for response headers and also i had checked with SAP people regarding this..they were saying that feature planning to release 7.4 SP13 which is planned to be released only in November 2015.
if possible please have a look.
Thanks & Regards,
Maheswarareddy
Hi Maheswarareddy,
Yes, that was from the sender channel but higher up on the stack for the service processing the message originates from the sender. Notice that I included the code line that has a method call for sendSync after which the system reads the context data from the results to place information in the response headers. That part was coded only for the one header that I mentioned previously.
Regards,
Ryan Crosby
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.