Example SOAP Request with nested input?

Trying to setup a ‘SOAP Request’ activity for an existing SOAP Service (3rd party app), but with more complex structure than the tutorial here:

WSDL for this service has multiple methods with some nested datatypes, and while it’s valid format it gives a ‘Service description is not valid’ error in the SOAP Request Wizard screen.
I have a sample XML request file that works within SoapUI/Postman, and was hoping just to pop that into the activity.

Can’t see how to setup the Parameters collection to support full XML content though, does anyone have a working example?

Plan B would be to go to a Custom Activity in VS, but the tutorial there is missing detail on how the activity is laid out in the XAML editor:

Service Reference loads fine, but would love an example XAML file showing how the Send and Reply is configured.

I have a similar problem, please help

Hi there - I’d logged a ticket on this one, and the advice was to swap from the SOAP Request activity to HTTP Activity.
The HTTP one does support a raw XML string as a body, and works fine with GETs and POSTs to my SOAP service.
No need to do custom activities on this.
Reach out if you need a sample project and I’ll send one.

3 Likes

hi Ben, thanks for your response.
if your have the sample it would be very useful.

Hi Ben
a simple example using SOAP once go through
ReadXMLFile.xaml (26.3 KB)

1 Like

Hi Debakanta, thanks for your response.

The parameters in your services is a flat parameter, only uses a string, I need send entity as parameter in my services.

Do you have the sample for this esenary?

Ok, here is the example that UIPath Support gave me showing a HTTP Request setup for an XML packet. The Body field is blank, but that’s where you put your SOAP envelope (as complex as you want).
Hope that helps!
Main.xaml (7.8 KB)

does community edition supports webservices?.. i dont see the API tab!!

1 Like

Hi Guys,
Am using HTTP activity to invoke a soap request. I gave endpoint and after reading this forum i gave soap envelope in body field of options in properties panel. Body format is auto selected as application/xml. But when i try to run i get this below error
"The workflow has validation errors. Review and resolve them first.

System.Activities.InvalidWorkflowException: The workflow has validation errors. Review and resolve them first. —> System.Activities.ValidationException: Compiler error(s) encountered processing expression “”<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”".

Can someone help me with this.

you might be missing something in the workflow , most probably Syntax error , please revisit your workflow and resolve the syntax error and give it a try again …

Have you guys tried passing soap envelope inside http activity’s body property. I set body format as xml and pasted soap envelope in body property. here i am getting error cannot convert xdocument to string. I am getting the same error even if i enclose the xml inside double quotes since there are already few double quotes inside the soap envelop. I also tried using escape sequence \ before double quotes inside soap xml but am still getting same error.

Yes , in HTTP Request , we can pass soap envelope , but you would also need to pass header information ,

below parameters would be needed ,

in headers parameter , pass your soap method name , (not the xml , just the method name eg “XXX_ORDERS_INFO/QUERY_ORDERS”)

and in the body , would be the soap envelope , (body should be enclosed in double quotes and should include your header xml section as well)

image

output of http request is in XML or Json based on the soap service … so you would need to parse XML or json accordingly to read the data …

as for escaping the double quote , - check above screenshot , escape it by providing the double quote again …

4 Likes

Hi,

Please help on HTTP Request with XML body? Full XAML and input parameters are covered in this forum REST API with XML input example