SOAP / REST Web Service Calls

I’m trying to call a web service from UiPath and unable to get it working. The Web Service has a header and a body that get exposed to UiPath when you use the SOAP object in your script. Can anyone provide some guidance or an example of how to call a web service using either SOAP or REST that includes formatting and passing a HEADER and BODY in the call?

1 Like

Have you checked out the videos on RPA Video Tutorials | UiPath ? Sorry if that doesn’t cover the particular question you have.

@richarddenton SOAP does not support changing the request header or body and it is not easy to implement.
Right now, the only workaround is to create your own custom activities on top of that web service… Or, maybe, @Lavinia or @Alex_Vasile have other idea.

Even though it is quite hard, you can follow this example. Make a POST HTTP request to and include in the body a SOAP Envelope as raw text/xml:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap12="">
<GetHolidaysAvailable xmlns="" />

This way you can get the same response. You can try to modify this as per your needs, maybe it works.

1 Like

Thanks for the response. Do you have a sample script or code example that I can use to see how this is done?

Yes, the videos are out-dated and don’t address headers and XML-based arguments. Only simple string arguments.

@ddeneau, @richarddenton

We analyzed and the feature is not simple to implement. We’ll see what we can do for Q4 this year. Right now is under consideration.

However, during the research we came to an convenient solution of generating custom activities on top of a web service.


Alex, can you please provide some more guidance on how to include a SOAP envelope in the body of a HTTP request? I have intercepted requests between an app on my phone and a web service and would like to replicate the request via UiPath.

Have you ever considered using SOAP UI?

Hi @Alex_Vasile
I am trying to give soap envelop in http activity’s body section. I set the body format as xml and pasted soap envelop in body. But i am receiving compiler error “xdocument cannot be converted to string”. seems like it’s expecting a string in body even though we specify type as xml in body format. when i enclose xml inside double quotes, i still get error since there are alredy double quotes inside my soap envelop. i also tried to create a variable of system.xml.linq.xdocument and assign xml in a assign activity and using this variable with tostring function inside http body. But i am getting error cannot assign type system.xml.linq.xdocument to system.xml.linq.xdocument in assign activity. Can you help how to proceed with this concept.

Hi Alex,
Is there any documentation on REST webservice calls with XML parsing please? I need an example of the body input for XML
I’m using HTTP Request activity and my full query can be found here - REST API with XML input example

Hi, Is the SOAP feature revised in new version. If yes, please share some sample where i want to invoke SOAP WSDL file