---
schema_version: "1"
id: 014d82abe9e1122abc382764d24590059bbbba6a3d3d0a4d832e118a605f4c58
title: Microsoft Dynamics NAV Connector 2.1
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/microsoft-dynamics-nav-connector/2.1/index.md
canonical_url: https://docs.mulesoft.com/jp/microsoft-dynamics-nav-connector/2.1/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8beeb0362251bf6333faffaec2808ec6673c69d4afc749d827c63013de3b4bce
description: MuleSoft Documentation Site
release: "2.1"
latest: false
---
# Microsoft Dynamics NAV Connector 2.1

Microsoft Dynamics NAV 用 Anypoint Connector (NAV Connector) を使用して、Mule アプリケーションは Microsoft Dynamics NAV Web サービスとやりとりすることができます。 Microsoft Dynamics NAV は、中小企業や大規模な国際的グループ企業の現地子会社の財務、製造、カスタマーリレーション管理、サプライチェーン、分析、電子商取引を支援するグローバルなエンタープライズリソースプランニング (ERP) ソリューションです。

このコネクタでサポートされる Microsoft Dynamics NAV のバージョンは次のとおりです。

- 2013 R2
- 2015
- 2016
- 2017

リリースノート: [Microsoft Dynamics NAV Connector リリースノート](https://docs.mulesoft.com/jp/release-notes/connector/ms-dynamics-nav-connector-release-notes-mule-4)​  
Exchange: [Microsoft Dynamics NAV Connector](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-microsoft-dynamics-nav-connector/)

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

この情報を使用するには、Microsoft Dynamics NAV、Mule Runtime Engine (Mule)、Anypoint Connector、Anypoint Studio、Mule の概念、Mule フローの要素、グローバル要素に精通している必要があります。

対象リソースへの接続をテストするには、ログイン情報が必要です。

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

Maven でこのコネクタを使用するには、Anypoint Exchange の \[Dependency Snippets (連動関係スニペット)\] で pom.xml の連動関係情報を確認してください。

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

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-microsoft-dynamics-nav-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 (連動関係スニペット)\]**​ をクリックします。

## [](#主なユースケース)主なユースケース

Microsoft Dynamics NAV 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">Page Operation</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">パブリッシュされた Page SOAP サービスで定義された操作のいずれかを実行します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Codeunit Operation</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">パブリッシュされた Codeunit SOAP サービスで定義された操作のいずれかを実行します。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">OData Query</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Odata エンドポイントを使用して、NAV エンティティの 1 つに対してクエリを実行します。</p></td>
</tr>
</tbody>
</table>

## [](#はじめに)はじめに

サンプルフローを作成する前に、パブリッシュされたページサービスが必要です。詳細は以下を参照してください。

## [](#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 で、「nav」を検索します。
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 (モジュールをプロジェクトに追加)\]**​ で、検索項目に「nav」と入力します。
4. **\[Available modules (使用可能なモジュール)\]**​ で、このコネクタの名前をクリックします。
5. **\[Add (追加)\]**​ をクリックします。
6. **\[Finish (完了)\]**​ をクリックします。

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

1. HTTP リスナーを Studio キャンバスにドラッグします。
    
    ![キャンバスにドラッグされた Listener](/mulesoft/current/ja-jp/microsoft-dynamics-nav-connector/2.1/_images/ms-dynamics-nav-listener-anypoint.png)
    
    1. \[Path (パス)\] を設定します。
    2. 緑のプラス記号をクリックしてリスナーを設定します。
2. Dynamics Nav の操作を Studio キャンバスにドラッグします。
3. 緑のプラス記号をクリックしてコネクタに設定を追加します。
4. 次の項目に入力します。
    
    <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">Domain (ドメイン)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dynamics NAV インスタンスのドメイン。</p></td>
</tr>
<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 NAV に接続する Windows ユーザー名。</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 NAV に接続するユーザーのパスワード。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">SOAP URL</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">SOAP サービスが ​<code>https://&lt;Server&gt;:&lt;WebServicePort&gt;/&lt;ServerInstance&gt;/WS</code>​ の形式で公開されるベース URL。
 例: <code>https://hostname:7047/DynamicsNAV90/WS</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">OData URL</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Odata サービスが ​<code>https://&lt;Server&gt;:&lt;WebServicePort&gt;/&lt;ServerInstance&gt;/OData</code>​ の形式で公開されるベース URL。
 例: <code>https://hostname:7048/DynamicsNAV90/OData</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Company Name (会社名) (省略可能)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">接続する Dynamics NAV の会社。この項目を空白にすると、デフォルトで設定されたものが使用されます。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Disable Cn Check (Cn チェックを無効化)</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">HTTPS 証明書の場合、証明書に信頼するパートナーの署名がなければ、サーバーから例外が返されることがあります。これを防止するために、CN (一般名) チェックを無効にすることができます。注意: 本番環境では推奨されません。</p></td>
</tr>
</tbody>
</table>
5. \[OK\] をクリックします。
6. 次の項目を設定します。
    
    ![\[General (一般)\] タブでの Dynamics NAV Connector 設定パネル](_images/ms-dynamics-nav-op-config.png)
    
    - Query (クエリ): Dynamics NAV で実行するクエリ。
    - Fetch Size (フェッチサイズ): 1 ページで取得される項目数。

## [](#ユースケース-studio)ユースケース: Studio

![クエリフロー](/mulesoft/current/ja-jp/microsoft-dynamics-nav-connector/2.1/_images/ms-dynamics-nav-flow.png)

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

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

<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:nav="http://www.mulesoft.org/schema/mule/nav"
	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/nav
http://www.mulesoft.org/schema/mule/nav/current/mule-nav.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">

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

	<nav:dynamics-nav-config name="Nav_Connector_Dynamics_nav_config"
      doc:name="Nav Connector Dynamics nav config">
    		<nav:ntlm-connection
            domain="${config.domain}"
            username="${config.username}"
            password="${config.password}"
            soapUrl="${config.soapUrl}"
            odataUrl="${config.odataUrl}"
            companyName="${config.companyName}"
            disableCnCheck="true" />
    </nav:dynamics-nav-config>

    <flow name="query-flow">
    		<http:listener doc:name="Listener"
            config-ref="HTTP_Listener_config"
            path="/query"/>
    		<nav:odata-query fetchSize="10" doc:name="Odata query"
            config-ref="Nav_Connector_Dynamics_nav_config">
    			<nav:query>dsql: SELECT No FROM SalesOrders LIMIT 5</nav:query>
    		</nav:odata-query>
    		<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>
```

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

- [パブリッシュされたページサービス情報](https://msdn.microsoft.com/en-us/library/dd355316\(v=nav.80\).aspx)
- [Microsoft Dynamics NAV Web サービスのサイト](https://msdn.microsoft.com/en-us/library/dd355036\(v=nav.90\).aspx)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)