How to pass xml body into Body in HttpRequest

Hi anyone let me know how to pass xml body into body property in HttpRequest.
for example below is my body:
[abc@boom.com.rpabbb@111]
also this,

Content-Type=text/xml
SOAPAction=””

How to pass above parameters by using HtttpRequest

Content type should be application/xml @sunilraju

And make sure your xml doesn’t have double quotes (instead replace with single quotes), and pass it inside double quotes

@HareeshMR

But still issue exists in HTTP request activity. i am passing headers and parameters but it won’t pass. even in local panel i couldn’t see those headers and parameters values.

make sure issue needs to resolved otherwise no use.

Can you post the response or the error you are getting?

@HareeshMR
below is the response i am getting,
“<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/\” xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance\“>soapenv:Bodysoapenv:FaultUNKNOWN_EXCEPTIONUNKNOWN_EXCEPTION: Content is not allowed in prolog.<sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">sf:exceptionCodeUNKNOWN_EXCEPTION</sf:exceptionCode>sf:exceptionMessageContent is not allowed in prolog.</sf:exceptionMessage></sf:UnexpectedErrorFault></soapenv:Fault></soapenv:Body></soapenv:Envelope>”

and i have checked in postman it is working fine.

You are sending soap request using http? @sunilraju

We have soap request activity right? why don’t you use that? Actually, the URL for a particular method calling in SOAP request will change according to the method name you are calling

Hi,
Please assist with my issue. I have to pass JSON request using XML body. Using the HTTP Request activity
CanadaPost_Get_WaybillAndQR.xaml (13.1 KB)

Herewith is a link for my query on the forum: REST API with XML input example

Just incase anyone else stumbles on this topic. I use the standard http request activity for SOAP requests and use a notepad file for the body …copy pasted straight from the body of the working request inside postman. Simply read the notepad file into a variable and use that variable as the body. No more escaping quotes and single line unreadable xml!

2 Likes