Skip to Content

Rest sender sync : Remove header

Dear Team,

I have a Rest to Rfc sync scenario , the requirement is to remove any headers in the response and pass on only field content to the rest application. Below is a sample response and options tried thus far

XML response from RFC

<ns0:header xmlns:ns0="http://test">

<header>

<Field1>Value 1</Field1>

<Field2>Value 2</Field2>

</header>

<header>

<Field1>Value 3</Field1>

<Field2>Value 4</Field2>

</header>

REST Message expected

{

header : {

"Field 1" :"Value 1",

"Field 2" : "Value 2"

},

{

"Field 1" :"Value 3",

"Field 2" : "Value 4"

}

}

Options Tried :

1. Checked Strip Outer element , so the one header is removed

2.Option setIgnoreElement only available in REST rcvr adapter

3.Checked Strip Operation message , throws HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

Please share your thoughts on how this can be acheived

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 16, 2020 at 07:26 AM

    Hi experts, your views on this pls...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2020 at 04:26 PM

    I didn't come across a method other than to manually build a json response

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.