Skip to Content

Fetch HTTP header in SOAP to REST call

Hi all,

We have a synchronous SOAP to REST call.

Is there a way to fetch HTTP header values that are coming back in a synchronous response message? Specifically we need to store the C-XSRF-Token which is populated in the header of a response message. We would like to access this header field in the response mapping. Can I somehow achieve this? I've tried to set the C-XSRF-Token in the SOAP Sender as variable binding with "keep headers" option but the field does not appear in the dynamic configuration of the response message.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Sep 30, 2015 at 06:15 AM

    Hi Peter,

    You can add a header parameter with this module "AddSOAPHeaderBean" module. Pay attention, that you will change the SOAP header, not the http header.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2015 at 06:00 PM

    Did you also set the Adapter Specific Message Attributes (ASMA)? I think this is how you can link the header values you are looking for to the dynamic configuration objects.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2015 at 09:12 AM

    Thanks for your responses, I had set the ASMA in the sender channel, but still the field is not populated.

    I am not sure if I can use the AddSOAPHeaderBean.

    My main problem is: I don't want to set header fields, but to read them. How to retrieve the information at all which are inside the HTTP header of the REST response? I am not sure how I could access them for example in the AddSOAPHeaderBean.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 30, 2015 at 09:51 AM

    Hi Peter,

    if your refering REST response HTTP Header information then you can not fetch those details by SAP REST adapter.

    current Rest adapter is not support the same and SAP had enhanced already and ready to release coming November2015.

    Since its UI change is required for this code fix, they could not able to realease any patches 😊

    Add comment
    10|10000 characters needed characters exceeded