ページの先頭行へ戻る
Interstage Service Integrator V9.5.0 アプリケーション開発ガイド
FUJITSU Software

C.2.2 サービス呼出しの定義

サービス呼出しの定義について説明します。

C.2.2.1 同期サービス呼出し

同期でサービスを呼び出す場合、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、サービスエンドポイント"endpoint01"で定義されているサービス呼出しを行います。

:
    <StepInformation stepname="SyncServiceCall1" monitoring="false">
        <MediatorFunction name="SyncServiceCall">
            <Method type="execute" name="send">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <Parameter name="endpoint" valuetype="direct">endpoint01</Parameter>
                    <Parameter name="use_fault_message">false</Parameter>
                </ParameterList>
            </Method>
        </MediatorFunction>
    </StepInformation>
:
表C.67 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

SyncServiceCall1

MediatorFunction

name

メディエータファンクション名“SyncServiceCall”を指定します。

SyncServiceCall

Method

type

実行種別“execute”を指定します。

execute

name

SyncServiceCallのメソッド名“send”を指定します。

send

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

2

サービスエンドポイント名を指定します。

name

“endpoint”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

direct

サービスエンドポイント名を指定します。

endpoint01

3

呼出し先サービスからのエラーメッセージをエラーシーケンスに通知するかどうかを指定します。

name

“use_fault_message”を指定します。

use_fault_message

valuetype

パラメタに指定する値のタイプを指定します。

direct

trueまたはfalseを指定します。

false

C.2.2.2 ルーティングして同期サービス呼出し(ルーティング定義を利用しない)

ルーティング機能を使用して、条件に合った同期サービス呼出しを行うには、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、“$price == 1000”の条件に合えばサービスエンドポイント“endpointA”に転送し、“$company @EQUAL@ "Fujitsu"”の条件に合えばサービスエンドポイント“endpointB”に転送し、その他の場合には、“endpointC”に転送しています。

:
    <StepInformation stepname="SyncServiceCallWithRouting1">
        <MediatorFunction name="SyncServiceCallWithRouting">
            <Method type="execute" name="sendWithConditionRouting">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <ParameterArray name="condition_list">
                        <Parameter valuetype="direct">$price == 1000</Parameter>
                        <Parameter valuetype="direct">$company @EQUAL@ "Fujitsu"</Parameter>
                        <Parameter valuetype="direct">*</Parameter>
                    </ParameterArray>
                    <ParameterArray name="endpoint_list">
                        <Parameter valuetype="direct">endpointA</Parameter>
                        <Parameter valuetype="direct">endpointB</Parameter>
                        <Parameter valuetype="direct">endpointC</Parameter>
                    </ParameterArray>
                    <Parameter name="use_fault_message">false</Parameter>
                </ParameterList>
            </Method>
        </MediatorFunction>
    </StepInformation>
:
表C.68 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

SyncServiceCallWithRouting1

MediatorFunction

name

メディエータファンクション名“SyncServiceCallWithRouting”を指定します。

SyncServiceCallWithRouting

Method

type

実行種別“execute”を指定します。

execute

name

SyncServiceCallWithRoutingのメソッド名“sendWithConditionRouting”を指定します。

sendWithConditionRouting

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

ParameterArray

name

“condition_list”を指定します。条件リストの配列です。

condition_list

1

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

$price == 1000

2

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

$company @EQUAL@ "Fujitsu"

3

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

*

ParameterArray

name

“endpoint_list”を指定します。サービスエンドポイントリストの配列です。

endpoint_list

1

Parameter

条件式1のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointA

2

Parameter

条件式2のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointB

3

Parameter

条件式3のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointC

Parameter

1

呼出し先サービスからのエラーメッセージをエラーシーケンスに通知するかどうかを指定します。

name

“use_fault_message”を指定します。

use_fault_message

valuetype

パラメタに指定する値のタイプを指定します。

direct

trueまたはfalseを指定します。

false

条件式

ここでは、条件式で使用できる演算子と文法について説明します。

演算子

条件式で使用できる演算子を以下に示します。

表C.69 演算子の一覧

演算子

説明

>

数値比較を行います。左辺の値が右辺の値よりも大きい場合に真となります。

<

数値比較を行います。左辺の値が右辺の値よりも小さい場合に真となります。

>=

数値比較を行います。左辺の値が右辺の値以上の場合に真となります。

<=

数値比較を行います。左辺の値が右辺の値以下の場合に真となります。

==

数値比較を行います。左辺の値が右辺の値と等しい場合に真となります。

!=

数値比較を行います。左辺の値が右辺の値と異なる場合に真となります。

@EQUAL@

文字列比較を行います。左辺の文字列が右辺の文字列と等しい場合に真となります。

@NOTEQUAL@

文字列比較を行います。左辺の文字列が右辺の文字列と異なる場合に真となります。

条件式の文法

条件式には、以下の文法があります。

注意

XML文書中には直接“ " ”、“&”、“<”および“>”を記述することができません。条件式でこれらの文字を使用する場合は、CDATAセクションまたは実体参照を使用して記述してください。

$price >= 1000を定義する場合

  • CDATAセクションを使用する場合の定義例
    <![CDATA[$price >= 1000]]>

  • 実体参照を使用する場合の定義例
    $price &gt;= 1000

C.2.2.3 ルーティングして同期サービス呼出し(ルーティング定義を利用)

ルーティング機能を使用して、条件に合った同期サービス呼出しを行うには、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、OUTBOUND用のルーティング定義“routingA”にメッセージを送信しています。

:
    <StepInformation stepname="SyncServiceCallWithRouting1">
        <MediatorFunction name="SyncServiceCallWithRouting">
            <Method type="execute" name="sendWithDefinitionRouting">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <Parameter name="routing">routingA</Parameter>
                    <Parameter name="use_fault_message">false</Parameter>
                </ParameterList>
            </Method>
        </MediatorFunction>
    </StepInformation>
:
表C.70 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

SyncServiceCallWithRouting1

MediatorFunction

name

メディエータファンクション名“SyncServiceCallWithRouting”を指定します。

SyncServiceCallWithRouting

Method

type

実行種別“execute”を指定します。

execute

name

SyncServiceCallWithRoutingのメソッド名“sendWithDefinitionRouting”を指定します。

sendWithDefinitionRouting

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

2

ルーティング定義名を指定します。

name

“routing”を指定します。

routing

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

ルーティング定義名を指定します。

routingA

3

呼出し先サービスからのエラーメッセージをエラーシーケンスに通知するかどうかを指定します。

name

“use_fault_message”を指定します。

use_fault_message

valuetype

パラメタに指定する値のタイプを指定します。

direct

trueまたはfalseを指定します。

false

注意

ルーティング定義名で指定するルーティング定義は、送信メッセージルーティング(OUTBOUND)を指定してください。

C.2.2.4 非同期サービス呼出し

非同期でサービスを呼び出す場合、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、サービスエンドポイント"endpoint01"で定義されているサービス呼出しを行います。

:
    <StepInformation stepname="AsyncServiceCall1" monitoring="false">
        <MediatorFunction name="AsyncServiceCall">
            <Method type="execute" name="send">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <Parameter name="endpoint" valuetype="direct">endpoint01</Parameter>
                </ParameterList>
            </Method>
            <Method type="cancel" name="cancel" />
        </MediatorFunction>
    </StepInformation>
:
表C.71 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

AsyncServiceCall1

MediatorFunction

name

メディエータファンクション名“AsyncServiceCall”を指定します。

AsyncServiceCall

Method

type

実行種別“execute”を指定します。

execute

name

AsyncServiceCallのメソッド名“send”を指定します。

send

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

2

サービスエンドポイント名を指定します。

name

“endpoint”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

direct

サービスエンドポイント名を指定します。

endpoint01

Method

type

実行種別“cancel”を指定します。

cancel

name

AsyncServiceCallのメソッド名“cancel”を指定します。

cancel

C.2.2.5 ルーティングして非同期サービス呼出し(ルーティング定義を利用しない)

ルーティング機能を使用して、条件に合った同期サービス呼出しを行うには、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、“$price == 1000”の条件に合えばサービスエンドポイント“endpointA”に転送し、“$company @EQUAL@ "Fujitsu"”の条件に合えばサービスエンドポイント“endpointB”に転送し、その他の場合には、“endpointC”に転送しています。

:
    <StepInformation stepname="AsyncServiceCallWithRouting1">
        <MediatorFunction name="AsyncServiceCallWithRouting">
            <Method type="execute" name="sendWithConditionRouting">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <ParameterArray name="condition_list">
                        <Parameter valuetype="direct">$price == 1000</Parameter>
                        <Parameter valuetype="direct">$company @EQUAL@ "Fujitsu"</Parameter>
                        <Parameter valuetype="direct">*</Parameter>
                    </ParameterArray>
                    <ParameterArray name="endpoint_list">
                        <Parameter valuetype="direct">endpointA</Parameter>
                        <Parameter valuetype="direct">endpointB</Parameter>
                        <Parameter valuetype="direct">endpointC</Parameter>
                    </ParameterArray>
                </ParameterList>
            </Method>
            <Method type="cancel" name="cancel" />
        </MediatorFunction>
    </StepInformation>
:
表C.72 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

AsyncServiceCallWithRouting1

MediatorFunction

name

メディエータファンクション名“AsyncServiceCallWithRouting”を指定します。

AsyncServiceCallWithRouting

Method

type

実行種別“execute”を指定します。

execute

name

AsyncServiceCallWithRoutingのメソッド名“sendWithConditionRouting”を指定します。

sendWithConditionRouting

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

ParameterArray

name

“condition_list”を指定します。条件リストの配列です。

condition_list

1

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

$price == 1000

2

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

$company @EQUAL@ "Fujitsu"

3

Parameter

条件式を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

条件式を指定します。詳細は、“条件式”を参照してください。

*

ParameterArray

name

“endpoint_list”を指定します。サービスエンドポイントリストの配列です。

endpoint_list

1

Parameter

条件式1のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointA

2

Parameter

条件式2のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointB

3

Parameter

条件式3のサービスエンドポイントを指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointC

Method

type

実行種別“cancel”を指定します。

cancel

name

AsyncServiceCallWithRoutingのメソッド名“cancel”を指定します。

cancel

C.2.2.6 ルーティングして非同期サービス呼出し(ルーティング定義を利用)

ルーティング機能を使用して、条件に合った非同期サービス呼出しを行うには、以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、OUTBOUND用のルーティング定義“routingA”にメッセージを送信しています。

:
    <StepInformation stepname="AsyncServiceCallWithRouting1">
        <MediatorFunction name="AsyncServiceCallWithRouting">
            <Method type="execute" name="sendWithDefinitionRouting">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <Parameter name="routing">routingA</Parameter>
                </ParameterList>
            </Method>
            <Method type="cancel" name="cancel" />
        </MediatorFunction>
    </StepInformation>
:
表C.73 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

AsyncServiceCallWithRouting1

MediatorFunction

name

メディエータファンクション名“AsyncServiceCallWithRouting”を指定します。

AsyncServiceCallWithRouting

Method

type

実行種別“execute”を指定します。

execute

name

AsyncServiceCallWithRoutingのメソッド名“sendWithDefinitionRouting”を指定します。

sendWithDefinitionRouting

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

2

ルーティング定義名を指定します。

name

“routing”を指定します。

routing

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

ルーティング定義名を指定します。

routingA

Method

type

実行種別“cancel”を指定します。

cancel

name

AsyncServiceCallWithRoutingのメソッド名“cancel”を指定します。

cancel

注意

ルーティング定義名で指定するルーティング定義は、送信メッセージルーティング(OUTBOUND)を指定してください。

C.2.2.7 複数の非同期サービス呼出し

複数の非同期サービス呼出しを行うには以下のようにします。

指定例

実行ステップ情報の指定例は、以下のとおりです。この例では、サービスエンドポイント“endpointA”、“endpointB”、“endpointC”に同報でメッセージを送信しています。

:
    <StepInformation stepname="AsyncServiceMulticast1">
        <MediatorFunction name="AsyncServiceMulticast">
            <Method type="execute" name="multicast">
                <ParameterList>
                    <Parameter name="message" valuetype="esi.esimessage"></Parameter>
                    <ParameterArray name="endpoint_list">
                          <Parameter valuetype="direct">endpointA</Parameter>
                          <Parameter valuetype="direct">endpointB</Parameter>
                          <Parameter valuetype="direct">endpointC</Parameter>
                    </ParameterArray>
                </ParameterList>
            </Method>
            <Method type="cancel" name="cancel" />
        </MediatorFunction>
    </StepInformation>
:
表C.74 定義項目

キー名

説明

指定例

StepInformation

stepname

ステップ名を指定します。シーケンスブロックに指定したステップ名を指定してください。

AsyncServiceMulticast1

MediatorFunction

name

メディエータファンクション名“AsyncServiceMulticast”を指定します。

AsyncServiceMulticast

Method

type

実行種別“execute”を指定します。

execute

name

SendMessageのメソッド名“multicast”を指定します。

multicast

Parameter

1

パラメタとして渡すメッセージを指定します。

name

“message”を指定します。

name

valuetype

パラメタに指定する値のタイプを指定します。

esi.esimessage(固定値)

ParameterArray

name

“endpoint_list”を指定します。サービスエンドポイントリストの配列です。

endpoint_list

1

Parameter

送信先1のサービスエンドポイント名を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointA

2

Parameter

送信先2のサービスエンドポイント名を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointB

3

Parameter

送信先3のサービスエンドポイント名を指定します。

valuetype

パラメタに指定する値のタイプを指定します。

direct(固定値)

サービスエンドポイントを指定します。

endpointC

Method

type

実行種別“cancel”を指定します。

cancel

name

SendMessageのメソッド名“cancel”を指定します。

cancel