---
schema_version: "1"
id: fc61f1e4d3dc38ebfa2c8ed630947c8879e9185c63c3c3d18ce602026da13a9e
title: Ajax Connector
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/ajax-connector/latest/index.md
canonical_url: https://docs.mulesoft.com/jp/ajax-connector/latest/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2d95cef558e12b059f2efb04f47c6ba1523fa9d9731a8f6eeea9b73fd101baf8
description: MuleSoft Documentation Site
release: 0.3.9
latest: true
---
# Ajax Connector

![Ajax アイコン](/mulesoft/current/ja-jp/ajax-connector/latest/_images/ajax-icon-no-caption.png)

Ajax Connector は、外部 Web リソースと通信する Ajax サーバーとの間で非同期にメッセージを送受信するためのトランスポートチャネルを作成します。 **Ajax**​ は ​**Asynchronous JavaScript and XML**​ の頭字語であり、非同期 Web アプリケーションの作成を容易にする関連テクノロジーのクラスターです。 Ajax Connector は、インバウンドまたはアウトバウンドエンドポイントとして設定できます。

Anypoint Studio では、Ajax Connector は [CometD コネクタ](https://anypoint.mulesoft.com/exchange/68ef9520-24e9-4cf2-b2f5-620025690913/cometd-connector/)​と呼ばれ、Anypoint Studio にあらかじめインストールされています。

**Exchange:**​ [CometD コネクタ](https://www.mulesoft.com/exchange/68ef9520-24e9-4cf2-b2f5-620025690913/cometd-connector/)​

通常、Ajax エンドポイントは Mule フローを外部 Web ページに接続し、クラウドの任意の場所でユーザーと情報を交換できます。Web ページに接続された JavaScript クライアントはユーザー入力をリスンし、それを処理するフローに Ajax エンドポイントを介して送信します。

通常、Ajax サーバーと Ajax エンドポイントが通信に使用するチャネルは、​**「Connector Configuration (コネクタ設定)」**​と呼ばれるグローバル要素テンプレートを介して設定されます。

## [](#全般設定)全般設定

Ajax エンドポイントの設定には通常、2 つの手順が必要です。

1. Ajax エンドポイントを Mule フロー内のどこに配置するかを決定し、それをパレットから Mule フローを設定する一連のプロセッサーの適切な場所にドラッグします。
    
    1. Ajax エンドポイントをフローの最初に配置すると、​**インバウンドエンドポイント**​ (アプリケーションの​**メッセージソース**​) として機能します。
    2. Ajax Connector をフローの途中または最後に配置すると、アウトバウンドエンドポイントとして機能します。
2. \[Message Flow (メッセージフロー)\] キャンバスで Ajax アイコンをダブルクリックして Ajax エンドポイントプロパティエディターを開き、そのさまざまなタブの項目に値を入力して、Ajax エンドポイント (およびそのトランスポートチャネルの定義に連動する ​**\[Connector Configuration (コネクタ設定)\]**​) を設定します。

図で示しているように、タブを設定します。

## [](#general-一般-タブ)\[General (一般)\] タブ

![Studio-ajax-gen](/mulesoft/current/ja-jp/ajax-connector/latest/_images/ajax-connector-general.png)

<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"><strong>Display Name (表示名)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">デフォルトは一般的なエンドポイント名 (この場合は Ajax) です。​<code>Interactive Opinion Poll Connection</code>​ などのエンドポイントの特定のロールを反映させるには、表示名を変更する必要があります。表示名は英数字にする必要があります。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Channel (チャネル)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Ajax エンドポイントがクライアント Web ページと通信するチャネルを指定します。例: <code>/services/echo</code>​。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Connector Configuration (コネクタ設定)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ドロップダウンリストを使用して、このエンドポイント用に以前に設定されたコネクタ設定を選択します。このエンドポイントの種別用のコネクタ設定を作成していない場合、このウィンドウから ​<strong>[Add (追加)]</strong>​ をクリックして作成できます。以前に作成したグローバル要素を変更するには、​<strong>[Edit (編集)]</strong>​ をクリックします。</p></td>
</tr>
</tbody>
</table>

## [](#advanced-詳細-タブ)\[Advanced (詳細)\] タブ

![Studio-ajax-outbound-adv](/mulesoft/current/ja-jp/ajax-connector/latest/_images/ajax-connector-advanced.png)

<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"><strong>Address (住所)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">このエンドポイントのアドレス (​<code><a href="http://localhost:8081/file" class="bare">http://localhost:8081/file</a></code>​ など) を入力します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Response Timeout (応答タイムアウト)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">エンドポイントが応答を待機する必要がある時間 (ミリ秒) を指定します。デフォルトは ​<strong>1000</strong>​ ミリ秒です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Encoding (エンコード)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ドロップダウンリストから、メッセージデータに使用する文字セット。(UTF-8 など) を選択します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Disable Transport Transformer (トランスポートトランスフォーマーを無効化)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">エンドポイントのデフォルトの応答トランスポートを​<em>使用しない</em>​場合、このボックスをオンにします。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>MIME Type (MIME タイプ)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ドロップダウンリストから、このエンドポイントでサポートされる形式の 1 つを選択します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Cache Messages (メッセージのキャッシュ)</strong>​</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<em>(アウトバウンド Ajax エンドポイントのみに適用)</em>​ディスパッチャーがメッセージをキャッシュできるようにするには、このボックスをオンにします。メッセージは、クライアントがチャネルにサブスクライブしていない場合にのみキャッシュされます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Message Cache Size (メッセージキャッシュサイズ)</strong>​</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<em>(アウトバウンド Ajax エンドポイントのみに適用)</em>​[Cache Messages (メッセージのキャッシュ)] を有効にしてから、キャッシュサイズを選択します。デフォルトのキャッシュサイズは 1024 です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Connector Endpoint (コネクタエンドポイント)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ドロップダウンリストを使用して、以前に設定されたグローバルエンドポイントテンプレートを選択します (存在する場合)。このエンドポイントの種別用のグローバル要素を作成していない場合、​<strong>[Add (追加)]</strong>​ をクリックして、表示されるペインの項目に入力します。以前に作成したグローバル要素を変更するには、​<strong>[Edit (編集)]</strong>​ をクリックします。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Enable default events tracking (デフォルトイベント追跡を有効化)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">このエンドポイントのデフォルト​<a href="#3.9@mule-runtime::business-events.adoc" class="xref unresolved">ビジネスイベント</a>​追跡を有効にします。</p></td>
</tr>
</tbody>
</table>

## [](#transformers-トランスフォーマー-タブ)\[Transformers (トランスフォーマー)\] タブ

![Studio-ajax-trans](/mulesoft/current/ja-jp/ajax-connector/latest/_images/ajax-connector-transformers.png)

<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"><strong>Transformers References: Request (トランスフォーマーリファレンス: 要求)</strong></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">トランスポートに送信される前に要求に適用される同期トランスフォーマーのリストを入力します。</p></td>
</tr>
</tbody>
</table>

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

- XML エディターを使用して Ajax エンドポイントのプロパティを設定する方法についての詳細は、Mule Runtime ドキュメントの​[「Ajax トランスポートリファレンス」](#3.9@mule-runtime::ajax-transport-reference.adoc)​の説明を参照してください。