Hi Experts ,
I am trying to retrieve a part of the header in the Iflow . I was able to do that and can see it in my "Header ".
I needed to consume this data in mapping . I did some entries in Content Modifier but no matter how much I try I am not able to :
1. Get the value in my header groovy
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import com.sap.it.api.mapping.*;
//Add MappingContext as an additional argument to read or set Headers and properties.
def String getHeader1(String header,MappingContext context)
{ String HeaderValue = context.getHeader(CamelHttpQuery);
HeaderValue= HeaderValue.toString();
return HeaderValue; }
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2. Was planning to use the property groovy , but some how cannot get the data in the exchange properties section so that I can consume it .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import com.sap.it.api.mapping.*
def String getProperty(String propertyName,MappingContext context)
{
String PropertyValue= context.getProperty(Prop_propertyName);
PropertyValue= PropertyValue.toString();
return PropertyValue;
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I used the following links for reference , but some how missing something , doing some mistake .
https://answers.sap.com/questions/414765/replacing-header-with-payload-value-using-groovy-s.html
https://answers.sap.com/questions/386514/header-data-from-content-modifier-is-not-passing-a.html
https://archive.sap.com/discussions/message/16812782#16812782
Added pics, can someone help me . Let me know if you have any queries .







