JP6149416B2 - Service bus device, service bus device control method, message transmission / reception system, and program - Google Patents
Service bus device, service bus device control method, message transmission / reception system, and program Download PDFInfo
- Publication number
- JP6149416B2 JP6149416B2 JP2013022174A JP2013022174A JP6149416B2 JP 6149416 B2 JP6149416 B2 JP 6149416B2 JP 2013022174 A JP2013022174 A JP 2013022174A JP 2013022174 A JP2013022174 A JP 2013022174A JP 6149416 B2 JP6149416 B2 JP 6149416B2
- Authority
- JP
- Japan
- Prior art keywords
- message
- response
- type
- definition
- response message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Description
本発明は、サービスバス装置、サービスバス装置の制御方法、メッセージ送受信システム、及びプログラムに関する。 The present invention relates to a service bus device, a service bus device control method, a message transmission / reception system, and a program.
サービスバスを介した通信を行うサービス間で、メッセージ受信側サービスが応答を返却する機能を有していない場合がある。このような場合、一般的には、サービスバスのメッセージ交換パターンはIn-Onlyで構成される。In-Onlyとは、サービスバス上で要求メッセージに対してDoneかErrorが返却されるパターンである。Doneはサービスへのメッセージ送信完了を表す。Errorはメッセージ送信処理中に異常が発生したことを表す。 In some cases, the service on the message receiving side does not have a function for returning a response between services that communicate via the service bus. In such a case, generally, the message exchange pattern of the service bus is configured as In-Only. In-Only is a pattern in which Done or Error is returned for a request message on the service bus. Done indicates completion of message transmission to the service. Error indicates that an error occurred during message transmission processing.
なお、特許文献1には、メッセージ受信の肯定応答(受信確認)を自動送信するシステムが開示されている。
しかしながら、外部サービスの内容によっては、メッセージ送信に成功したか失敗したかの情報(Done/Error)の他に、送信メッセージのタイプに応じた適切な応答メッセージを必要とするものも存在する。上述したIn-Onlyで構成されたサービスバス装置においては、このような外部サービスがメッセージを送信しても、所望の応答メッセージを受信することができない。その結果、正常に通信を完了することが出来ない可能性がある。 However, depending on the contents of the external service, there are some that require an appropriate response message according to the type of transmission message, in addition to the information (Done / Error) indicating whether the message transmission has succeeded or failed. In the above-described service bus device configured with In-Only, even if such an external service transmits a message, a desired response message cannot be received. As a result, there is a possibility that communication cannot be completed normally.
本発明はこのような問題を解決するためになされたものであり、要求メッセージに対応する応答メッセージを返信できるサービスバス装置、サービスバス装置の制御方法、メッセージ送受信システム、及びプログラムを提供することを目的としている。 The present invention has been made to solve such a problem, and provides a service bus device, a service bus device control method, a message transmission / reception system, and a program capable of returning a response message corresponding to a request message. It is aimed.
本発明にかかるサービスバス装置は、要求メッセージを送信する送信側システムと、前記要求メッセージを受信する受信側システムと、を接続するサービスバス装置であって、 前記送信側システムから前記要求メッセージを受信する受信手段と、前記要求メッセージを解析するメッセージ解析手段と、解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するメッセージタイプ判定手段と、前記要求メッセージのメッセージタイプに応じた応答メッセージを作成する応答メッセージ作成手段と、前記応答メッセージを前記送信側システムに送信する送信手段と、を備えるものである。 The service bus device according to the present invention is a service bus device that connects a transmission-side system that transmits a request message and a reception-side system that receives the request message, and receives the request message from the transmission-side system. Receiving means, message analyzing means for analyzing the request message, message type determining means for determining a message type indicating the type of the request message based on the analysis result, and a response according to the message type of the request message Response message creating means for creating a message, and sending means for sending the response message to the sending side system.
本発明にかかるサービスバス装置の制御方法は、要求メッセージを送信する送信側システムと、前記要求メッセージを受信する受信側システムと、を接続するサービスバス装置の制御方法であって、前記送信側システムから前記要求メッセージを受信するステップと、前記要求メッセージを解析するステップと、解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するステップと、前記要求メッセージのメッセージタイプに応じた応答メッセージを作成するステップと、前記応答メッセージを前記送信側システムに送信するステップと、を備えるものである。 A service bus device control method according to the present invention is a service bus device control method for connecting a transmission side system that transmits a request message and a reception side system that receives the request message, the transmission side system comprising: Receiving the request message from, analyzing the request message, determining a message type indicating the type of the request message based on the analysis result, and a response according to the message type of the request message Creating a message; and sending the response message to the sending system.
本発明にかかるメッセージ送受信システムは、要求メッセージを送信する送信側システムと、前記要求メッセージを受信する受信側システムと、前記送信側システムと前記受信側システムとを接続するサービスバス装置と、を備えるメッセージ送受信システムであって、前記送信側システムから前記要求メッセージを受信する受信手段と、前記要求メッセージを解析するメッセージ解析手段と、解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するメッセージタイプ判定手段と、前記要求メッセージのメッセージタイプに応じた応答メッセージを作成する応答メッセージ作成手段と、前記応答メッセージを前記送信側システムに送信する送信手段と、を備えるものである。 A message transmission / reception system according to the present invention includes a transmission-side system that transmits a request message, a reception-side system that receives the request message, and a service bus device that connects the transmission-side system and the reception-side system. A message transmission / reception system, wherein a reception unit that receives the request message from the transmission side system, a message analysis unit that analyzes the request message, and a message type that indicates a type of the request message based on an analysis result Message type determination means, response message creation means for creating a response message according to the message type of the request message, and transmission means for sending the response message to the transmission side system.
本発明にかかるプログラムは、コンピュータに、送信側システムから前記要求メッセージを受信させるステップと、前記要求メッセージを解析させるステップと、解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定させるステップと、前記要求メッセージのメッセージタイプに応じた応答メッセージを作成させるステップと、前記応答メッセージを前記送信側システムに送信させるステップと、を実行させるものである。 A program according to the present invention causes a computer to receive the request message from a transmission-side system, to analyze the request message, and to determine a message type indicating the type of the request message based on an analysis result. A step of generating a response message according to a message type of the request message, and a step of transmitting the response message to the transmission side system.
本発明により、要求メッセージに対応する応答メッセージを返信できるサービスバス装置、サービスバス装置の制御方法、メッセージ送受信システム、及びプログラムを提供することができる。 According to the present invention, it is possible to provide a service bus device, a service bus device control method, a message transmission / reception system, and a program that can return a response message corresponding to a request message.
以下、図面を参照して本発明の実施の形態について説明する。本実施の形態にかかるメッセージ送受信システムの構成を図1に示す。メッセージ送受信システムは、送信側サービス120と、受信側サービス150と、サービスバス装置100と、を備える。サービスバス装置100は、送信側サービス120及び受信側サービス150に接続されている。送信側サービス120(送信側システム)は、要求メッセージをサービスバス装置100に送信する。サービスバス装置100は、送信側サービス120から受信した要求メッセージを受信側サービス150(受信側システム)に送信する。なお、送信側サービス120及び受信側サービス150は、例えば、クライアント端末、サーバ装置、ネットワーク上のアプリケーションソフトウェア(プログラム)等である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows the configuration of the message transmission / reception system according to the present embodiment. The message transmission / reception system includes a
サービスバス装置100は、自動応答作成部110と、メッセージ送受信部130、140と、を備える。メッセージ送受信部130は、送信側サービス120と接続されている。また、メッセージ送受信部130は、メッセージ送受信部140及び自動応答作成部110と接続されている。メッセージ送受信部140は、受信側サービス150と接続されている。
The
自動応答作成部110は、制御部111と、メッセージ構造解析部112と、メッセージタイプ判定部113と、応答メッセージ作成部114と、メッセージ定義保管部115と、を備える。以下、本発明の主要な部分である自動応答作成部110を中心に説明する。
The automatic
制御部111はメッセージ送受信部130から要求メッセージを受け取り、メッセージ送受信部130に応答メッセージを返却するまでの処理を制御する。制御部111は、例えばCPU(Central Processing Unit)を含む中央制御装置であり、図示しないメモリに格納された処理プログラムに基づいて、自動応答作成部110の各部の処理動作を制御する。
The
メッセージ構造解析部112は、制御部111からの命令に応じて、要求メッセージの構造を解析し、要求メッセージ内に含まれる各種データを読み取れる状態にする。なお、メッセージ構造の解析処理の詳細については後述する。
The message
メッセージタイプ判定部113は、制御部111からの命令に応じて、要求メッセージのメッセージタイプを判定する。なお、メッセージタイプとは、要求メッセージの種類を示す情報である。メッセージタイプは、送信側サービス120が要求する応答メッセージの種類に対応している。メッセージタイプ判定部113は、メッセージ構造解析部112の解析結果に基づいて、要求メッセージのメッセージタイプを判定する。
The message
応答メッセージ作成部114は、制御部111からの命令に応じて、要求メッセージのメッセージタイプに応じて応答メッセージを作成する。応答メッセージ作成部114は、メッセージタイプに基づき、メッセージ定義保管部115に格納された応答メッセージ定義を参照して、応答メッセージを作成する。
The response
メッセージ定義保管部115は、要求メッセージのメッセージタイプ(以下、要求メッセージタイプと称す場合もある)に対応付けて、応答メッセージのメッセージ定義(以下、応答メッセージ定義と称す場合もある)を記憶する。具体的には、メッセージ定義保管部115は、要求メッセージタイプと応答メッセージ定義とが対応付けられたリストを記憶する。メッセージ定義保管部115は、例えば、RAM(Random Access Memory)やROM(Read Only Memory)等のメモリである。なお、応答メッセージ定義とは、応答メッセージを作成するためのメッセージの雛形であり、予め要求メッセージタイプと対応付けて、メッセージ定義保管部115に格納されている。応答メッセージ作成部114は、応答メッセージを作成する際に、メッセージ定義保管部115から応答メッセージ定義を読み込む。
The message
続いて、本実施の形態にかかるメッセージ送受信システムの全体的な動作について、図2に示すフローチャートを参照して説明する。なお、前提として、メッセージ送受信部130及びメッセージ送受信部140は、共に外部との通信手段としてメッセージ送信手段とメッセージ受信手段を有する。一方、メッセージ送受信部140は、受信側サービス150からメッセージを受信することはない。言い換えると、受信側サービス150は、メッセージ送受信部140からの要求メッセージを受信する受信手段を有するが、メッセージ送受信部140へメッセージを送信する送信手段は有していない。また、メッセージ送受信部140と受信側サービス150との間の通信は一方向であり、メッセージ送受信部140から受信側サービス150への方向のみ要求メッセージが送信される。メッセージ送受信部140は、受信側サービス150へのメッセージ送信後、メッセージ送受信部130に対してDoneかErrorを返却する。Doneはサービスへのメッセージ送信完了を表す。Errorは送信処理中に異常が発生したことを表す。受信側サービス150は、要求メッセージを受信する機能を有し、送信側サービス120はメッセージ送受信部130に要求メッセージを送信後、メッセージ送受信部130からの返信(要求メッセージに対応した応答メッセージ)を待つ。
Next, the overall operation of the message transmission / reception system according to this exemplary embodiment will be described with reference to the flowchart shown in FIG. As a premise, both the message transmission /
まず、送信側サービス120は、メッセージ送受信部130へ要求メッセージを送信する(ステップS101)。メッセージ送受信部130は、要求メッセージを受信する(ステップS102)。
First, the
メッセージ送受信部130は、要求メッセージをメッセージ送受信部140へ送信する(ステップS103)。メッセージ送受信部140は、要求メッセージを受信すると、当該要求メッセージを受信側サービス150へ送信する(ステップS104)。メッセージ送受信部140は、要求メッセージの送信処理の終了後、メッセージ送受信部130に送信結果を送信する(ステップS105)。なお、送信結果とは、メッセージ送受信部140から受信側サービス150への要求メッセージの送信が正常に行われたか否かを示す情報である。つまり、メッセージ送受信部130には、Done(正常)もしくはError(異常)の送信結果情報が送信される。
The message transmission /
その後、メッセージ送受信部130は、自動応答作成部110へ要求メッセージ及び送信結果を送信する(ステップS106)。なお、このときに自動応答作成部110へ送信される要求メッセージは、ステップS102においてメッセージ送受信部130が送信側サービス120から受信した要求メッセージである。
Thereafter, the message transmitting / receiving
自動応答作成部110は、応答メッセージを作成してメッセージ送受信部130に応答メッセージを送信する(ステップS107)。メッセージ送受信部130は、応答メッセージを受信し、受信した応答メッセージを送信側サービス120に送信する(ステップS108)。以上の動作により、サービスバス装置100は、要求メッセージを送信した送信側サービス120に対して応答メッセージが返信する。
The automatic
次に、自動応答作成部110の応答メッセージの作成処理ついて、図3に示すフローチャートを参照して詳細に説明する。まず、制御部111は、メッセージ送受信部130から要求メッセージを受信する(ステップS201)。このとき、制御部111は、受信側サービス150へのメッセージ送信が成功したかどうかの情報(送信結果)も受信する。
Next, the response message creation processing of the automatic
メッセージ構造解析部112は、制御部111の命令に応じて、要求メッセージの構造を解析する(ステップS202)。具体的には、メッセージ構造解析部112は、要求メッセージ内に記載されている情報を要素ごとに取得できるように解析する。
The message
ここで、メッセージ構造解析部112のメッセージ解析処理について、図4〜図6を参照して説明する。メッセージ構造解析部112は、要求メッセージに含まれる要素名及び当該要素の値を取得する。そして、メッセージ構造解析部112は、図4に示すように、要素名と値とが対応付けられたリストを生成して、要求メッセージの情報を整理する。これにより、要求メッセージの構造が解析される。なお、図4に示す例においては、要素Aに代入されている値が値1であり、要素Bに代入されている値が値2であり、要素Cに代入されている値が値3であり、要素Dに代入されている値が値4であることを意味する。
Here, the message analysis processing of the message
一例として、送受信するメッセージがXMLである場合について説明する。制御部111が受信した要求メッセージが図5に示すようなXMLメッセージであるとする。具体的には、図5に示したメッセージは、要素名が"element1"という要素に、値"AAAA"が代入されているメッセージである。"element2"〜"element5"の要素についても同様に、値"BBBB"〜"EEEE"が代入されている。メッセージ構造解析部112は、XPath等を用いてXMLの探索を行い、XMLの特定要素の要素名とテキストノードの値とを取得する。なお、XPath等のメッセージ解析方法は、公知の技術であるため、詳細な説明は省略する。
As an example, a case where a message to be transmitted / received is XML will be described. Assume that the request message received by the
そして、メッセージ構造解析部112は、要素名と当該要素の値とを対応付けたリストを生成することによりXMLメッセージを解析する。具体的には、図6に示すように、メッセージ構造解析部112は、要素名"element"と、当該要素に代入されている値"AAAA"と、を対応付けたリストを生成する。なお、"element2"〜"element5"の要素についても同様である。
Then, the message
図3のフローチャートに戻り、制御部111は、要求メッセージの送信が成功したか否かを判定する(ステップS203)。具体的には、制御部111は、送信結果に基づいて、メッセージ送受信部140から受信側サービス150への要求メッセージの送信が成功したか否かを判定する。なお、制御部111がDoneを受信していれば、受信側サービス150へのメッセージ送信は成功している。制御部111がErrorを受信していれば、受信側サービス150へのメッセージ送信は失敗している。
Returning to the flowchart of FIG. 3, the
メッセージ送信が正常に完了した場合(ステップS203:Yes)、メッセージタイプ判定部113は、要求メッセージのメッセージタイプを判定する(ステップS204)。メッセージタイプ判定部113は、メッセージタイプ判定のためのアルゴリズムを保持しており、そのアルゴリズムによりメッセージタイプの判定を行う。
When the message transmission is normally completed (step S203: Yes), the message
例えば、メッセージタイプ判定部113は、図4に示した要素うち、要素Aがメッセージタイプを表す要素であるとして予め定義(記憶)しておく。そして、メッセージタイプ判定部113は、要素Aに対応する値1がメッセージタイプ名を示す情報であるとして、値1を取得する。なお、上記のメッセージタイプの判定方法は一例であり、他の方法を用いてメッセージタイプを判定してもよい。
For example, the message
次に、応答メッセージ作成部114は、要求メッセージタイプに基づいて、応答メッセージを作成する(ステップS205)。応答メッセージ作成部114は、作成した応答メッセージを制御部111に送信する。制御部111は、作成された応答メッセージをメッセージ送受信部130に送信する(ステップS207)。
Next, the response
一方、メッセージ送信に失敗した場合(ステップS203:No)、応答メッセージ作成部114は、要求メッセージタイプに拘わらず、エラーメッセージを応答メッセージとして作成する(ステップS206)。なお、エラーメッセージは、予め定義されている。具体的には、応答メッセージ作成部114は、エラーメッセージ用のメッセージ定義(応答メッセージの雛形)をメッセージ定義保管部115から取得し、発生した異常の内容を応答メッセージ内に値として書き込む。つまり、応答メッセージ作成部114は、送信結果及び要求メッセージタイプに基づいて、応答メッセージを作成する。その後、メッセージ送信が正常に完了した場合と同様に、応答メッセージ作成部114は、作成したエラーメッセージを応答メッセージとして制御部111に送信する。そして、制御部111がメッセージ送受信部130にエラーメッセージを送信する(ステップS207)。以上の動作により、自動応答作成部110は、要求メッセージに対応した応答メッセージをメッセージ送受信部130に送信する。
On the other hand, when message transmission has failed (step S203: No), the response
次に、応答メッセージ作成部114の応答メッセージ作成処理について図7のフローチャートを参照して説明する。まず、応答メッセージ作成部114は、要求メッセージタイプに対応する応答メッセージの定義をメッセージ定義保管部115から検索する(ステップS301)。
Next, the response message creation process of the response
図8に示すように、メッセージ定義保管部115には、要求メッセージタイプに対応付けられた応答メッセージ定義が予め格納されている。図8の例においては、制御部111がタイプAのメッセージタイプを持つ要求メッセージを受信したときに、応答メッセージ作成部114は応答メッセージの定義として定義1を使用することを意味している。なお、要求メッセージタイプB〜Dに関しても同様である。また、制御部111が受信した要求メッセージのメッセージタイプが予め設定された要求メッセージタイプのいずれにも該当しない場合、応答メッセージ作成部114は、"その他"のメッセージタイプに対応する"標準応答用定義"を使用する。標準応答用定義とは、特定の送信側サービス120に特化していない汎用メッセージ定義である。これにより、メッセージ定義保管部115に格納されていないメッセージタイプの要求メッセージを制御部111が受信した場合でも、応答メッセージ作成部114は、標準応答用定義を用いて応答メッセージを作成することができる。
As shown in FIG. 8, the message
応答メッセージ定義の一例として、XMLメッセージにおける応答メッセージ定義ついて説明する。図9は、XMLメッセージにおける応答メッセージ定義の一例である。図9に示すように、応答メッセージ定義は、メッセージの雛形として応答メッセージ作成部114に与えられる。
As an example of the response message definition, the response message definition in the XML message will be described. FIG. 9 is an example of a response message definition in the XML message. As shown in FIG. 9, the response message definition is given to the response
応答メッセージ作成部114は、制御部111が受信した要求メッセージのメッセージタイプに対応した応答メッセージ定義がメッセージ定義保管部115に登録されているか否かを判定する(ステップS302)。なお、当該判定処理は、メッセージ定義保管部115の要求メッセージタイプの中に、制御部111が受信した要求メッセージのメッセージタイプがあるか否かを検索することより行われる。
The response
要求メッセージタイプに対応する応答メッセージ定義が登録されている場合(ステップS302:Yes)、応答メッセージ作成部114は、対応する応答メッセージ定義を読み込む(ステップS303)。
When the response message definition corresponding to the request message type is registered (step S302: Yes), the response
一方、要求メッセージタイプに対応する応答メッセージ定義が登録されていない場合(ステップS302:No)、応答メッセージ作成部114は、標準応答用の応答メッセージ定義を読み込む(ステップS304)。なお、応答メッセージ定義は、送信側サービス120及びメッセージ送受信部130が送受信可能な形式のメッセージである。上記の通り、応答メッセージ作成部114は、応答メッセージ定義を応答メッセージの雛形として使用する。
On the other hand, when the response message definition corresponding to the request message type is not registered (step S302: No), the response
応答メッセージ作成部114は、応答メッセージ定義の読み込み後、必要なデータを応答メッセージ定義に値(要素値)として書き込み、応答メッセージを作成する(ステップS305)。
After reading the response message definition, the response
一例として、送受信するメッセージがXML形式である場合について説明する。あるメッセージタイプに対応付けられた応答メッセージ定義は、図9に示すようなXMLメッセージの雛形として応答メッセージ作成部114に与えられる。このとき、応答メッセージ作成部114は、必要に応じて"element7"や"element8"の要素のテキストノードに、日付や時刻など動的な値を書き込む。この書き込み処理により、応答メッセージの作成処理が行われる。また、"element6"の要素ように、応答メッセージ定義の中にあらかじめ固定値("FFF")を埋め込んでおくことも可能である。さらに、応答メッセージ作成部114は、エラーメッセージを作成する場合は、日付や時刻等に加えてエラー内容を挿入してもよい。
As an example, a case where a message to be transmitted / received is in XML format will be described. The response message definition associated with a certain message type is given to the response
あくまで一例であるが、簡単なXMLメッセージを用いた応答メッセージ作成手順を説明する。本例においては、メッセージ定義保管部115は、図10のような要求メッセージタイプと応答メッセージ定義とが対応付けられたリストを格納しているとする。
Although it is only an example to the last, the response message preparation procedure using a simple XML message is demonstrated. In this example, it is assumed that the message
ここで、制御部111が図11に示すような要求メッセージを受信したとする。図11に示す要求メッセージは、要求メッセージタイプを示す要素"massage type"に、値"REQ1"が書き込まれている。また、要求メッセージの送信時刻を示す要素"date"に、送信時刻(2012年11月20日16時31分04秒)を示す値"20121120163104"が書き込まれている。
Here, it is assumed that the
メッセージタイプ判定部113は、要求メッセージタイプを示す要素"massage type"の値"REQ1"を、制御部111が受信した要求メッセージのメッセージタイプと判定する。そして、応答メッセージ作成部114は、メッセージ定義保管部115のリストを参照し、要求メッセージタイプ"REQ1"に対応付けられた応答メッセージ定義を検索する。応答メッセージ作成部114は、検索の結果、要求メッセージタイプ"REQ1"に対応付けられた応答メッセージ定義"RES1"を取得する。なお、"REQ1"に対する応答メッセージ定義"RES1"の内容は、図12に示すような内容であるとする。つまり、要素"massage type"には、予め"RES1"という値が書き込まれており、応答メッセージの送信時刻を示す要素"date"には、値が書き込まれていない。
The message
応答メッセージ作成部114は、取得した応答メッセージ定義(雛形)において、空欄である要素"date"に、応答メッセージの送信時刻(または作成時刻)を書き込む。これにより、応答メッセージが作成される。図13に作成された応答メッセージの一例を示す。図13に示す応答メッセージは、図12に示した応答メッセージ定義の要素"date"に送信時刻が書き込まれている。具体的には、要素"date"に送信時刻(2012年11月20日16時32分21秒)を示す値"20121120163221"が書き込まれている。例えば、送信側サービス120が、要求メッセージの送信結果だけでなく、送信が完了した時刻等を要求するサービスの場合、サービスバス装置100が、要求メッセージに対して図13に示すような応答メッセージを返送する。これにより、送信側サービス120の通信が正常に完了する。
The response
(比較例)
比較例にかかるサービスバス装置900について図14を参照して説明する。比較例にかかるサービスバス装置900は、メッセージ送受信部930、940を備える。メッセージ送受信部930は、送信側サービス120から要求メッセージを受信すると、メッセージ送受信部940に当該要求メッセージを送信する。メッセージ送受信部940は、要求メッセージを受信側サービス150に送信する。また、メッセージ送受信部940は、要求メッセージが正常に送信完了したか否かを判定し、送信結果(Done/Error)をメッセージ送受信部930に送信する。メッセージ送受信部930は、受信した送信結果のみを送信側サービス120に返送する。このため、送信側サービス120は、送信結果の情報しか受け取ることができない。そのため、送信側サービス120が、送信結果以外の情報の返送を要求する場合に、通信が正常に完了しない恐れがある。
(Comparative example)
A
これに対して、本実施の形態にかかるサービスバス装置100は、要求メッセージに応じた内容の応答メッセージを、送信側サービス120に返信できる。これにより、送信側サービス120の通信が正常に完了する。
On the other hand, the
以上のように、本実施の形態にかかるサービスバス装置100の構成によれば、メッセージ構造解析部112が、要求メッセージを解析する。また、メッセージタイプ判定部113が、解析結果に基づいて、要求メッセージタイプを判定する。そして、応答メッセージ作成部114が、要求メッセージタイプに対応する応答メッセージを作成する。これにより、受信側サービス150がメッセージ返信機能を有さない場合であっても、当該受信側サービス150のサービスアプリケーションを変更・改造することなく、送信側サービス120に所望の応答メッセージを返信できる。
As described above, according to the configuration of the
なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、要求メッセージや応答メッセージの内容は、上述した実施の形態において示した内容にかぎられない。また、図1に示したメッセージ送受信システムにおいては、送信側サービス120が1つ、受信側サービス150が1つ、という構成であったが、これに限られるものではない。複数の送信側サービス120及び受信側サービス150が、サービスバス装置100と接続されていてもよい。
Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. For example, the contents of the request message and the response message are not limited to the contents shown in the above-described embodiment. Further, in the message transmission / reception system shown in FIG. 1, the configuration includes one
また、本発明にかかるサービスバス装置は、図15に示すように、少なくとも、要求メッセージを受信する受信部11と、応答メッセージを送信する送信部12と、要求メッセージを解析するメッセージ解析部13と、要求メッセージタイプを判定するメッセージタイプ判定部14と、メッセージタイプに応じた応答メッセージを作成する応答メッセージ作成部15と、を備えていればよい。これらの構成により、要求メッセージに対応する応答メッセージを、送信側サービス120に返信できるという効果を発揮できる。
As shown in FIG. 15, the service bus device according to the present invention includes at least a receiving
さらに、上述のサービスバス装置100の任意の処理は、CPU(Central Processing Unit)にコンピュータプログラムを実行させることにより実現することも可能である。この場合、コンピュータプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュメモリ、RAM(random access memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。
Furthermore, the arbitrary processing of the
また、コンピュータが上述の実施の形態の機能を実現するプログラムを実行することにより、上述の実施の形態の機能が実現される場合だけでなく、このプログラムが、コンピュータ上で稼動しているOS(Operating System)もしくはアプリケーションソフトウェアと共同して、上述の実施の形態の機能を実現する場合も、本発明の実施の形態に含まれる。さらに、このプログラムの処理の全てもしくは一部がコンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットによって行われて、上述の実施の形態の機能が実現される場合も、本発明の実施の形態に含まれる。 In addition to the case where the function of the above-described embodiment is realized by the computer executing the program that realizes the function of the above-described embodiment, this program is not limited to the OS ( A case where the functions of the above-described embodiment are realized in cooperation with an operating system or application software is also included in the embodiment of the present invention. Furthermore, the present invention is also applicable to the case where the functions of the above-described embodiment are realized by performing all or part of the processing of the program by a function expansion board inserted into the computer or a function expansion unit connected to the computer. It is included in the embodiment.
10、100 サービスバス装置
11 受信部
12 送信部
13 メッセージ解析部
14 メッセージタイプ判定部
15 応答メッセージ作成部
110 自動応答作成部
111 制御部
112 メッセージ構造解析部
113 メッセージタイプ判定部
114 応答メッセージ作成部
115 メッセージ定義保管部
120 送信側サービス
130 メッセージ送受信部
130、140 メッセージ送受信部
140 メッセージ送受信部
150 受信側サービス
DESCRIPTION OF SYMBOLS 10,100
Claims (6)
前記送信側システムから前記要求メッセージを受信する受信手段と、
前記要求メッセージを解析するメッセージ解析手段と、
解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するメッセージタイプ判定手段と、
前記要求メッセージのメッセージタイプに応じた応答メッセージを作成する応答メッセージ作成手段と、
前記応答メッセージを前記送信側システムに送信する送信手段と、
複数の前記応答メッセージのメッセージ定義を、複数のメッセージタイプに対応付けて記憶するメッセージ定義保管手段と、を備え、
前記応答メッセージ作成手段は、前記メッセージ定義保管手段を参照し、前記メッセージタイプ判定手段により判定されたメッセージタイプに対応する応答メッセージのメッセージ定義を用いて、前記応答メッセージを作成し、
前記メッセージ定義保管手段は、汎用メッセージ定義をさらに記憶しており、
前記応答メッセージ作成手段は、前記メッセージタイプ判定手段により判定された前記メッセージタイプが、前記メッセージ定義保管手段に記憶されていない場合、前記汎用メッセージ定義を用いて、前記応答メッセージを作成するサービスバス装置。 A service bus device that connects a transmitting system that transmits a request message and a receiving system that receives the request message,
Receiving means for receiving the request message from the sender system;
Message analysis means for analyzing the request message;
Message type determination means for determining a message type indicating the type of the request message based on the analysis result;
Response message creating means for creating a response message according to the message type of the request message;
Transmitting means for transmitting the response message to the transmitting system;
Message definition storage means for storing message definitions of the plurality of response messages in association with a plurality of message types, and
The response message creating means refers to the message definition storage means, creates the response message using the message definition of the response message corresponding to the message type determined by the message type determining means,
The message definition storage means further stores a general message definition,
The response message creating unit creates the response message using the general message definition when the message type determined by the message type determining unit is not stored in the message definition storage unit. .
前記応答メッセージ作成手段は、前記メッセージ定義に含まれる要素に、所定の値を書き込むことにより、前記応答メッセージを作成する請求項1に記載のサービスバス装置。 The message definition stored in the message definition storage means includes an element in which a value can be written,
The response message creation unit, the elements included in the message definition by writing a predetermined value, the service bus device according to claim 1 to create the response message.
前記送信側システムから前記要求メッセージを受信するステップと、
前記要求メッセージを解析するステップと、
解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するステップと、
前記要求メッセージのメッセージタイプに応じた応答メッセージを作成するステップと、
前記応答メッセージを前記送信側システムに送信するステップと、
を備え、
前記応答メッセージを作成するステップにおいては、保管されているメッセージ定義を参照し、前記メッセージタイプに対応する応答メッセージを作成し、
前記メッセージタイプが、保管されている前記メッセージ定義に含まれない場合、汎用メッセージ定義を用いて、前記応答メッセージを作成するサービスバス装置の制御方法。 A service bus device control method for connecting a transmitting side system for transmitting a request message and a receiving side system for receiving the request message,
Receiving the request message from the sender system;
Analyzing the request message;
Determining a message type indicating a type of the request message based on an analysis result;
Creating a response message according to the message type of the request message;
Sending the response message to the sending system;
Equipped with a,
The step of creating the response message refers to a stored message definition, creates a response message corresponding to the message type,
When the message type is not included in the stored message definition, a service bus device control method for creating the response message using a general message definition.
前記要求メッセージを受信する受信側システムと、
前記送信側システムと前記受信側システムとを接続するサービスバス装置と、を備えるメッセージ送受信システムであって、
前記送信側システムから前記要求メッセージを受信する受信手段と、
前記要求メッセージを解析するメッセージ解析手段と、
解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定するメッセージタイプ判定手段と、
前記要求メッセージのメッセージタイプに応じた応答メッセージを作成する応答メッセージ作成手段と、
前記応答メッセージを前記送信側システムに送信する送信手段と、
複数の前記応答メッセージのメッセージ定義を、複数のメッセージタイプに対応付けて記憶するメッセージ定義保管手段と、を備え、
前記応答メッセージ作成手段は、前記メッセージ定義保管手段を参照し、前記メッセージタイプ判定手段により判定されたメッセージタイプに対応する応答メッセージのメッセージ定義を用いて、前記応答メッセージを作成し、
前記メッセージ定義保管手段は、汎用メッセージ定義をさらに記憶しており、
前記応答メッセージ作成手段は、前記メッセージタイプ判定手段により判定された前記メッセージタイプが、前記メッセージ定義保管手段に記憶されていない場合、前記汎用メッセージ定義を用いて、前記応答メッセージを作成するメッセージ送受信システム。 A sending system that sends the request message;
A receiving system for receiving the request message;
A message transmission / reception system comprising: a service bus device connecting the transmission side system and the reception side system;
Receiving means for receiving the request message from the sender system;
Message analysis means for analyzing the request message;
Message type determination means for determining a message type indicating the type of the request message based on the analysis result;
Response message creating means for creating a response message according to the message type of the request message;
Transmitting means for transmitting the response message to the transmitting system;
Message definition storage means for storing message definitions of the plurality of response messages in association with a plurality of message types, and
The response message creating means refers to the message definition storage means, creates the response message using the message definition of the response message corresponding to the message type determined by the message type determining means,
The message definition storage means further stores a general message definition,
The response message creating means creates a response message using the general message definition when the message type determined by the message type determining means is not stored in the message definition storage means. .
送信側システムから要求メッセージを受信させるステップと、
前記要求メッセージを解析させるステップと、
解析結果に基づいて、前記要求メッセージの種類を示すメッセージタイプを判定させるステップと、
前記要求メッセージのメッセージタイプに応じた応答メッセージを作成させるステップと、
前記応答メッセージを前記送信側システムに送信させるステップと、
を実行させるプログラムであって、
前記応答メッセージを作成させるステップにおいては、保管させているメッセージ定義を参照させることにより、前記メッセージタイプに対応する応答メッセージを作成させ、
前記メッセージタイプが、保管させている前記メッセージ定義に含まれない場合、汎用メッセージ定義を用いて、前記応答メッセージを作成させる、プログラム。 On the computer,
Receiving a request message from the sending system;
Analyzing the request message;
Determining a message type indicating the type of the request message based on the analysis result; and
Creating a response message according to the message type of the request message;
Sending the response message to the sending system;
A program to be executed by the,
In the step of creating the response message, a response message corresponding to the message type is created by referring to the stored message definition.
If the message type is not included in the stored message definition, a program for generating the response message using a general message definition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013022174A JP6149416B2 (en) | 2013-02-07 | 2013-02-07 | Service bus device, service bus device control method, message transmission / reception system, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013022174A JP6149416B2 (en) | 2013-02-07 | 2013-02-07 | Service bus device, service bus device control method, message transmission / reception system, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014153858A JP2014153858A (en) | 2014-08-25 |
JP6149416B2 true JP6149416B2 (en) | 2017-06-21 |
Family
ID=51575688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013022174A Active JP6149416B2 (en) | 2013-02-07 | 2013-02-07 | Service bus device, service bus device control method, message transmission / reception system, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6149416B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10539966B2 (en) | 2016-09-28 | 2020-01-21 | Denso Corporation | Service cooperation system for vehicle |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3199950B2 (en) * | 1994-03-31 | 2001-08-20 | キヤノン株式会社 | Printer device, printer system, and control method therefor |
JPH1141279A (en) * | 1997-07-18 | 1999-02-12 | Kenwood Corp | Electronic mail method |
JP2002108772A (en) * | 2000-10-02 | 2002-04-12 | Ricoh Co Ltd | Communication terminal, control method therefor and recording medium recording its program |
JP2005197974A (en) * | 2004-01-06 | 2005-07-21 | Matsushita Electric Ind Co Ltd | Communication apparatus |
US7650432B2 (en) * | 2004-05-20 | 2010-01-19 | Bea Systems, Inc. | Occasionally-connected application server |
JP4611808B2 (en) * | 2005-06-03 | 2011-01-12 | 日本電信電話株式会社 | Reply information delivery method, reply information delivery device, and reply information delivery program |
-
2013
- 2013-02-07 JP JP2013022174A patent/JP6149416B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014153858A (en) | 2014-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108153849B (en) | Database table segmentation method, device, system and medium | |
CN106657314B (en) | Cross-data center data synchronization system and method | |
US10904316B2 (en) | Data processing method and apparatus in service-oriented architecture system, and the service-oriented architecture system | |
JP2017152026A (en) | Method and device for updating clients | |
CN111756674A (en) | Network communication method, system, device and computer readable storage medium | |
CN110569085A (en) | configuration file loading method and system | |
CN107844385B (en) | Variable read-write method and device based on shared memory | |
US10310851B2 (en) | Automated generation of service definitions for message queue application clients | |
CN110554930A (en) | Data storage method and related equipment | |
CN108092789B (en) | Method and device for managing network slice template | |
US9380001B2 (en) | Deploying and modifying a service-oriented architecture deployment environment model | |
CN111240892A (en) | Data backup method and device | |
CN112486915A (en) | Data storage method and device | |
US8719622B2 (en) | Recording and preventing crash in an appliance | |
CN110673935A (en) | Job scheduling method and device based on Kubernetes system and storage medium | |
CN114637611A (en) | Information processing method and device based on message queue and computer equipment | |
US9596131B2 (en) | Method for transiting operation mode of routing processor | |
JP6149416B2 (en) | Service bus device, service bus device control method, message transmission / reception system, and program | |
US20150309556A1 (en) | Power system monitoring and control system | |
CN112965745B (en) | System access method, device, equipment and computer readable medium | |
US20110191405A1 (en) | Automatic Client-Server Code Generator | |
CN111464395B (en) | Method and device for creating blockchain and readable storage medium | |
CN114422576A (en) | Session cleaning method and device, computer equipment and readable storage medium | |
CN115129728A (en) | File checking method and device | |
CN113867778A (en) | Method and device for generating mirror image file, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160113 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20161027 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161108 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161227 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170425 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170508 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6149416 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |