> ## 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 FC 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 is used to connect to the FC 12 web service.

The methods of this class are described below.

## Constructor Details

```
public FlexiCaptureWebServiceClient(String url)
```

Creates a new client object to connect to the FC 12 web service

**Parameters:**

* url – the address of the FC Application Server in the following format: *http\://\<ApplicationServer>*.

## Method Details

```
public List<String> getProjectNames()
```

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

**Returns:**

* A list of project names

**Throws:**

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

```
public FlexiCaptureProject getProject(String name)
```

Opens a project based on the *name* parameter (i.e. the name of the project on the ABBYY FlexiCapture 12 server) and creates and returns a new *FlexiCaptureProject* object.

**Parameters:**

* name – the name of the project on the FC 12 server

**Returns:**

* FlexiCaptureProject object

**Throws:**

* FlexiCaptureConnectorException – if an error occurs when opening the project

***See also:***

<img src="https://mintcdn.com/abbyy/jk6a9TGm7KRcVxRI/images/flexi-capture/connectors/see_also.gif?s=f438656d29ffb293fe967e6dd184b256" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="11" height="12" data-path="images/flexi-capture/connectors/see_also.gif" />[FlexiCaptureProject](/flexi-capture/connectors/pega/pega-class-flexi-capture-project)

```
public String getTenant()
```

Returns the name of the tenant.

**Returns:**

* A string containing the name of the tenant on the FC 12 server. This string is empty by default

```
public void setTenant(String tenant)
```

Sets the name of the tenant.

**Parameters:**

* tenant – the name of the tenant on the FC 12 server. This parameter is used when working with the tenant and is not specified when working with the root.

**Throws:**

* IllegalArgumentException – if the input parameter is empty or 0

```
public int getTimeout()
```

Returns the time to wait for a server response.

**Returns:**

* The time (in seconds) to wait for a response from the FC 12 server. The default value is 300 seconds

```
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 FC 12 server

**Throws:**

* IllegalArgumentException – if the input parameter is less than or equals 0

```
public Credentials getCredentials()
```

Returns the user's name and password.

**Returns:**

* An object containing the user's name and password

***See also:***

<img src="https://mintcdn.com/abbyy/jk6a9TGm7KRcVxRI/images/flexi-capture/connectors/see_also.gif?s=f438656d29ffb293fe967e6dd184b256" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="11" height="12" data-path="images/flexi-capture/connectors/see_also.gif" />[Credentials](/flexi-capture/connectors/pega/pega-class-credentials)

```
public void setCredentials(Credentials credentials)
```

Sets the user's name and password.

**Parameters:**

* credentials – an object containing the user's name and password

**Throws:**

* IllegalArgumentException – if the input parameters are empty or 0

***See also:***

<img src="https://mintcdn.com/abbyy/jk6a9TGm7KRcVxRI/images/flexi-capture/connectors/see_also.gif?s=f438656d29ffb293fe967e6dd184b256" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="11" height="12" data-path="images/flexi-capture/connectors/see_also.gif" />[Credentials](/flexi-capture/connectors/pega/pega-class-credentials)

```
public void close()
```

Closes the connection to the ABBYY FlexiCapture 12 Web API.
