Hi Experts,
I have a requirement where i have to pass multiple HTTP method(e.g. PUT and POST) in a single REST receiver channel.
So can you please guide me with steps for configuring.
As an example,
if value is coming as "00" in FEILD1 then my POST method should get executed
else
if value is not equal to "00" then PUT method should get executed.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Kesha,
If the requirement is in PI/PO then :
1. Add the below UDF in mapping, pass the FEILD1 as input to the UDF and output map to target root node:
public String setMethod(String inp , Container container) throws StreamTransformationException
{
String method = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/REST","id");
if(inp=="00")
method = "POST";
else
method = "PUT";
conf1.put(key1,method);
return method;
}2. Maintain the receiver REST channel as below :

Thanks,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi shahkesha,
I am assuming this requirement is for Cloud Integration(SCPI).
You could set the method as dynamic and set it dynamically.

For more details please find below the help document.
Hope this helps !
thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.