---
schema_version: "1"
id: ae512e394e10ae102c9e62de836428e177d66c3c298cb653df4c9b3ed6d37261
title: FTPS Connector - Mule 3
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/ftps-connector/0.3.9/index.md
canonical_url: https://docs.mulesoft.com/jp/ftps-connector/0.3.9/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 09eaa8be7166e9b07e9753eeec1df40676386cbe5732c698aadca83f98c75e3c
description: MuleSoft Documentation Site
release: 0.3.9
latest: false
---
# FTPS Connector - Mule 3

サポートカテゴリ: [Premium](https://www.mulesoft.com/legal/versioning-back-support-policy#anypoint-connectors)

FTPS 用 Anypoint Connector (FTPS Connector) を使用すると、FTPS 経由でファイルを送受信でき、Mule アプリケーションと FTPS サーバーとのシームレスなインテグレーションが提供されます。

このガイドを使用して、FTPS Connector を使用した基本的な Mule フローのセットアップおよび設定を行ってください。

リリースノート: [FTPS Connector リリースノート](#release-notes::connector/ftps-connector-release-notes.adoc)  
Exchange: [FTPS Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-ftps-transport/)​

## [](#前提条件)前提条件

このドキュメントは、読者が FTPS、Mule、Anypoint Connector、Anypoint Studio、Mule フローの要素、グローバル要素に精通していることを前提としています。

### [](#ハードウェアおよびソフトウェアの要件)ハードウェアおよびソフトウェアの要件

[「ハードウェアおよびソフトウェアの要件」](#3.9@mule-runtime::hardware-and-software-requirements.adoc)​を参照してください。

### [](#互換性)互換性

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">アプリケーションまたはサービス</th>
<th class="tableblock halign-left valign-top">バージョン</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Mule</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">3.7.0 以降</p></td>
</tr>
</tbody>
</table>

## [](#コネクタをインストールする)コネクタをインストールする

1. Anypoint Studio で、Studio タスクバーの Exchange アイコンをクリックします。
2. Anypoint Platform のログイン情報で Exchange にサインインします。
3. Anypoint Exchange で ​**\[Provided by MuleSoft (MuleSoft による提供)\]**​ をクリックします。
4. Mule 3 Connector を検索して ​**\[Install (インストール)\]**​ をクリックします。

## [](#configuring)FTPS Connector のグローバル要素を設定する

FTPS Connector のグローバル要素を設定し、アプリケーション内の複数の FTPS Connector インスタンスで使用できます。ただし、すべてのコネクタインスタンスが同じ要素または設定を使用するとは限りません。たとえば、フロー内の複数のコネクタが異なるグローバル要素や設定を使用して複数のインスタンスに接続する場合があります。

接続や他の詳細は、\[Global Element Properties (グローバル要素のプロパティ)\] ウィンドウで設定します。これらの設定は、グローバル要素に保存され、適切なコネクタインスタンスによって参照されます。

![設定](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps_basic_config.png)

この例では、プレースホルダーの値は、デフォルトではプロジェクトの ​`src/main/resources`​ フォルダーにある ​`.properties`​ ファイルに保存されている値を参照します。​[「プロパティの設定」](#3.9@mule-runtime::configuring-properties.adoc)​を参照してください。

保守の容易さと再利用性を向上するには、FTPS Connector プロパティの値をグローバル要素にハードコード化するのではなく、FTPS Connector プロパティ用の ​`.properties`​ ファイルを使用する必要があります。 `.properties`​ ファイルを使用すると、アプリケーションをさまざまな環境 (本番、開発、QA など) にデプロイして、必要に応じてログイン情報を変更することができます。 [「複数の環境へのデプロイ」](#3.9@mule-runtime::deploying-to-multiple-environments.adoc)​を参照してください。

### [](#ftps-connector-のグローバル要素プロパティ)FTPS Connector のグローバル要素プロパティ

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Username (ユーザー名)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">FTPS サーバーでのユーザー名。</p>
<p class="tableblock">サーバーで匿名ログインが許可される場合、ユーザー名として ​<code>anonymous</code>​ を使用できます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Password (パスワード)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">そのユーザー名のパスワード。</p>
<p class="tableblock">匿名ログインの場合、この項目は空にできます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Host (ホスト)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">FTPS サーバーのホストアドレス。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Port (ポート)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">FTPS サービスが実行されているポート。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Keystore path (キーストアパス)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SSL で使用するキーストアへのパス。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Keystore password (キーストアパスワード)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">キーストアファイルのパスワード。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Read timeout (読み取りタイムアウト)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">コンシューマーがタイムアウトするまで応答を待機する時間 (ミリ秒)。</p>
<p class="tableblock">デフォルト値は 0 (無限) です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Connection timeout (接続タイムアウト)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">コンシューマーがタイムアウトするまで接続の確立を試みる時間 (ミリ秒)。</p>
<p class="tableblock">デフォルト値は 0 (無限) です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Disable Certificate Validation (証明書検証の無効化)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SSL 証明書検証を無効にするためのオプション。証明書が無視されて ​<code>Trust all</code>​ ポリシーが使用されます。</p>
<p class="tableblock">このオプションはお勧めしません。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Encryption mode (暗号化モード)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">クライアントセキュリティを呼び出すモード (IMPLICIT または EXPLICIT)。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Transfer mode (転送モード)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">データ接続を確立するモード (PASSIVE または ACTIVE)。</p></td>
</tr>
</tbody>
</table>

#### [](#pooling-profile-プーリングプロファイル)Pooling Profile (プーリングプロファイル)

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 25%;">
<col style="width: 30%;">
<col style="width: 15%;">
<col style="width: 10%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
<th class="tableblock halign-left valign-top">デフォルト値</th>
<th class="tableblock halign-left valign-top">必須</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Max Active (最大アクティブ)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>一度にセッションから借りることができる Mule コンポーネントの数を制御します。負の値に設定した場合、同時にアクティブにできるコンポーネントの数に制限はありません。maxActive を超えた場合、プールは枯渇したと呼ばれます。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Max Idle (最大アイドル)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>プール内で同時にアイドル状態のままにできる Mule コンポーネントの最大数。負の値に設定した場合、同時にアイドルにできる Mule コンポーネントの数に制限はありません。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Max Wait (最大待機)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>プールが枯渇し、exhaustedAction が ​<code>WHEN_EXHAUSTED_WAIT</code>​ に設定されている場合に、プールされたコンポーネントが使用可能になるまで待機する時間 (ミリ秒) を指定します。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Min Eviction Millis (最小除去時間)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>オブジェクトが除去対象となるまでにオブジェクトをプール内でアイドル状態のままにできる最小時間を決定します。正の値以外の場合、アイドル時間のみによってオブジェクトがプールから削除されることはありません。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Eviction Check Interval Millis (除去確認間隔)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>オブジェクトエビクターの実行間隔 (ミリ秒) を指定します。正の値以外の場合、オブジェクトエビクターは実行されません。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Exhausted Action (枯渇アクション)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Enumeration (列挙)。次のいずれかになります。</p>
</div>
<div class="ulist">
<ul>
<li>
<p>WHEN_EXHAUSTED_GROW​</p>
</li>
<li>
<p>WHEN_EXHAUSTED_WAIT​</p>
</li>
<li>
<p>WHEN_EXHAUSTED_FAIL</p>
</li>
</ul>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Mule コンポーネントプールが枯渇した場合のプールの動作を指定します。可能な値:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>WHEN_EXHAUSTED_FAIL</code>​。NoSuchElementException をスローします。</p>
</li>
<li>
<p><code>WHEN_EXHAUSTED_WAIT</code>​。新しいオブジェクトまたはアイドル状態のオブジェクトを使用できるようになるまで Object.wait(long) を呼び出してブロックします。</p>
</li>
<li>
<p><code>WHEN_EXHAUSTED_GROW</code>​。新しい Mule インスタンスを作成して返すため、基本的に maxActive は無意味になります。正の maxWait 値を指定した場合、最大でその時間 (数ミリ秒) ブロックされた後、​<code>NoSuchElementException</code>​ がスローされます。maxThreadWait が負の値の場合、永久にブロックされます。</p>
</li>
</ul>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Initialisation Policy (初期化ポリシー)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Enumeration (列挙)。次のいずれかになります。</p>
</div>
<div class="ulist">
<ul>
<li>
<p>INITIALISE_NONE​</p>
</li>
<li>
<p>INITIALISE_ONE​</p>
</li>
<li>
<p>INITIALISE_ALL</p>
</li>
</ul>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>プール内のコンポーネントの初期化方法を決定します。可能な値:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>INITIALISE_NONE</code>​。起動時にコンポーネントをプールに読み込みません。</p>
</li>
<li>
<p><code>INITIALISE_ONE</code>​。起動時に初期コンポーネントをプールに読み込みます。</p>
</li>
<li>
<p><code>INITIALISE_ALL</code>​。起動時にすべてのコンポーネントをプールに読み込みます。</p>
</li>
</ul>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
</tbody>
</table>

#### [](#reconnection-再接続)Reconnection (再接続)

Mule Runtime Engine で接続の失敗を管理する方法を定義します。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 25%;">
<col style="width: 30%;">
<col style="width: 15%;">
<col style="width: 10%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
<th class="tableblock halign-left valign-top">デフォルト値</th>
<th class="tableblock halign-left valign-top">必須</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Standard Reconnection (標準再接続)</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="ulist">
<ul>
<li>
<p><a href="#reconnect">Standard Reconnection (標準再接続)</a>​</p>
</li>
<li>
<p><a href="#reconnect-forever">Reconnect Forever (繰り返し再接続)</a></p>
</li>
</ul>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>使用する再接続戦略。</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
<td class="tableblock halign-left valign-top"><div class="content"></div></td>
</tr>
</tbody>
</table>

### [](#reconnect)Standard Reconnection (標準再接続)

接続を再試行する回数と、再試行と再試行の間の時間を設定する再接続戦略。

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
<th class="tableblock halign-left valign-top">デフォルト値</th>
<th class="tableblock halign-left valign-top">必須</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Frequency (頻度)</p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">再接続する頻度 (ミリ秒)。</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Reconnection Attempts (再接続試行数)</p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">再接続の試行回数。</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Run the reconnection in a separated thread (個別のスレッドで再接続を実行)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Boolean (ブール)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true の場合、再接続戦略が個別の非ブロックスレッドで実行されます。</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

### [](#reconnect-forever)Reconnect Forever (繰り返し再接続)

指定間隔で無制限に再接続を試行する再接続戦略。

<table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
<th class="tableblock halign-left valign-top">デフォルト値</th>
<th class="tableblock halign-left valign-top">必須</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Frequency (頻度)</p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Number (数値)</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">再接続する頻度 (ミリ秒)。</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Run the reconnection in a separated thread (個別のスレッドで再接続を実行)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Boolean (ブール)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true の場合、再接続戦略が個別の非ブロックスレッドで実行されます。</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>

## [](#ftps-connector-の使用)FTPS Connector の使用

FTPS Connector はエンドポイントの概念に基づいています。次のいずれかのグローバル要素を設定できます。

- FTPS サーバーからファイルを読み取るためのインバウンドエンドポイント
- FTPS サーバーにファイルをアップロードするためのアウトバウンドコネクタ

### [](#コネクタの名前空間とスキーマ)コネクタの名前空間とスキーマ

Anypoint Studio でパレットからキャンバスに FTPS Connector をドラッグすると、FTP Connector の名前空間とスキーマの場所が Mule アプリケーションの XML コードに自動的に入力されます。

**名前空間:**​

```xml
xmlns:ftps="http://www.mulesoft.org/schema/mule/ftps"
```

**スキーマの場所:**​

```xml
http://www.mulesoft.org/schema/mule/ftps http://www.mulesoft.org/schema/mule/ftps/current/mule-ftps.xsd
```

Studio の XML エディターまたは他のテキストエディターで Mule アプリケーションを手動でコーディングする場合、設定 XML のヘッダーの ​`<mule>`​ タグ内で名前空間およびスキーマの場所を定義します。

```xml
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ftps="http://www.mulesoft.org/schema/mule/ftps"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/ftps
	       http://www.mulesoft.org/schema/mule/ftps/current/mule-ftps.xsd">

      <!-- put your global configuration elements and flows here -->

</mule>
```

### [](#maven-対応の-mule-アプリケーションでのコネクタの使用)Maven 対応の Mule アプリケーションでのコネクタの使用

Maven 対応の Mule アプリケーションをコーディングしている場合は、次の XML スニペットを ​`pom.xml`​ ファイルに含めます。

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-ftps-transport</artifactId>
  <version>3.1.0</version>
</dependency>
```

`<version>`​ タグ内に現在のバージョン番号を入力します。現在のバージョンは 3.1.0 です。

## [](#ftps-connector-のユースケースの例)FTPS Connector のユースケースの例

このユースケースの例は、Anypoint Studio ユーザーを対象とします。

XML でアプリケーションを設定している場合は、サンプル Mule アプリケーションの XML コードまでスキップし、各ユースケースの XML で FTPS グローバル要素とコネクタがどのように設定されているかを確認してください。

- [​ファイルの読み取り](#read-xml)​
- [​ファイルの書き込み](#write-xml)

### [](#ftps-サーバーからのファイルの読み取りとファイルの内容のログ-studio)FTPS サーバーからのファイルの読み取りとファイルの内容のログ - Studio

Anypoint Studio を使用して FTPS サーバーからファイルを読み取る手順は、次のとおりです。

1. Studio で、\[File (ファイル)\] → \[New (新規)\] → \[Mule Project (Mule プロジェクト)\] をクリックして、新しい Mule プロジェクトを作成します。
2. プロジェクトを開いたまま、Studio パレットで ​[​インストール済み](https://docs.mulesoft.com/jp/ftps-connector/0.3.9/%3C#FTPS Connector をインストールする>)​の FTPS Connector を検索します。
3. 新しい FTPS Connector をキャンバスにドラッグします。
4. Logger を FTPS 要素の後にドラッグして、受信メッセージのログをコンソールに記録します。
    
    ![読み取りフロー](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-read_flow.png)
5. フローヘッダーをダブルクリックして、名前を ​`read-flow`​ に変更します。
    
    ![読み取りフローの設定](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-read_flow_config.png)
6. FTPS Connector 要素をダブルクリックして、次のようにプロパティを設定します。
    
    <table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">項目</th>
<th class="tableblock halign-left valign-top">Value (値)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Display Name (表示名)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">FTPS (Streaming) (FTPS (ストリーミング))</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Consumer Configuration (コンシューマー設定)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>FTPS_Basic_config</code>​ (設定のデフォルト名)</p>
<p class="tableblock">この値は、​<a href="#設定">​設定済み</a>​の他の設定の名前に設定できます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">操作</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Read</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Directory to move to (移動先ディレクトリ)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">サーバーからファイルを読み取った後のファイルの移動先のディレクトリ。</p>
<p class="tableblock">空にした場合、ファイルは削除されます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">File name (ファイル名)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">読み取るファイルのファイル名パターン。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Maximum concurrent reads (最大同時読み取り数)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ファイルを読み取るために使用するスレッド (接続) の数。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ASCII Data Type (ASCII データ型)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">読み取るファイルが ASCII であるか BINARY であるか。</p>
<p class="tableblock">デフォルトは BINARY です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ストリーミング</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">InputStream をメッセージペイロードとして送信するか (true)、バイト配列として送信するか (false)。</p>
<p class="tableblock">デフォルトは false です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Pooling period (プーリング期間)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">サーバーのファイルを照会する間隔。</p></td>
</tr>
</tbody>
</table>
    
    ![Read 操作](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-read.png)
7. ロガーを選択して、項目を次のように設定します。
    
    ![ロガー](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-logger.png)
8. \[Run As (別のユーザーとして実行)\] > \[Mule Application (Mule アプリケーション)\] を選択し、アプリケーションを Studio から Mule Runtime Engine にデプロイします。
    
    ファイル名パターンと一致する新しいファイルが表示されると、そのコンテンツがコンソールに表示されます。

### [](#read-xml)FTPS サーバーからのファイルの読み取り - XML

FTPS サーバーからファイルを読み取るには、FTPS Connector をコンシューマーとして使用して、Studio で生成された XML コードを使用する次のサンプル Mule アプリケーションを実行します。

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
	xmlns:ftps="http://www.mulesoft.org/schema/mule/ftps"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/ftps
	http://www.mulesoft.org/schema/mule/ftps/current/mule-ftps.xsd
	http://www.mulesoft.org/schema/mule/ee/tracking
	http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
    <ftps:config name="FTPS_Basic_Config" username="${username}" password="${password}"
    host="${host}" port="${port}" disableCertificateValidation="true" doc:name="FTPS: FTPS Basic Config"/>
    <flow name="read-flow">
        <ftps:read config-ref="FTPS_Basic_Config" fileName="test_read*" filesPath="/files"
	pollingPeriod="10000" doc:name="FTPS (Streaming)" isASCII="true"/>
        <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    </flow>
</mule>
```

### [](#ftps-サーバーへのファイルの書き込み-studio)FTPS サーバーへのファイルの書き込み - Studio

FTP サーバーにファイルを書き込む手順は、次のとおりです。

1. Studio で、\[File (ファイル)\] → \[New (新規)\] → \[Mule Project (Mule プロジェクト)\] をクリックして、新しい Mule プロジェクトを作成します。
2. プロジェクト構造内を移動して、​`src/main/app/project-name.xml`​ をダブルクリックします。
3. 新しい HTTP 要素をキャンバスにドラッグします。
    
    この要素はフローのエントリポイントであり、ファイルに書き込むデータを提供します。
4. 新しい FTPS 要素を HTTP リスナーの後にドラッグます。
    
    ![書き込みフロー](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-write_flow.png)
5. フローのヘッダー (青い行) をダブルクリックして、フローの名前を ​`write-flow`​ に変更します。
    
    ![書き込みフローの設定](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-write_flow_config.png)
6. HTTP 要素を選択します。
7. \[Connector Configuration (コネクタ設定)\] ドロップダウンの横にあるプラス記号をクリックします。
8. 応答画面でデフォルト設定を受け入れて \[OK\] をクリックします。
9. \[Path (パス)\] に ​`write`​ を設定します。
10. FTPS Connector を選択して、プロパティを次のように設定します。
    
    <table class="tableblock frame-all grid-all fit-content spread">
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Display Name (表示名)</th>
<th class="tableblock halign-left valign-top">Write</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Consumer Configuration (コンシューマー設定)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>FTPS_Basic_config</code>​ (設定のデフォルト名)</p>
<p class="tableblock">この値は、​<a href="#設定">​設定済み</a>​の他の設定の名前に設定できます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">操作</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Write</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">File Name (ファイル名)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">FTPS サーバーに作成するファイルの名前。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">File Path (ファイルパス)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ファイルを作成する、FTPS サーバー上のパス。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Input Reference (入力参照)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">指定したファイルに書き込むデータ。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ASCII Data Type (ASCII データ型)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">書き込むファイルが ASCII であるか BINARY であるか。</p>
<p class="tableblock">デフォルトは BINARY です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Append Contents (コンテンツを追加)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">操作に渡されたコンテンツを既存のファイルに追加する (true) かどうか。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ストリーミング</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ファイルの内容をストリームとしてアップロードする (true) か、すべてを一度にアップロードする (false) か。</p></td>
</tr>
</tbody>
</table>
    
    ![Write 操作](/mulesoft/current/ja-jp/ftps-connector/0.3.9/_images/ftps-write.png)
11. アプリケーションを起動し、作成した HTTP エンドポイントを呼び出して、FTPS サーバー上にファイルを作成します。

### [](#write-xml)FTPS サーバーへのファイルの書き込み - XML

FTPS サーバーにファイルを書き込むには、FTPS Connector をメッセージパブリッシャーとして使用して、Studio で生成された XML コードを使用する次のサンプル Mule アプリケーションを実行します。

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
	xmlns:ftps="http://www.mulesoft.org/schema/mule/ftps"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/ftps
	http://www.mulesoft.org/schema/mule/ftps/current/mule-ftps.xsd
	http://www.mulesoft.org/schema/mule/ee/tracking
	http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
    <ftps:config name="FTPS_Basic_Config" username="${username}" password="${password}"
    host="${host}" port="${port}" disableCertificateValidation="true" doc:name="FTPS: FTPS Basic Config"/>
    <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081"
    doc:name="HTTP Listener Configuration"/>
    <flow name="write-flow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <ftps:write config-ref="FTPS_Basic_Config" fileName="test_read.txt"
	filePath="/files" input-ref="&quot;Test file content&quot;" doc:name="FTPS"/>
    </flow>
</mule>
```

## [](#関連情報)関連情報

- [MuleSoft ヘルプセンター](https://help.mulesoft.com)