---
schema_version: "1"
id: 2f0971d4a397fe651d9821cc0c5c4aca91c3e44cfe7abd8597be5788f9365437
title: Microsoft Dynamics AX 2012 Connector
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/microsoft-dynamics-ax-connector/latest/index.md
canonical_url: https://docs.mulesoft.com/jp/microsoft-dynamics-ax-connector/latest/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: da9b9cd5833a69e72899786d8aaff754ff557285f85b156b15e0a81ba243efd9
description: MuleSoft Documentation Site
release: "2.0"
latest: true
---
# Microsoft Dynamics AX 2012 Connector

Microsoft Dynamics AX 2012 Connector v2.0

Microsoft Dynamics AX 2012 用 Anypoint Connector (Dynamics AX 2012 Connector) を使用して、Mule アプリケーションは Microsoft Dynamics AX クエリサービスとやりとりすることができます。

このコネクタは次の操作をサポートしています。

- AOT テーブルに対してクエリを実行する。
- AOT 静的クエリを実行する。
- AIF ドキュメントサービスをコールする。

このコネクタは Microsoft Dynamics AX 2012 をサポートしています。

## [](#始める前に)始める前に

このコネクタを使用するには、以下に精通している必要があります。

- Microsoft Dynamics AX
- Mule、Mule の概念、Mule フローの要素、グローバル要素
- Anypoint Connector
- Anypoint Studio

アプリケーションを作成する前に、以下が必要です。

- 対象リソースへの接続をテストするための Microsoft ログイン情報
- インストール済みの Anypoint Windows ゲートウェイサービス

ソフトウェアの要件および互換性情報については、「コネクタリリースノート」を参照してください。

## [](#pom-ファイル情報)POM ファイル情報

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-microsoft-dynamics-ax-connector</artifactId>
  <version>x.x.x</version>
  <classifier>mule-plugin</classifier>
</dependency>
```

`x.x.x`​ を使用しているコネクタに対応するバージョンに置き換えます。

最新の ​`pom.xml`​ ファイル情報を取得するには、​ [Anypoint Exchange](https://www.mulesoft.com/exchange/)​ でコネクタにアクセスし、​**\[Dependency Snippets (連動関係スニペット)\]**​ をクリックします。

### [](#anypoint-platform-用の-windows-ゲートウェイサービス)Anypoint Platform 用の Windows ゲートウェイサービス

Windows ゲートウェイサービスエージェントは、Dynamics AX システムサービスをコールしたときにプロトコル変換を実行します。 Dynamics AX システムサービス (メタデータサービス、クエリサービス) は net.tcp プロトコルを使用しますが、Java には実装されません。 このコネクタは要求を実行するために、下図のとおり、Windows ゲートウェイサービス経由で要求を転送します。

![\[General (一般)\] タブの Microsoft Dynamics AX Connector の \[Global Elements Properties (グローバル要素プロパティ)\] 設定ウィンドウ](_images/ms-dynamics-ax-protocol-translation.png)

1. コネクタが HTTP 要求を Windows ゲートウェイサービスに送信します。
2. Windows ゲートウェイサービスが HTTP 要求を受け取ります。
3. Windows ゲートウェイサービスが、netTcp プロトコルを使用して、Dynamics AX システムサービスに対して要求を実行します。
4. Windows ゲートウェイサービスエージェントが、Dynamics AX システムサービスから応答を受け取ります。
5. Windows ゲートウェイサービスエージェントが、HTTP 経由で応答をコネクタに送信します。
6. コネクタが応答を受信します。

Anypoint Platform と Windows ゲートウェイサービス間の通信はすべて SSL によって認証され保護されます。

## [](#anypoint-studio-7-での接続)Anypoint Studio 7 での接続

このコネクタを Anypoint Studio で使用するには、まず Exchange からダウンロードして必要に応じて設定します。

## [](#studio-プロジェクトへのコネクタの追加)Studio プロジェクトへのコネクタの追加

Anypoint Studio には、Studio プロジェクトにコネクタを追加する 2 つの方法があります。Studio タスクバーの Exchange ボタンから追加するか、\[Mule Palette (Mule パレット)\] ビューから追加します。

### [](#exchange-を使用してコネクタを追加する)Exchange を使用してコネクタを追加する

1. Studio で Mule プロジェクトを作成します。
2. Studio タスクバーの左上にある Exchange アイコン ​**(X)**​ をクリックします。
3. Exchange で、​**\[Login (ログイン)\]**​ をクリックし、Anypoint Platform のユーザー名とパスワードを指定します。
4. Exchange で、「ax」を検索します。
5. コネクタを選択して ​**\[Add to project (プロジェクトに追加)\]**​ をクリックします。
6. 画面の指示に従ってコネクタをインストールします。

### [](#studio-でコネクタに追加する)Studio でコネクタに追加する

1. Studio で Mule プロジェクトを作成します。
2. \[Mule Palette (Mule パレット)\] ビューで、​**\[(X) Search in Exchange ((X) Exchange 内を検索)\]**​ をクリックします。
3. **\[Add Modules to Project (モジュールをプロジェクトに追加)\]**​ で、検索項目に「ax」と入力します。
4. **\[Available modules (使用可能なモジュール)\]**​ で、このコネクタの名前をクリックします。
5. **\[Add (追加)\]**​ をクリックします。
6. **\[Finish (完了)\]**​ をクリックします。

### [](#studio-で設定する)Studio で設定する

1. コネクタの操作を Studio キャンバスにドラッグします。
    
    ![「Query Table 操作」](/mulesoft/current/ja-jp/microsoft-dynamics-ax-connector/latest/_images/ms-dynamics-ax-component.png)
2. 一般設定で次の項目に入力します。
    
    ![「\[Global Element Properties (グローバル要素プロパティ)\] の \[General (一般)\] 設定タブ」](_images/ms-dynamics-ax-any-config.png)
    
    - Company (会社): すべてのコール内で使用する会社を設定します。
    - Language (言語): すべてのコール内で使用する言語を設定します。
    - Log on as user (ユーザーとしてログオン): すべてのコール内で使用するユーザーを設定します。
    - Message id (メッセージ ID): すべてのコール内で使用するメッセージ ID を設定します。
    - Partition key (パーティションキー): すべてのコール内で使用するパーティションキーを設定します。
        
        接続パラメーター:
        
        <table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
<col style="width: 77.7778%;">
</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">Dynamics AX に接続するユーザー名。</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">Dynamics AX に接続するためのパスワード。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">AOS Server Name (AOS サーバー名)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">アプリケーションオブジェクトサーバーを実行しているサーバーの名前または IP。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">AOS Services WSDL Port (AOS サービス WSDL ポート)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">サービス WSDL を実行するポート番号。デフォルトは、​<code>8101</code>​ です。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Gateway Router Service Url (ゲートウェイルーターサービス URL)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Windows ゲートウェイサービスのアドレス (ホストとポート)。このアドレスは通常 ​<code>https://myserver.com:9333/router</code>​ のようになります。</p></td>
</tr>
</tbody>
</table>

高度な接続の場合は、次の項目に入力します。

![\[Advanced (詳細)\] タブの Microsoft Dynamics AX Connector の \[Global Elements Properties (グローバル要素プロパティ)\] 設定ウィンドウ](_images/ms-dynamics-ax-any-advanced-config.png)

- AOS Endpoint Port (AOS エンドポイントポート) (省略可能) - この設定を使用して、サービスの WSDL ドキュメントにあるサービスエンドポイントを上書きします。
- Connect Timeout (接続タイムアウト) - コネクタ要求の接続タイムアウトの設定に使用します。この省略可能な値の単位はミリ秒です (無制限のタイムアウトは 0)。
- Receive timeout (受信タイムアウト) - コネクタ要求の受信タイムアウトの設定に使用します。この値はミリ秒単位で、省略可能です。

## [](#ユースケース-query-table)ユースケース: Query Table

1. フローに HTTP リスナーを追加します。
2. 緑のプラス記号をクリックして設定します。
3. \[Host (ホスト)\] を「localhost」、\[Port (ポート)\] を「8080」に設定します。
4. \[OK\] をクリックします。
5. Microsoft Dynamics AX パレットから Query Table 操作を追加します。
6. 緑のプラス記号をクリックして接続を設定します。
7. 上記の項目を設定します。
8. \[Query (クエリ)\] パラメーターに「​`dsql:Select Name from ProjTable`​」と入力します。
9. \[Transform Message (メッセージの変換)\] を追加して、次のとおり設定します。
    
    ```dataweave
    %dw 2.0
    output application/json
    payload
    ```
10. `localhost:8080`​ に対して curl を実行します。

## [](#ユースケース-xml)ユースケース: XML

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

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
      xmlns:microsoft-dynamics-ax="http://www.mulesoft.org/schema/mule/microsoft-dynamics-ax"
      xmlns:http="http://www.mulesoft.org/schema/mule/http"
      xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      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/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/microsoft-dynamics-ax
http://www.mulesoft.org/schema/mule/microsoft-dynamics-ax/current/mule-microsoft-dynamics-ax.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
    <configuration-properties file="mule-app.properties"/>

    <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config">
        <http:listener-connection host="localhost" port="8082"/>
    </http:listener-config>

    <microsoft-dynamics-ax:dynamics-ax-config name="Microsoft_Dynamics_AX_Dynamics_AX"
         doc:name="Microsoft Dynamics AX Dynamics AX">
        <microsoft-dynamics-ax:soap-connection disableCnCheck="true"
         gatewayRouterServiceAddress="${gateway-connection-config.gatewayRouterServiceAddress}"
         username="${gateway-connection-config.username}"
         password="${gateway-connection-config.password}"
         aosServerName="${gateway-connection-config.aosServerName}"
         aosWsdlPort="${gateway-connection-config.aosWsdlPort}"/>
    </microsoft-dynamics-ax:dynamics-ax-config>

    <flow name="dynamics-old-ax-demoFlow2">
        <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/query"/>
        <set-payload value="#[attributes.queryParams.queryToExecute]" doc:name="Set Payload"/>
        <microsoft-dynamics-ax:query-table itemsPerPage="5" doc:name="Query table"
              config-ref="Microsoft_Dynamics_AX_Dynamics_AX">
            <microsoft-dynamics-ax:query>#[payload]</microsoft-dynamics-ax:query>
        </microsoft-dynamics-ax:query-table>
        <ee:transform doc:name="Transform Message">
            <ee:message>
                <ee:set-payload><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
            </ee:message>
        </ee:transform>
    </flow>

</mule>
```

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

- [Windows Gateway Services Configuration Guide](https://docs.mulesoft.com/connectors/windows-gateway-services/windows-gateway-services-guide-mule4)
- Run a query against an [AOT table](https://msdn.microsoft.com/EN-US/library/bb314725.aspx)​ (AOT テーブルに対するクエリの実行)
- Run an [AOT static query](https://msdn.microsoft.com/en-us/library/bb394994.aspx)​ (AOT 静的クエリの実行)
- Call an [AIF Document Service](https://technet.microsoft.com/EN-US/library/bb496530.aspx)​ (AIF ドキュメントサービスのコール)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)