cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Module to update HTTP response Header

yasha_dubey
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

maheswarareddykonda
Active Contributor
0 Kudos

Hi Pragya,

can you please let me know, were you able to solve this issue.

Thanks & Regards,

Maheswarareddy

yasha_dubey
Participant
0 Kudos

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

maheswarareddykonda
Active Contributor
0 Kudos

Hi Pragya,

even i have checked with SAP people to get as note(patch upgrade) before that SP12,

but unfortunately, that required UI changes in REST adapter channel level.so there is no option to get as a patch also,,need to wait till November.

Former Member
0 Kudos

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

rcsegovia
Active Participant
0 Kudos

Hi Pragya,

My few cents, you can achieve it adding XSLT mapping into response.

regards,

Roberto.

maheswarareddykonda
Active Contributor
0 Kudos

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

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

It looks like the HTTP headers are set at the adapter level and the only thing maintained is the Content-type.  See below for some snippets related to REST processing -

Regards,

Ryan Crosby

maheswarareddykonda
Active Contributor
0 Kudos

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.


also i created new thread :


if possible please have a look.




Thanks & Regards,

Maheswarareddy

Ryan-Crosby
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello,

I have same requirement in a scenario. (CORS)

Just checked the last Patch notes for PL13 (7.4)

Can't find any notes for configuration of header parameters in the REST Sender Adapter.

Do you have any news ?

Thanks in advance.

Best regards,

Fabian