AS2 Connector 5.0.0 - アップグレードおよび移行 - Mule 4

サポートされているアップグレードパス

これは、AS2 Connector 4.x から 5.0.0 への直接アップグレードです。

このリリースでの変更

  • Async MDN​ は個別のフローとして処理されるようになりました。非同期 MDN のエンドポイントを含む新しいフローを追加する必要があります。

  • ユーザーは HTTP リスナー設定を再利用できます。これは、あなたとあなたの取引パートナーにいくつかの変更があることを意味します。

    • 新しい HTTP リスナーのエンドポイント (ポート) 設定で、AS2 受信エンドポイント (ポート) のポートを変更する

    • 再利用している HTTP リスナーに対応する新しい URL (ポート) 設定を取引パートナーに知らせる

    • ロードバランサーを使用している場合、それを変更する

  • AS2 Connector 5.0.0 以降、より広範囲の暗号化セット、AES128_CBC​、AES192_CBC​、AES256_CBC​ がサポートされています。 5.0.0 より前のバージョンの AS2 Connector で使用されていた AES128​、AES192​、AES256​ などの暗号化は、この拡張されたセットにマップされるようになりました。

  • 名前空間が as2​ から as2-mule4​ に変更されました。

新しい名前空間を追加する前に、古い名前空間を削除する必要があります。

  • 単一のソースグローバル設定は、「送信エンドポイント」から「受信エンドポイント」用の個別の操作設定とソースグローバル設定に分割されました。この理由は、これらは相互に排他的になったためです。

次に例を示します。

  • send-config​は send-with-sync-mdn​ および send-with-async-mdn​ 操作で使用されるようになりました。

  • listener-config​ は as2-listener​ ソースで使用されるようになりました。

  • mdn-listener-config​ は as2-mdn-listener​ ソースで使用されるようになりました。

要件と制限事項

最新バージョンにアップグレードする前に、いくつかの要件と制限事項に注意する必要があります。

要件

移行する前に、次の要件を満たしていることを確認します。

Mule 4.1.0 以降

Java 8

制限事項

移行を実行する前に、次の既知の制限に注意してください。

  • 非否認のドキュメントの署名付きコピーは保存されません。

アップグレード手順

次の手順に従って、AS2 バージョン 5.0.0 へのアップグレードを実行します。

  1. Exchange から AS2 Connector 5.0.0 をダウンロードします。

  2. 古い名前空間を削除して、新しい名前空間を追加します。

前 (AS2 v4 名前空間)

```
<mule  xmlns:as2="http://www.mulesoft.org/schema/mule/as2"
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	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/as2 http://www.mulesoft.org/schema/mule/as2-mule4/current/mule-as2.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
```

後 (AS2 v5 名前空間)

```
<mule xmlns:as2-mule4="http://www.mulesoft.org/schema/mule/as2-mule4"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xsi:schemaLocation="
	http://www.mulesoft.org/schema/mule/as2-mule4 http://www.mulesoft.org/schema/mule/as2-mule4/current/mule-as2-mule4.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
```
  1. ロードバランサーを使用する場合、必要な更新を行います。

    詳細は、​「CloudHub ロードバランサー」​を参照してください。

  2. 非同期 MDN を処理するエンドポイントを含む新しいフローを追加します。

  3. AS2 受信エンドポイント (ポート) のポートを変更します。

グローバル設定を操作設定と受信元固有のグローバル設定に分割

これらの設定は「送信エンドポイント」から「受信エンドポイント」用です。この理由は、これらは相互に排他的になったためです。

前 (AS2 v4 グローバル設定):

```
<as2:config name="AS2_Config" doc:name="AS2 Config" doc:id="50470d1e-519b-4646-85ff-1ec5e0994e59" >
    <as2:connection
    namePartnerFrom="selfName" as2IdPartnerFrom="selfId" x509aliasPartnerFrom="selfAlias" emailPartnerFrom="self@email.com"
    namePartnerTo="partnerName" as2IdPartnerTo="partnerID" x509aliasPartnerTo="partnerAlias" emailPartnerTo="partner@email.com"
    subject="Send Subject" as2Url="partner-send-url" as2ReceiptOption="selfMDNUrl" mimeType="content-mimeType"
    keyStorePath="path/to/keystore" keyPassword="keystorepwd"
    receiverHost="receiveHost" receiverPort="receive port" secureReceiverPort="https receive port" secureReceiverKeystorePath="https receive keystore path" secureReceiverKeystorePassword="https receive keystore pwd"
    mdnReceiverPort="MDN port" mdnSecureReceiverPort="https MDN port" mdnSecureReceiverKeystorePath="https mdn keystore path" mdnSecureReceiverKeystorePassword="https mdn keystore pwd"
    encrypt="AES256" sign="SHA256" contentTransferEncoding="BASE64" compressionType="true">
        <as2:proxy proxyHost="proxyhost" proxyPort="12345" proxyUsername="proxyUser" proxyPassword="proxyPwd" />
    </as2:connection>
</as2:config>
```

後 (AS2 v5 グローバル設定):

```
<!-- Send global config -->
<as2-mule4:send-config name="AS2_Connector_Send_config" doc:name="AS2 Connector Send config" doc:id="f32f6a99-15ea-411d-ad00-ec4d9990b874" >
    <as2-mule4:connection partnerURL="partner-send-url" connectionTimeout="600000"
        usePersistentConnections="false" maxConnections="5" connectionIdleTimeout="40000" tlsContext="TLS_Context">
        <as2-mule4:proxy-config >
            <as2-mule4:proxy host="proxyHost" port="12345" username="proxyUser" password="proxyPwd" />
        </as2-mule4:proxy-config>
    </as2-mule4:connection>
    <as2-mule4:self-config as2Name="selfId" x509Alias="selfAlias" email="self@email.com" />
    <as2-mule4:partner-config as2Name="partnerID" x509Alias="partnerAlias" email="partner@email.com" />
	<as2-mule4:requester-config micAlg="SHA256" mdnMicAlg="SHA1" requestReceipt="SIGNED_REQUIRED" receiptDeliveryURL="selfMDNUrl" subject="Send Subject" encryptionAlg="AES256_CBC" contentTransferEncoding="BASE64" compressionType="ZLIB"/>
    <as2-mule4:keystore-config keystorePassword="keystorepwd" keystorePath="path/to/keystore"/>
</as2-mule4:send-config>

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

<!-- HTTPS global config (Only required if as2-listener or as2-mdn-listener has to support HTTPS)-->
	<http:listener-config name="HTTPS_Listener_config">
		<http:listener-connection host="localhost" port="8082" tlsContext="TLS_Context" protocol="HTTPS">
		</http:listener-connection>
	</http:listener-config>
	<tls:context name="TLS_Context" doc:name="TLS Context" doc:id="41e55ae5-c31b-48e8-91c7-a3acb92d6d2b">
		<tls:trust-store path="path/to/truststore" password="pwd" algorithm="RSA"/>
		<tls:key-store type="jks" path="path/to/keystore" alias="selfAlias" password="keystorepwd"/>
	</tls:context>

<!-- Receive global config -->
	<as2-mule4:listener-config name="AS2_HTTPS_Listener_config" httpListenerConfig="HTTPS_Listener_config">
		<as2-mule4:async-mdn-connection-provider-connection tlsContext="TLS_Context"/>
		<as2-mule4:self-config as2Name="selfId" x509Alias="selfAlias" email="self@email.com"/>
		<as2-mule4:partner-config as2Name="partnerId" x509Alias="partnerAlias" email="partner@email.com"/>
		<as2-mule4:key-store-config keystorePassword="keystorepwd" keystorePath="path/to/keystore"/>
	</as2-mule4:listener-config>

<!-- Receive MDN global config -->
	<as2-mule4:mdn-listener-config name="AS2_Connector_HTTPS_Mdn_listener_config" httpListenerConfig="HTTPS_Listener_config">
		<as2-mule4:self-config as2Name="selfId" x509Alias="selfAlias" email="self@email.com"/>
		<as2-mule4:partner-config as2Name="partnerId" x509Alias="partnerAlias" email="partner@email.com"/>
		<as2-mule4:key-store-config keystorePassword="keystorepwd" keystorePath="path/to/keystore"/>
	</as2-mule4:mdn-listener-config>
```

受信元

受信元には、リスンエンドポイントの path​ の定義が必要です。

  • 前:

```
<as2:receive doc:name="Receive" config-ref="AS2_Config"/>
```
  • 後:

```
<flow name="AS2_HTTPS_Listener_Flow">
    <as2-mule4:as2-listener path="/toSelf" config-ref="AS2_HTTPS_Listener_config"/>
</flow>
```

AS2 メッセージの送信

send 操作は、send-with-async-mdn​ と send-with-sync-mdn​ の 2 つの個別の操作に分割されています。

  • 前:

```
<as2:send timeout="send timeout" config-ref="AS2_Config" input="Hello world" fileName="fileName"/>
```
```
<as2-mule4:send-with-async-mdn  fileName="fileName" config-ref="AS2_Connector_Send_Sync_config" mimeType="application/xml" requireProcessed="false">
    <as2-mule4:content ><![CDATA[#['Hello world']]]></as2-mule4:content>
</as2-mule4:send-with-async-mdn>

<!-- OR -->

<as2-mule4:send-with-sync-mdn  fileName="fileName" config-ref="AS2_Connector_Send_Sync_config" mimeType="application/xml" requireProcessed="false">
    <as2-mule4:content ><![CDATA[#['Hello world']]]></as2-mule4:content>
</as2-mule4:send-with-sync-mdn>

```

MDN 受信元

send-with-async-mdn​ を使用している場合、受信 MDN フローを定義する必要があります。

  • 前:

No example; no configuration needed.
  • 後:

```
<flow name="AS2_HTTPS_MDN_Listener_Flow">
    <as2-mule4:as2-mdn-listener config-ref="AS2_Connector_HTTPS_Mdn_listener_config" path="/mdn"/>
</flow>
`

アップグレード後の手順

前の手順を実行したら、次の手順に従ってアップグレードを完了します。

  1. 起動時に例外がないことを確認してコネクタが機能していることを確認し、AS2 パートナーに対してテストします。

  2. 使用している HTTP リスナーに対応する新しい URL (ポート) 設定をパートナーに通知します。