---
schema_version: "1"
id: dab9e1218fcd8848d87d5907e2d37328f4fa5c7c99d05b130f02d066fda8511b
title: SAP S/4HANA OData Connector 2.9 - XML と Maven のサポート
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-xml-maven.md
canonical_url: https://docs.mulesoft.com/jp/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-xml-maven
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 45e3460aafabb119edea5d88b2f3ba57f479caebe35b74a3425ccc6a049c529c
description: MuleSoft Documentation Site
release: "2.9"
latest: true
---
# SAP S/4HANA OData Connector 2.9 - XML と Maven のサポート

XML で Mule アプリケーションを手動でコーディングすることもできますが、Anypoint Studio を使用した方が効率的です。

Anypoint Studio の XML エディターまたはテキストエディターから Mule Runtime Engine (Mule) アプリケーションを手動でコーディングする場合、参照ステートメントを XML Mule フローと Apache Maven ​`pom.xml`​ ファイルの両方に追加することで、アプリケーションでコネクタにアクセスできます。

コネクタを Studio にインストールすると、Studio は自動的に XML コードにコネクタの名前空間およびスキーマの場所を入力します。さらに、​`pom.xml`​ ファイルに連動関係を追加します。

## [](#コネクタの参照名前空間ステートメントの追加)コネクタの参照名前空間ステートメントの追加

次のコードを設定 XML のヘッダーの ​`mule`​ タグ内に貼り付けます。

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

次の例は、XML 内に名前空間ステートメントが配置される方法を示しています。

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

## [](#pom-ファイルの連動関係の追加)POM ファイルの連動関係の追加

Apache Maven ​`pom.xml`​ ファイルは Anypoint Studio によって生成され、Mule アプリケーションコネクタの連動関係が含まれます。Mule アプリケーションを手動でコーディングする場合、次の XML スニペットを POM ファイルに含めてこのコネクタにアクセスできるようにします。

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-sap-s4hana-cloud-connector</artifactId>
  <version>x.x.x</version>
  <classifier>mule-plugin</classifier>
</dependency>
```

コネクタの ​`version`​ が、使用しているバージョンと一致していることを確認します。

最新の ​`pom.xml`​ ファイル情報を取得する手順は、次のとおりです。

1. [Anypoint Exchange](https://www.mulesoft.com/exchange/)​ に移動します。
2. Exchange で、​**\[Login (ログイン)\]**​ をクリックし、Anypoint Platform のユーザー名とパスワードを指定します。
3. Exchange で、「​`SAP S/4HANA OData`​」を検索します。
4. **\[Dependency Snippets (連動関係スニペット)\]**​ をクリックします。

## [](#次のステップ)次のステップ

名前空間および pom.xml ファイルを完了したら、​[例](https://docs.mulesoft.com/jp/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-examples)​を試すことができます。

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

- [Anypoint Studio を使用した SAP S/4HANA OData Connector の設定](https://docs.mulesoft.com/jp/sap-s4hana-cloud-connector/latest/sap-s4hana-cloud-connector-studio) [MuleSoft ヘルプセンター](https://help.mulesoft.com)