> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FlexiCaptureWebServiceClient class

> Reference for the FlexiCaptureWebServiceClient class: connect to the FlexiCapture 12 web service, open projects, and set credentials, tenant, and timeout.

The `FlexiCaptureWebServiceClient` class is in the `com.abbyy.connectors` namespace. It inherits from the `AutoCloseable` class and connects to the ABBYY FlexiCapture 12 web service.

## Constructor

```java theme={null}
public FlexiCaptureWebServiceClient(String url)
```

Creates a new client object to connect to the ABBYY FlexiCapture 12 web service.

### Parameters

* **url** – The address of the ABBYY FlexiCapture Application Server, in the format `http://<ApplicationServer>`.

## Methods

### getProjectNames

```java theme={null}
public List<String> getProjectNames()
```

Returns a list of the names of the projects on the ABBYY FlexiCapture 12 server.

#### Return value

* A list of project names

#### Exceptions

* **FlexiCaptureConnectorException** – If an error occurs when getting a list of project names.

### getProject

```java theme={null}
public FlexiCaptureProject getProject(String name)
```

Opens the project named by the `name` parameter, and then creates and returns a new `FlexiCaptureProject` object.

#### Parameters

* **name** – The name of the project on the ABBYY FlexiCapture 12 server.

#### Return value

* A `FlexiCaptureProject` object

#### Exceptions

* **FlexiCaptureConnectorException** – If an error occurs when opening the project.

### getTenant

```java theme={null}
public String getTenant()
```

Returns the name of the tenant.

#### Return value

* A string holding the name of the tenant on the ABBYY FlexiCapture 12 server. This string is empty by default.

### setTenant

```java theme={null}
public void setTenant(String tenant)
```

Sets the name of the tenant.

#### Parameters

* **tenant** – The name of the tenant on the ABBYY FlexiCapture 12 server. Specify this parameter when working with the tenant, and omit it when working with the root.

#### Exceptions

* **IllegalArgumentException** – If the input parameter is empty or 0.

### getTimeout

```java theme={null}
public int getTimeout()
```

Returns the time to wait for a server response.

#### Return value

* The time, in seconds, to wait for a response from the ABBYY FlexiCapture 12 server. The default value is 300 seconds.

### setTimeout

```java theme={null}
public void setTimeout(int timeout)
```

Sets the time, in seconds, to wait for a response from the server. The default timeout value is 300 seconds.

#### Parameters

* **timeout** – The time to wait for a response from the ABBYY FlexiCapture 12 server.

#### Exceptions

* **IllegalArgumentException** – If the input parameter is less than or equal to 0.

### getCredentials

```java theme={null}
public Credentials getCredentials()
```

Returns the user's name and password.

#### Return value

* An object holding the user's name and password

### setCredentials

```java theme={null}
public void setCredentials(Credentials credentials)
```

Sets the user's name and password.

#### Parameters

* **credentials** – An object holding the user's name and password.

#### Exceptions

* **IllegalArgumentException** – If the input parameters are empty or 0.

### close

```java theme={null}
public void close()
```

Closes the connection to the ABBYY FlexiCapture 12 Web API.

## Related topics

* [FlexiCaptureProject class](/flexi-capture/connectors/pega/pega-class-flexi-capture-project)
* [Credentials class](/flexi-capture/connectors/pega/pega-class-credentials)
