Forums: Open Discussion (Thread #23505)

【クライアント】DataSetXmlCommunicateBLogicについて (2009-07-29 14:12 by Anonymous #45192)

お世話になっております。

EventControllerを使用して非同期送信を行い、DataSetXmlCommunicateBLogicクラスの拡張クラスでレスポンスヘッダーを受け取ろうとしたところ、以下の問題が発生します。

エラー発生場所 EventController
ex {"コンバートID "SC_BM0501_01_C01" のデータセット変換時に DataTable "Yoshiki9" が DataSet "System.Data.DataSet" に見つかりませんでした。"} System.Exception

場所 TERASOLUNA.Fw.Client.Conversion.DataSetConverter.DoReverse(String id, ResultElement element, DataSet srcData, DataSet destData)
場所 TERASOLUNA.Fw.Client.Conversion.DataSetConverter.Reverse(String id, DataSet srcData, DataSet destData)
場所 TERASOLUNA.Fw.Client.Coordinator.ReverseDataSet(String convertId, DataSet viewData, DataSet blogicResultData)
場所 TERASOLUNA.Fw.Client.Coordinator.Postprocess(EventController eventController, ExecutionResult executionResult, BLogicResult blogicResult)
場所 TERASOLUNA.Fw.Client.Coordinator.Execute(EventController eventController)
場所 TERASOLUNA.Fw.Client.EventController.Execute()
場所 xxxxx.xxxxx_DoDelegateProc(Object sender, DoWorkEventArgs e)

DataSetXmlCommunicateBLogic拡張クラスのメソッドを全てコメントアウトして実行しても、上記エラーが発生します。
(拡張クラスを使用せず、DataSetXmlCommunicateBLogicクラスを使用すると上記エラーは発生しません)
上記エラーを回避して、レスポンスヘッダーを受信するにはどうしたらよいでしょうか?

使用環境
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 SP1
IE 6.0
Server/Client Framework for .NET ver2.1.0.1

以上宜しくお願いいたします。

Reply to #45192×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 【クライアント】DataSetXmlCommunicateBLogicについて (2009-07-29 22:53 by Anonymous #45201)

受け取ったレスポンスヘッダをどのように利用されたいのかわかりませんが、例えば以下のサンプルコードのように拡張することで、レスポンスヘッダの値をEventControllerのItemsにSetすることができます。


== DataSetXmlCommunicateBLogicの拡張クラス ==

class DataSetXmlCommunicateBLogicEx<TResult> : DataSetXmlCommunicateBLogic<DataSet> where TResult : DataSet, new()
{
protected override void AfterCommunicate(CommunicationResult communicationResult, BLogicResult blogicResult)
{
base.AfterCommunicate(communicationResult, blogicResult);

blogicResult.Items["key"] = communicationResult.ResponseHeaders["key"];
}
}

== Formクラス ==

private void calcButton_Click(object sender, EventArgs e)
{
//非同期処理の実行
calcEvent.ExecuteAsync();
}

private void calcEvent_ExecuteCompleted(object sender, ExecuteCompletedEventArgs e)
{
//EventControllerのItemsプロパティにレスポンスヘッダが格納されている。
MessageBox.Show(calcEvent.Items["key"].ToString());
}
Reply to #45192

Reply to #45201×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: 【クライアント】DataSetXmlCommunicateBLogicについて (2009-07-30 08:53 by Anonymous #45207)

ありがとうございます。解決しました。
Reply to #45192

Reply to #45207×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login