UiPath Studio Guide

Loading Web Services in Libraries

Studio comes with the option to generate activities directly SOAP or REST web services through the Add new service 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 Add new service 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 Add new service window is displayed.
  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 Add new service window.
  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.
  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.

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:

Parameter
Description

namespace

The name of the service provided in the Add new service window.

serviceDocument

The 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.

webDocumentUri

The file path or link to the Swagger or SOAP resource (provided when the service is created in the Add new service window).

uniqueReference

A 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.

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.

Note:

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

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



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.