I am sending an HTTP post Request by reading an XML file using Read text activity with static data.
I need to pass dynamic data in XML.
Please help me how to pass dynamic data in xml.
I am sending an HTTP post Request by reading an XML file using Read text activity with static data.
I need to pass dynamic data in XML.
Please help me how to pass dynamic data in xml.
Hello @aman7790,
There are two ways of doing this:
<Property1>
, <Property2>
in XML. Then read the XML File into a string variable say InputString
, then do InputString.Replace("<Property1>","Nithin")
.{0}
, {1}
where ever required in the XML. Then read the XML File into a string variable say InputString
, then do String.Format(InputString,"Nithin","Prabhu")
. {0} in XML will be replaced with “Nithin” & {1} will be replaced with “Prabhu”Hope that helps !. Kudos
Regards,
Nithin
Hi Nithin,
It is working fine when I use log message but I have to send to Post request using http Request.
Other team is getting the response as {0}.
Hello @aman7790,
Once the string is formated (Replaced with required text). It behaves the same way for Log Message / Any other activity.
I hope you have assigned the output of String.Format(InputString,"Nithin","Prabhu")
to another string variable & you are using the newly assiged string variable for further operations.
Regards,
Nithin
Where i need to pass it in http request?
Hello @aman7790,
If the String you are processing is the Body of the API Post then it must go to the “Body” property under “Options” Category.
Hope this helps ! Kudos
Regards,
Nithin
Thanks @Nithin_P
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.