Subscribe

UiPath Studio

The UiPath Studio Guide

Loading Web Services in Libraries

Studio comes with the option to generate activities directly from SOAP or REST web services through the Service Editor window.

The window enables you to automatically load all the methods or endpoints in a given web service, be it REST or SOAP, as long as the provided link includes the services' definition - Swagger or WSDL.

Once loaded you select from which endpoints or methods to automatically create activities. All selected items are displayed in the Activities panel, under the Namespace you provided in the Service Editor window.

It is possible to then package these libraries as a .nupkg file and publish it to Orchestrator or to a custom location. As a result, you can easily share your newly-defined activity with other developers that you work with.

Adding New Services

Follow the steps below to generate activities from web services:

  1. Create a library in Studio, as explained in the About Libraries page.
  2. In the Design tab, click New Service, or right-click Services in the Project panel, then click New Service. The Service Editor window is displayed.
750
  1. Add a file path or link to the Swagger or WSDL resource and then click Load. All defined endpoints from the web service are now loaded in the Service Editor window.
750
  1. Type in the method or operation you need in the Search Operations search box and view the results below. For Swagger, methods are marked with different colors in each endpoint. Use the Deselect All checkbox to deselects all endpoints and choose the endpoints that you want to load. The namespace is generated automatically, simply type in a new name to change it.
  2. Click Save. The service is now integrated in the project tree.
387
  1. To use the generated activities in the Designer panel, go to the Activities panel, search by the service namespace in the Available activities section and drag each activity to the panel.

📘

Note:

For SOAP services, it is recommended to load only SOAP clients, as opposed to HttpGet or HttpPost clients.
For Swagger services, when the service cannot deserialize the response from the server, it is recommended to inspect the Swagger schema and search for required properties in the model definitions.

To edit a service simply right-click the service in the Project panel, under Services and select Edit Service.

Please note that if your project is under source control, checking out only the library's project.json file enables the Edit Services option for .xaml files with loaded SOAP or REST web services.

Adding and editing a service is also reflected in the project.json file containing the definition of the library, and in the service document. A webServices node is added in the project.json file, and each service is identified by the following elements:

895
ParameterDescription
namespaceThe name of the service provided in the Service Editor window.
serviceDocumentThe path to the .json file containing metadata for the SOAP or Swagger service. The file is used when the service is repaired, and should be versioned as part of the project.
webDocumentUriThe file path or link to the Swagger or SOAP resource (provided when the service is created in the Service Editor window).
uniqueReferenceA reference needed for versioning the service.

Repairing Services

dll files generated from SOAP or REST web services are not pushed to source control repositories. Therefore, when checking out libraries that contain services, the projects have unresolved activities in the Designer panel.

To repair those activities and generate the service .dll file right-click on the service node in the Project panel and select Repair Service from the context menu.

393

SOAP or REST service metadata and additional information is stored in a .json file for each service loaded in Studio. If a loaded service is missing its associated .json file, the Repair Services context menu option for the Services node enables you to generate the missing .json files using the link to the web document descriptor that was provided when that service was created. As a consequence, filters that might have been applied when the service was first generated are not applied anymore and all the resources provided by the aforementioned path or link are imported.

Publishing libraries using UiPath.Studio.CommandLine.exe command-line user interface detailed in the Mass Update Command Line Parameters page does not take web services into consideration.

📘

Note:

Generated activities from SOAP or REST services cannot be localized in Studio.

To call activities generated from web services multiple times inside a loop, create a separate workflow from the main library file, and invoke the service method there. In the main workflow, use the Invoke Workflow File activity inside a For Each activity, and invoke the previously created workflow.

For more details about generated activities from web services, check out this page.

Updated 3 years ago


Loading Web Services in Libraries


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.