Skip to Content
0

Passing Values from Request to response with REST adapter

Oct 10, 2016 at 01:52 PM

497

avatar image

Hello all,

I am trying to pass values from the request to the response message mapping within a synchronous scenario. For this, I am storing values into the dynamic configuration header using a custom namespace.

This has worked for other scenarios before, but it doesn't seem to work for a SOAP to REST scenario where I can see the fields in the request message header but in the response none of these fields is available.

Also if I try to use the REST namespace instead of my custom namespace, the fields are not available in the response.

Has anybody had the same issue or a work around for this?

10 |10000 characters needed characters left characters exceeded
Former Member

Hi Peter,

How did you resolve this issue, can you share your solution??

Regards,

Praveen.

0

Hi Praveen!

I think he used approach suggested by Manoj: storing values from Dynamic Configuration to module variables using DynamicConfigurationBean before calling SAP adapter module and restoring it back after that. In further response mapping values are put to payload from DC using UDF.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

Hi Evgeniy,

Did you see my reply below DynamicConfigurationBean will not work for REST adapter because in the rest adapter when get the response it is creating new module data and all saved variables were lost, check my reply below.

Regards,

Praveen.

0

Sorry, Praveen! I missed your answer.

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Manoj K Oct 10, 2016 at 02:23 PM
1
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 10, 2016 at 06:58 PM
2

Hi Peter,

DynamicConfigurationBean creating new Hashtable for first time and keep the values in the Hashtable, If the Hashtable already exist in the module context then it retrieve using mp.context parameter like below and using in the module that is why you will have two times DyanmicConfigurationBean module, one will save the value in Hashtable and other one to retrieve the value from the Hashtable which is in module context. This will work for all the adapters.

But REST adapter is creating the new module data again so already saved values were lost after the RestAdapterBean module execution that is why it is not working for REST adapter.

Regards,

Praveen.

.


returnmsg.png (21.0 kB)
dynconfig.png (7.1 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Oct 19, 2016 at 01:45 PM
0

Hello Praveen, Evgeniy,

This root cause for this issue is fixed with SAP Note 2212660 - Async/Sync Bridge with REST receiver channel is failing.

When you apply it you will be able to use DynamicConfigurationBean.

Best regards,

Dimitar

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for updating the thread with correction details.

0