WebSphere Message Broker バージョン 8.0.0.5 オペレーティング・システム: AIX、HP-Itanium、Linux、Solaris、Windows、z/OS

製品の最新バージョンについては、IBM Integration Bus バージョン 9.0 をご覧ください。

.NETCompute ノードからユーザー定義プロパティーへのアクセス

.NETCompute ノードをカスタマイズして、そのノードが含まれるメッセージ・フローと関連付けたプロパティーにアクセスすることができます。

.NETCompute ノードからこれらのプロパティーにアクセスするには、GetUserDefinedProperty または GetUserDefinedPropertyAsString メソッドを使用します。 以下のサンプル C# コードは、メソッドの使用方法を示しています。
                #region UserCode
                // Add user code in this region to create a new output message
                int intProperty = (int)this.GetUserDefinedProperty("intProperty");
                string stringProperty = this.GetUserDefinedPropertyAsString("stringProperty");
                NBElement msg = outputRoot.CreateLastChildUsingNewParser(NBParsers.XMLNSC.ParserName).CreateFirstChild(null, "Message");               
                NBElement el2 = msg.CreateFirstChild("Element2");
                NBElement el1 = msg.CreateFirstChild("Element1");
                el1.SetValue("The message flow user defined property named intProperty has the value "+intProperty.ToString());
                el2.SetValue("The message flow user defined property named stringProperty has the value "+stringProperty);
                #endregion UserCode
このコードは、次のメッセージを生成します (整数およびストリング・フロー・プロパティーはそれぞれ、23、"Hello World!" に設定されます)。
<メッセージ>
     
 <Element1>The message flow user defined property named intProperty has the value 23</Element1>
 <Element2>The message flow user defined property named stringProperty has the value Hello World!</Element2>
</Message>
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック

Copyright IBM Corporation 1999, 2014Copyright IBM Corporation 1999, 2014.

        
        最終更新:
        
        最終更新: 2015-02-28 17:48:48


タスク・トピックタスク・トピック | バージョン 8.0.0.5 | bc34220_