JP2004139566A - Communication equipment, communication system, method for controlling communication equipment, program and recording medium - Google Patents

Communication equipment, communication system, method for controlling communication equipment, program and recording medium Download PDF

Info

Publication number
JP2004139566A
JP2004139566A JP2003305514A JP2003305514A JP2004139566A JP 2004139566 A JP2004139566 A JP 2004139566A JP 2003305514 A JP2003305514 A JP 2003305514A JP 2003305514 A JP2003305514 A JP 2003305514A JP 2004139566 A JP2004139566 A JP 2004139566A
Authority
JP
Japan
Prior art keywords
response
operation request
communication partner
request
command
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.)
Pending
Application number
JP2003305514A
Other languages
Japanese (ja)
Inventor
Hiroyuki Matsushima
松島 弘幸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2003305514A priority Critical patent/JP2004139566A/en
Priority to EP03255846.2A priority patent/EP1418732B1/en
Priority to US10/665,745 priority patent/US7620700B2/en
Publication of JP2004139566A publication Critical patent/JP2004139566A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve the efficiency of communication when a plurality pieces of communication equipment transmit and receive an operation request and an operation response to the received operation request to/from each other. <P>SOLUTION: In an HTTP client 11, a transmission message collecting means 45 collects an operation request to be transmitted to an HTTP server and an operation response to an operation request from the HTTP server, and an HTTP request transmitting means 46 collectively transmits the operation request and the operation response to the HTTP server. In addition, an HTTP response receiving means 47 collectively receives an operation response to the operation request transmitted to the HTTP server and an operation request from the HTTP server, and a received message dividing means 48 divides and stores the operation response and the operation request. When the operation request is received from the HTTP server, a server command execution result generating means 44 executes an operation concerning the operation request to generate an operation response to the operation request as an execution result. <P>COPYRIGHT: (C)2004,JPO

Description

 この発明は、通信相手となる他の通信装置との間で動作要求及び動作応答の送受信を行う通信装置、このような通信装置を複数用いて構成した通信システム、このような通信装置の制御方法、コンピュータをこのような通信装置として機能させるためのプログラム、およびこのようなプログラムを記録したコンピュータ読み取り可能な記録媒体に関する。 The present invention relates to a communication device for transmitting and receiving an operation request and an operation response to and from another communication device as a communication partner, a communication system including a plurality of such communication devices, and a control method for such a communication device. The present invention relates to a program for causing a computer to function as such a communication device, and a computer-readable recording medium on which such a program is recorded.

 従来から、通信装置をネットワークを介して接続した通信システムにおいて、通信装置同士で互いにメッセージを交換させることにより、通信相手の装置に対して通知や要求を行わせることが行われている。そして、このようなシステムにおいて、ある装置から別の装置に動作要求としてコマンドを送信して動作を実行させ、送信相手から動作の実行結果を動作応答として返信させることも行われている。 2. Description of the Related Art Conventionally, in a communication system in which communication devices are connected via a network, messages have been exchanged between the communication devices to notify or notify a communication partner device. In such a system, a device transmits a command as an operation request to another device to execute an operation, and a transmission partner returns an operation execution result as an operation response.

 このような技術は、例えば特許文献1に開示されており、この文献には、リモートプロセッサがローカルプロセッサに対して実行されるべきコマンドを指示するメッセージを送信し、そのコマンドに対する応答を受信することが記載されている。
 また、この文献には、ローカルプロセッサがファイアウォールの内側に配置されている場合において、ローカルプロセッサからファイアウォールの外側のリモートプロセッサに通信要求を送信し、リモートプロセッサがこの通信要求に対する応答としてローカルプロセッサに対してコマンドを送信するようにすることにより、ファイアウォールの外側から内側に向けてコマンドを送信できるようにする技術も開示されている。
特開2001−273211号公報
Such a technique is disclosed in Patent Document 1, for example, in which a remote processor transmits a message indicating a command to be executed to a local processor, and receives a response to the command. Is described.
Further, in this document, when a local processor is arranged inside a firewall, a communication request is transmitted from the local processor to a remote processor outside the firewall, and the remote processor sends a communication request to the local processor as a response to the communication request. A technique has also been disclosed in which a command can be transmitted from the outside to the inside of the firewall by transmitting the command.
JP 2001-273221 A

 また、このような動作要求に関する技術は、通信装置に接続された装置の動作を遠隔制御するシステムにも適用することができる。特許文献2には、ブラインド及び照明を操作する機能を有する遠隔被操作装置に、ユーザからの操作を受け付ける機能を有する遠隔操作装置からコマンドを送信してブラインド及び照明を操作させる遠隔操作システムにこのような技術を適用した例が記載されている。ただし、この文献には、コマンドに対する応答を送信する点は示されていない。
特開2002−135858号公報
In addition, the technology related to such an operation request can be applied to a system that remotely controls the operation of a device connected to a communication device. Patent Literature 2 discloses a remote operation system that operates a blind and a lighting by transmitting a command from a remote operation device having a function of receiving an operation from a user to a remotely operated device having a function of operating a blind and a lighting. An example in which such a technique is applied is described. However, this document does not show that a response to a command is transmitted.
JP-A-2002-135858

 ところで、複数の通信装置間でメッセージを交換する場合において、コマンドを送信する通信装置は、1つとは限らない。複数の通信装置が互いに相手に対してコマンドを送信するようにすることも可能であり、この場合には、コマンドを受け付けた通信装置に、それぞれコマンドの送信元に対して実行結果を返させるようにすることが求められている。そして、このような動作を行う場合、ある通信装置から通信相手の装置に送信する情報としては、通信相手の装置に対するコマンドと、通信相手の装置から受信したコマンドについての実行結果とが考えられる。 By the way, when exchanging messages between a plurality of communication devices, the number of communication devices that transmit commands is not limited to one. It is also possible for a plurality of communication devices to transmit a command to each other, and in this case, the communication device that has received the command is caused to return an execution result to the transmission source of the command. It is required to be. When such an operation is performed, information transmitted from a certain communication device to a communication partner device may be a command for the communication partner device and an execution result of a command received from the communication partner device.

 従来は、これらのコマンドと実行結果とは別々に送信するようにしていた。しかし、このような方式では、コマンドの送信時と受信したコマンドに対する実行結果の送信時とに、それぞれ別々に通信のコネクションを確立する必要がある。従って、通信のオーバーヘッドが大きくなり、効率性の点で問題があった。
 現状では、ネットワークを介した通信をダイヤルアップ接続で行う環境もまだ多く残っており、このような環境においては上記の点が特に問題となる。このような環境では、コネクションの確立に数十秒単位の時間を要することもあり、またコネクションを確立する毎に料金を課金されるので、コネクションを確立する回数が増加するとコストアップにつながるためである。
 この発明は、このような問題を解決し、複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する場合において、通信の効率を上げることを目的とする。
Conventionally, these commands and the execution result have been transmitted separately. However, in such a method, it is necessary to separately establish a communication connection when transmitting a command and when transmitting an execution result for a received command. Therefore, communication overhead becomes large and there is a problem in efficiency.
At present, there are still many environments in which communication via a network is performed by a dial-up connection, and in such an environment, the above point is particularly problematic. In such an environment, it may take several tens of seconds to establish a connection, and a fee is charged each time a connection is established. is there.
An object of the present invention is to solve such a problem and to improve communication efficiency when a plurality of communication devices mutually transmit and receive an operation request and an operation response to a received operation request.

 上記の目的を達成するため、この発明の通信装置は、他の通信装置を通信相手として通信可能な通信装置において、上記通信相手に送信すべき動作要求と上記通信相手からの動作要求に対する動作応答とを一括して上記通信相手に送信する送信手段と、上記通信相手に送信した動作要求に対する動作応答と上記通信相手からの動作要求とを一括して上記通信相手から受信する受信手段と、上記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段とを設けたものである。
 このような通信装置において、上記動作要求を関数呼び出しとし、上記動作応答をその関数呼び出しによって呼び出された関数の実行結果とするとよい。
In order to achieve the above object, a communication device according to the present invention is a communication device capable of communicating with another communication device as a communication partner, wherein an operation request to be transmitted to the communication partner and an operation response to an operation request from the communication partner Transmitting means for collectively transmitting the operation request to the communication partner, and receiving means for receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner, Means for executing an operation related to an operation request from a communication partner and generating an operation response to the operation request as a result of the execution.
In such a communication device, the operation request may be a function call, and the operation response may be an execution result of a function called by the function call.

 また、この発明は、他の通信装置を通信相手として通信可能な通信装置において、上記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、上記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、上記通信相手に対する動作要求を生成して上記第2の記憶手段に記憶させる要求生成手段と、上記第1の記憶手段から上記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて上記第1の記憶手段に記憶させる応答生成手段と、上記通信相手からの動作要求に対する動作応答を上記第1の記憶手段から読み出すと共に、上記通信相手に対する動作要求を上記第2の記憶手段から読み出す収集手段と、上記通信相手に対して、上記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、上記通信相手から、その通信相手に送信した動作要求に対する動作応答とその通信相手からの動作要求とを一括して受信する受信手段と、その受信手段が受信した上記通信相手からの動作要求を上記第1の記憶手段に記憶させると共に、上記受信手段が受信した、上記通信相手に送信した動作要求に対する動作応答を、上記通信相手に送信した動作要求と関連付けて上記第2の記憶手段に記憶させる分配手段とを設けた通信装置も提供する。 Also, the present invention provides a communication device capable of communicating with another communication device as a communication partner, a first storage means for storing an operation request from the communication partner and an operation response to the operation request, Second storage means for storing an operation request and an operation response to the operation request, request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means, and first storage means And reads out the operation request from the communication partner, executes an operation related to the operation request, generates an operation response to the operation request as a result of the execution, and associates the operation response with the read operation request to associate the first operation request with the first operation request. A response generation unit to be stored in the storage unit, and an operation response to the operation request from the communication partner read out from the first storage unit; Collecting means for reading the corresponding operation request from the second storage means; transmitting means for collectively transmitting the operation response and the operation request read by the collecting means to the communication partner; Receiving means for collectively receiving an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner; and storing the operation request from the communication partner received by the receiving means in the first storage means And distribution means for storing, in the second storage means, an operation response to the operation request transmitted to the communication partner received by the reception means in association with the operation request transmitted to the communication partner. A communication device is also provided.

 このような通信装置において、上記送信手段が、上記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信するようにし、上記受信手段が、上記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信するようにするとよい。
 さらに、上記第1の記憶手段及び上記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、上記応答生成手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して上記第1の記憶手段に記憶させる手段とし、上記収集手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求に対する動作応答から順に上記第1の記憶手段から読み出し、上記通信相手に対する動作要求のうち上記優先順位の高い動作要求から順に上記第2の記憶手段から読み出す手段としてもよい。
In such a communication device, the transmitting means transmits an operation response and an operation request to be transmitted to the communication partner as a SOAP message, respectively, and the receiving means transmits the operation response and the operation request received from the communication partner. The operation request may be received as a SOAP message.
Further, means for assigning priorities to the operation requests stored in the first storage means and the second storage means is provided, and the response generation means is provided with a means for assigning a higher priority to the operation requests from the communication partner. Means for reading in order from the operation request, generating an operation response to the operation request, and storing the generated operation response in the first storage means, wherein the collection means responds to the operation request having the higher priority among the operation requests from the communication partner. Means may be read from the first storage means in order from the operation response, and read from the second storage means in order from the operation request with the highest priority among the operation requests to the communication partner.

 また、この発明は、他の通信装置を通信相手として通信可能な通信装置において、上記通信相手に送信すべきSOAPリクエストと上記通信相手からのSOAPリクエストに対するSOAPレスポンスとを1つのメッセージに記載して上記通信相手に送信する送信手段と、上記通信相手に送信したSOAPリクエストに対するSOAPレスポンスと上記通信相手からのSOAPリクエストとを1つのメッセージに記載した状態で上記通信相手から受信する受信手段と、上記通信相手からのSOAPリクエストによって要求された動作を実行し、そのSOAPリクエストに対するSOAPレスポンスに記載すべき実行結果を生成する手段とを設けた通信装置も提供する。
 このような通信装置において、上記SOAPリクエストに関数呼び出しを記載し、上記SOAPレスポンスにその関数呼び出しによって呼び出された関数の実行結果を記載するようにするとよい。
According to the present invention, in a communication device capable of communicating with another communication device as a communication partner, a SOAP request to be transmitted to the communication partner and a SOAP response to a SOAP request from the communication partner are described in one message. Transmitting means for transmitting to the communication partner, receiving means for receiving a SOAP response to the SOAP request transmitted to the communication partner and a SOAP request from the communication partner in a single message from the communication partner, There is also provided a communication apparatus provided with means for executing an operation requested by a SOAP request from a communication partner and generating an execution result to be described in a SOAP response to the SOAP request.
In such a communication device, a function call may be described in the SOAP request, and an execution result of the function called by the function call may be described in the SOAP response.

 さらにまた、この発明は、他の通信装置を通信相手として通信可能な通信装置において、上記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、上記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、上記通信相手に対する動作要求を生成して上記第2の記憶手段に記憶させる要求生成手段と、上記第1の記憶手段から上記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を上記通信相手からの動作要求と関連付けて上記第1の記憶手段に記憶させる応答生成手段と、上記通信相手からの動作要求に対する動作応答を上記第1の記憶手段から読み出すと共に、上記通信相手に対する動作要求を上記第2の記憶手段から読み出す収集手段と、上記通信相手に対して、上記収集手段が読み出した動作応答の内容を記載したSOAPレスポンスと上記収集手段が読み出した動作要求の内容を記載したSOAPリクエストとを1つのメッセージに記載して送信する送信手段と、上記通信相手から、その通信相手に送信した動作要求に対する動作応答の内容を記載したSOAPレスポンスとその通信相手からの動作要求の内容を記載したSOAPリクエストとを1つのメッセージに記載した状態で受信する受信手段と、その受信手段が受信したSOAPリクエストに記載された上記通信相手からの動作要求の内容を上記第1の記憶手段に記憶させると共に、上記受信手段が受信したSOAPレスポンスに記載された、上記通信相手に送信した動作要求に対する動作応答の内容を、上記通信相手に送信した動作要求と関連付けて上記第2の記憶手段に記憶させる分配手段とを設けた通信装置も提供する。 Furthermore, the present invention relates to a communication device capable of communicating with another communication device as a communication partner, wherein the first storage means for storing an operation request from the communication partner and an operation response to the operation request; Second storage means for storing an operation request for the communication request and an operation response to the operation request, request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means, and the first storage Means for reading an operation request from the communication partner, executing an operation related to the operation request, generating an operation response to the operation request as a result of the execution, and associating the operation response with the operation request from the communication partner. A response generation unit that stores the operation response to the operation request from the communication partner from the first storage unit; Collecting means for reading an operation request to the communication partner from the second storage means; a SOAP response describing the content of the operation response read by the collection means to the communication partner; and an operation request read by the collection means Means for transmitting a SOAP request describing the contents of the request in one message, and a SOAP response describing the contents of an operation response to the operation request transmitted to the communication partner from the communication partner, and Receiving means for receiving a SOAP request describing the contents of the operation request in a single message, and transmitting the contents of the operation request from the communication partner described in the SOAP request received by the receiving means to the first message. 1 and stored in the SOAP response received by the receiving unit. The, the contents of the operation response to the operation request transmitted to the communication partner, also provides a communication device provided with a dispensing means in association with the operation request sent to the communication partner to be stored in said second storage means.

 このような通信装置において、上記第1の記憶手段及び上記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、上記応答生成手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して上記第1の記憶手段に記憶させる手段とし、上記収集手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求に対する動作応答から順に上記第1の記憶手段から読み出し、上記通信相手に対する動作要求のうち上記優先順位の高い動作要求から順に上記第2の記憶手段から読み出す手段とするとよい。 In such a communication device, means for assigning priority to the operation requests stored in the first storage means and the second storage means is provided, and Means for reading out the operation requests in descending order of the priority, generating an operation response to the operation request, and storing the generated operation response in the first storage means; The operation request may be read from the first storage unit in order from the operation response to the operation request with the highest priority, and may be read from the second storage unit in order from the operation request with the highest priority among the operation requests to the communication partner.

 また、この発明の通信システムは、互いを通信相手として通信可能な複数の通信装置によって構成した通信システムにおいて、各通信装置に、上記通信相手に送信すべき動作要求と上記通信相手からの動作要求に対する動作応答とを一括して上記通信相手に送信する送信手段と、上記通信相手に送信した動作要求に対する動作応答と上記通信相手からの動作要求とを一括して上記通信相手から受信する受信手段と、上記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段とを設けたものである。
 このような通信システムにおいて、上記動作要求を関数呼び出しとし、上記動作応答をその関数呼び出しによって呼び出された関数の実行結果とするとよい。
Also, in a communication system according to the present invention, in a communication system constituted by a plurality of communication devices capable of communicating with each other as communication partners, an operation request to be transmitted to the communication partner and an operation request from the communication partner may be given to each communication device. Transmitting means for collectively transmitting an operation response to the communication partner to the communication partner, and receiving means for collectively receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner. And means for executing an operation related to the operation request from the communication partner and generating an operation response to the operation request as an execution result.
In such a communication system, the operation request may be a function call, and the operation response may be an execution result of a function called by the function call.

 また、この発明は、互いを通信相手として通信可能な複数の通信装置によって構成した通信システムにおいて、各通信装置に、上記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、上記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、上記通信相手に対する動作要求を生成して上記第2の記憶手段に記憶させる要求生成手段と、上記第1の記憶手段から上記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて上記第1の記憶手段に記憶させる応答生成手段と、上記通信相手からの動作要求に対する動作応答を上記第1の記憶手段から読み出すと共に、上記通信相手に対する動作要求を上記第2の記憶手段から読み出す収集手段と、上記通信相手に対して、上記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、上記通信相手から、その通信相手に送信した動作要求に対する動作応答とその通信相手からの動作要求とを一括して受信する受信手段と、その受信手段が受信した上記通信相手からの動作要求を上記第1の記憶手段に記憶させると共に、上記受信手段が受信した、上記通信相手に送信した動作要求に対する動作応答を、上記通信相手に送信した動作要求と関連付けて上記第2の記憶手段に記憶させる分配手段とを設けた通信システムも提供する。 According to the present invention, in a communication system constituted by a plurality of communication devices capable of communicating with each other as a communication partner, a first operation in which an operation request from the communication partner and an operation response to the operation request are stored in each communication device. Storage means for storing an operation request to the communication partner and an operation response to the operation request, and request generation for generating an operation request to the communication partner and storing the operation request in the second storage unit Means for reading an operation request from the communication partner from the first storage means, executing an operation relating to the operation request, generating an operation response to the operation request as a result of the execution, and reading the operation response. A response generating means for storing in the first storage means in association with the operation request; and an operation response to the operation request from the communication partner in the first storage means. Collecting means for reading the operation request for the communication partner from the second storage means while reading from the storage means, and collectively transmitting the operation response and the operation request read by the collection means to the communication party. Transmitting means, receiving means for collectively receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner, and receiving from the communication partner received by the receiving means An operation request is stored in the first storage unit, and an operation response to the operation request transmitted to the communication partner received by the receiving unit is associated with the operation request transmitted to the communication partner in the second storage. There is also provided a communication system provided with distribution means for storing in the means.

 このような通信システムにおいて、上記送信手段が、上記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信するようにし、上記受信手段が、上記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信するようにするとよい。
 さらに、上記各通信装置に、上記第1の記憶手段及び上記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、上記各通信装置の応答生成手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して上記第1の記憶手段に記憶させる手段とし、上記各通信装置の収集手段を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求に対する動作応答から順に上記第1の記憶手段から読み出し、上記通信相手に対する動作要求のうち上記優先順位の高い動作要求から順に上記第2の記憶手段から読み出す手段とするとよい。
In such a communication system, the transmitting unit transmits an operation response and an operation request to be transmitted to the communication partner as a SOAP message, and the receiving unit transmits the operation response and the operation request received from the communication partner. The operation request may be received as a SOAP message.
Further, each of the communication devices is provided with a means for assigning a priority to the operation request stored in the first storage means and the second storage means, and the response generation means of each of the communication devices is transmitted from the communication partner. Among the operation requests, the operation requests are read in order from the operation request having the highest priority, and an operation response to the operation request is generated and stored in the first storage means. From the first storage means in order from the operation response to the operation request having the higher priority among the operation requests from the second storage means, and sequentially read out the operation request from the operation request having the higher priority in the operation request to the communication partner. It is preferable to use a means for reading out from the.

 また、この発明の通信装置の制御方法は、他の通信装置を通信相手として通信可能な通信装置の制御方法において、上記通信相手に送信すべき動作要求と上記通信相手からの動作要求に対する動作応答とを一括して上記通信相手に送信する送信手順と、上記通信相手に送信した動作要求に対する動作応答と上記通信相手からの動作要求とを一括して上記通信相手から受信する受信手順と、上記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手順とを上記通信装置に実行させるようにしたものである。
 このような通信装置の制御方法において、上記動作要求を関数呼び出しとし、上記動作応答をその関数呼び出しによって呼び出された関数の実行結果とするとよい。
Also, the control method of a communication device according to the present invention is a control method of a communication device capable of communicating with another communication device as a communication partner. A transmission procedure of transmitting the operation request from the communication partner and an operation response to the operation request transmitted to the communication partner collectively from the communication partner; A step of executing an operation related to an operation request from a communication partner and generating an operation response to the operation request as an execution result.
In such a communication device control method, the operation request may be a function call, and the operation response may be an execution result of a function called by the function call.

 また、この発明は、他の通信装置を通信相手として通信可能な通信装置の制御方法において、上記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶領域を設ける手順と、上記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶領域を設ける手順と、上記通信相手に対する動作要求を生成して上記第2の記憶領域に記憶させる要求生成手順と、上記第1の記憶領域から上記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて上記第1の記憶領域に記憶させる応答生成手順と、上記通信相手からの動作要求に対する動作応答を上記第1の記憶領域から読み出すと共に、上記通信相手に対する動作要求を上記第2の記憶領域から読み出す収集手順と、上記通信相手に対して、上記収集手順で読み出した動作応答と動作要求とを一括して送信する送信手順と、上記通信相手から、その通信相手に送信した動作要求に対する動作応答とその通信相手からの動作要求とを一括して受信する受信手順と、その受信手順で受信した上記通信相手からの動作要求を上記第1の記憶領域に記憶させると共に、上記受信手順で受信した、上記通信相手に送信した動作要求に対する動作応答を、上記通信相手に送信した動作要求と関連付けて上記第2の記憶領域に記憶させる分配手順とを上記通信装置に実行させるようにした通信装置の制御方法も提供する。 According to the present invention, in a control method of a communication device capable of communicating with another communication device as a communication partner, a procedure for providing a first storage area for storing an operation request from the communication partner and an operation response to the operation request. Providing a second storage area for storing an operation request to the communication partner and an operation response to the operation request; and generating a request for generating an operation request to the communication partner and storing the operation request in the second storage area. A procedure and an operation request from the communication partner are read from the first storage area, an operation related to the operation request is executed, an operation response to the operation request is generated as an execution result, and the operation response is read. A response generation procedure for storing the response in the first storage area in association with the operation request; and an operation response to the operation request from the communication partner in the first storage area. And a transmission procedure for collectively transmitting the operation request and the operation request read out in the collection procedure to the communication partner while reading the operation request to the communication partner from the second storage area. A receiving procedure for collectively receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner; and an operation request from the communication partner received in the receiving procedure. Is stored in the first storage area, and an operation response to the operation request transmitted to the communication partner received in the reception procedure is associated with the operation request transmitted to the communication partner in the second storage area. Also provided is a communication device control method that causes the communication device to execute a distribution procedure to be stored.

 このような通信装置の制御方法において、上記送信手順において、上記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信させるようにし、上記受信手段において、上記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信させるようにするとよい。
 さらに、上記第1の記憶領域及び上記第2の記憶領域に記憶させた動作要求に優先順位を付す手順を上記通信装置に実行させ、上記応答生成手順に、上記通信相手からの動作要求のうち上記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して上記第1の記憶領域に記憶させるようにし、上記収集手順に、上記通信相手からの動作要求のうち上記優先順位の高い動作要求に対する動作応答から順に上記第1の記憶領域から読み出し、上記通信相手に対する動作要求のうち上記優先順位の高い動作要求から順に上記第2の記憶領域から読み出させるようにするとよい。
In such a control method of the communication device, in the transmission procedure, the operation response and the operation request to be transmitted to the communication partner are transmitted as SOAP messages, and the receiving unit receives the operation response and the operation request from the communication partner. The operation response and the operation request may be respectively received as SOAP messages.
Further, the communication device is caused to execute a procedure for assigning a priority to the operation request stored in the first storage area and the second storage area, and the response generation procedure includes: The operation requests having the highest priority are read out in order, and an operation response to the operation request is generated and stored in the first storage area. It is preferable to read out from the first storage area in order from the operation response to the operation request with the highest priority, and read out from the second storage area in order from the operation request with the highest priority among the operation requests to the communication partner.

 また、この発明のプログラムは、コンピュータを、他の通信装置を通信相手として通信可能な通信装置として機能させるためのプログラムであって、上記コンピュータを、上記通信相手に送信すべき動作要求と上記通信相手からの動作要求に対する動作応答とを一括して上記通信相手に送信する送信手段と、上記通信相手に送信した動作要求に対する動作応答と上記通信相手からの動作要求とを一括して上記通信相手から受信する受信手段と、上記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段として機能させるためのプログラムである。
 このようなプログラムにおいて、上記動作要求を関数呼び出しとし、上記動作応答をその関数呼び出しによって呼び出された関数の実行結果とするとよい。
Further, the program of the present invention is a program for causing a computer to function as a communication device capable of communicating with another communication device as a communication partner. Transmitting means for transmitting an operation response to the operation request from the other party to the communication partner at a time, and an operation response to the operation request transmitted to the communication partner and the operation request from the communication partner at the And a program for executing an operation related to an operation request from the communication partner and generating an operation response to the operation request as an execution result.
In such a program, the operation request may be a function call, and the operation response may be an execution result of a function called by the function call.

 また、この発明は、コンピュータを、他の通信装置を通信相手として通信可能な通信装置として機能させるためのプログラムであって、上記コンピュータを、上記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、上記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、上記通信相手に対する動作要求を生成して上記第2の記憶手段に記憶させる要求生成手段と、上記第1の記憶手段から上記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて上記第1の記憶手段に記憶させる応答生成手段と、上記通信相手からの動作要求に対する動作応答を上記第1の記憶手段から読み出すと共に、上記通信相手に対する動作要求を上記第2の記憶手段から読み出す収集手段と、上記通信相手に対して、上記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、上記通信相手から、その通信相手に送信した動作要求に対する動作応答とその通信相手からの動作要求とを一括して受信する受信手段と、その受信手段が受信した上記通信相手からの動作要求を上記第1の記憶手段に記憶させると共に、上記受信手段が受信した、上記通信相手に送信した動作要求に対する動作応答を、上記通信相手に送信した動作要求と関連付けて上記第2の記憶手段に記憶させる分配手段として機能させるためのプログラムも提供する。 In addition, the present invention is a program for causing a computer to function as a communication device capable of communicating with another communication device as a communication partner, the computer comprising: an operation request from the communication partner; and an operation response to the operation request. , A second storage means for storing an operation request to the communication partner and an operation response to the operation request, and an operation request to the communication partner for generating the second request. Request generation means for storing the operation request from the communication partner from the first storage means, perform an operation related to the operation request, generate an operation response to the operation request as a result of the execution, Response generating means for storing the operation response in the first storage means in association with the read operation request, and an operation request from the communication partner Collecting means for reading an operation response to the communication partner from the first storage means and reading an operation request for the communication partner from the second storage means; and an operation response and an operation read by the collection means to the communication partner. Transmitting means for collectively transmitting a request to the communication partner, receiving means for receiving an operation response to the operation request transmitted to the communication partner, and receiving the operation request from the communication partner. Storing the operation request received from the communication partner in the first storage means, and transmitting an operation response to the operation request transmitted to the communication partner received by the receiving means to the communication partner. Also, a program for functioning as distribution means stored in the second storage means in association with the program is provided.

 このようなプログラムにおいて、上記送信手段の機能を、上記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信する機能とし、上記受信手段の機能を、上記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信する機能とするとよい。
 このようなプログラムに、上記コンピュータを、上記第1の記憶手段及び上記第2の記憶手段に記憶させた動作要求に優先順位を付す手段として機能させるためのプログラムをさらに含め、上記応答生成手段の機能を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して上記第1の記憶手段に記憶させる機能とし、上記収集手段の機能を、上記通信相手からの動作要求のうち上記優先順位の高い動作要求に対する動作応答から順に上記第1の記憶手段から読み出し、上記通信相手に対する動作要求のうち上記優先順位の高い動作要求から順に上記第2の記憶手段から読み出す機能とするとよい。
In such a program, the function of the transmitting means is a function of transmitting, as a SOAP message, an operation response and an operation request to be transmitted to the communication partner, and the function of the receiving means is received from the communication partner. The function may be a function of receiving an operation response and an operation request as SOAP messages.
Such a program further includes a program for causing the computer to function as means for assigning priorities to the operation requests stored in the first storage means and the second storage means. A function for reading out the function in order from the operation request having the highest priority among the operation requests from the communication partner, generating an operation response to the operation request, and storing the operation response in the first storage unit; Are read from the first storage means in order from the operation response to the operation request with the higher priority among the operation requests from the communication partner, and the operation requests with the higher priority are sequentially read out from the operation requests to the communication partner. The function may be a function of reading from the second storage means.

 また、この発明の記録媒体は、これらの何れかのプログラムを記録したコンピュータ読み取り可能な記録媒体である。 The recording medium of the present invention is a computer-readable recording medium that records any of these programs.

 以上のようなこの発明の通信装置、通信システム、および通信装置の制御方法によれば、複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する通信システムを構成する場合において、通信の効率を上げることができる。また、この発明のプログラムによれば、コンピュータを上記の通信装置として機能させてその特徴を実現し、同様な効果を得ることができる。この発明の記録媒体によれば、上記のプログラムを記憶していないコンピュータにそのプログラムを読み出させて実行させ、上記の効果を得ることができる。 According to the communication device, the communication system, and the communication device control method of the present invention as described above, when a communication system is configured in which a plurality of communication devices mutually transmit and receive an operation request and an operation response to a received operation request, Communication efficiency can be improved. Further, according to the program of the present invention, the features can be realized by causing a computer to function as the communication device described above, and a similar effect can be obtained. According to the recording medium of the present invention, the above effects can be obtained by causing a computer that does not store the above programs to read and execute the programs.

 以下、この発明を実施するための最良の形態について、図面を参照して説明する。
 まず図1に、この発明の通信装置を用いて構成したこの発明の通信システムの構成例を示す。
 この通信システムは、図1に示すように、それぞれこの発明の通信装置である第1の通信装置1と第2の通信装置2とをネットワーク10によって接続して構成している。
 そして、第1の通信装置1及び第2の通信装置2は、通信機能を備えたPC等のコンピュータを始め、通信機能及び情報処理機能を備えた各種電子装置として構成することができる。ネットワーク10としては、インターネットやLAN(ローカルエリアネットワーク)を始め、有線、無線を問わず、ネットワーク通信が可能な各種通信経路を用いることができる。
Hereinafter, the best mode for carrying out the present invention will be described with reference to the drawings.
First, FIG. 1 shows a configuration example of a communication system of the present invention configured using the communication device of the present invention.
As shown in FIG. 1, this communication system is configured by connecting a first communication device 1 and a second communication device 2 which are communication devices of the present invention by a network 10.
The first communication device 1 and the second communication device 2 can be configured as various electronic devices having a communication function and an information processing function, including a computer such as a PC having a communication function. As the network 10, various communication paths capable of network communication can be used regardless of wired or wireless, including the Internet and a LAN (local area network).

 また、第1の通信装置1及び第2の通信装置2は、互いの制御管理を行うためのアプリケーションプログラムを実装している。そして、これらの各ノードは、RPC(Remote Procedure Call)により、互いの実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。即ち、第1の通信装置1は、第2の通信装置2への要求(以下、第1の通信装置側要求という)を生成してこれを第2の通信装置2へ引き渡し、この要求に対する応答を取得できる一方で、第2の通信装置2は、第1の通信装置1への要求(以下、第2の通信装置側要求という)を生成してこれを第1の通信装置1へ引き渡し、この要求に対する応答を取得できるようになっている。
 なお、ここではメソッドを入力と出力の形式を規定した論理的な関数として定義するものとする。そしてこの場合、動作要求はこの関数を呼び出す関数呼び出し(Procedure Call)となり、動作応答はその関数呼び出しによって呼び出された関数の実行結果となる。
In addition, the first communication device 1 and the second communication device 2 are equipped with application programs for performing mutual control and management. Each of these nodes transmits an “operation request”, which is a request for processing to a method of an application program to be mounted, by RPC (Remote Procedure Call), and an “operation response” that is a result of the requested processing. "Can be obtained. That is, the first communication device 1 generates a request for the second communication device 2 (hereinafter, referred to as a first communication device side request), transfers the request to the second communication device 2, and responds to the request. On the other hand, the second communication device 2 generates a request to the first communication device 1 (hereinafter, referred to as a second communication device-side request) and delivers the request to the first communication device 1, A response to this request can be obtained.
Here, it is assumed that the method is defined as a logical function that defines input and output formats. In this case, the operation request is a function call (Procedure Call) for calling this function, and the operation response is an execution result of the function called by the function call.

 図2に、これらの動作要求と動作応答の関係を示す。
 図2(A)は、第1の通信装置1で第2の通信装置2に対する動作要求が発生したケースである。このケースでは、第1の通信装置1が第1の通信装置側動作要求を生成して第2の通信装置2に送信し、これを受け取った第2の通信装置2がその要求に対する動作応答を返すというモデルになる。
FIG. 2 shows the relationship between these operation requests and operation responses.
FIG. 2A shows a case where an operation request for the second communication device 2 is generated in the first communication device 1. In this case, the first communication device 1 generates a first communication device-side operation request and transmits it to the second communication device 2, and the second communication device 2 that has received this generates an operation response to the request. It becomes a model of returning.

 図2(B)は、第2の通信装置2で第1の通信装置1に対する動作要求が発生したケースである。このケースでは、第2の通信装置2が第2の通信装置側要求を生成して第1の通信装置1に送信し、これを受け取った第1の通信装置1がその要求に対する動作応答を返すというモデルになる。
 なお、ここではRPCによる引数並びに戻り値の受け渡しのプロトコルとしてSOAP(Simple Object Access Protocol)を採用し、上記の動作要求や動作応答は、ここではSOAPメッセージとして記載するようにしている。
FIG. 2B shows a case in which an operation request for the first communication device 1 is generated in the second communication device 2. In this case, the second communication device 2 generates a second communication device-side request and transmits it to the first communication device 1, and the first communication device 1 that has received the request returns an operation response to the request. Model.
Here, SOAP (Simple Object Access Protocol) is adopted as a protocol for transferring arguments and return values by RPC, and the above operation request and operation response are described here as SOAP messages.

 この発明の特徴は、このように複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する場合において、通信相手の装置に送信すべき動作要求とその通信相手の装置から受信した動作要求に対する動作応答とを一括して送信するようにする点である。
 そして、実際に動作要求や動作応答を転送するための通信プロトコルとしては、システムの構成に合わせて適当なものを採用することができ、例えばHTTP(HyperText Transfer Protocol)やSMTP(Simple Mail Transfer Protocol)を採用することができる。
 そこで、まず通信プロトコルにHTTPを採用する場合の実施例について説明し、次にSMTPを採用する場合の実施例について説明する。
The feature of the present invention is that, when a plurality of communication devices transmit and receive an operation request and an operation response to the received operation request to each other, an operation request to be transmitted to a communication partner device and an operation request to be transmitted from the communication partner device are received. The point is that the operation response to the operation request is transmitted collectively.
As a communication protocol for actually transferring an operation request or an operation response, an appropriate protocol can be adopted according to the system configuration. For example, HTTP (HyperText Transfer Protocol) or SMTP (Simple Mail Transfer Protocol) Can be adopted.
Therefore, an embodiment in which HTTP is used as a communication protocol will be described first, and then, an embodiment in which SMTP will be used will be described.

〔HTTPを採用する場合の実施例:図3乃至図21〕
 図3に、HTTPを採用する場合の実施例を適用する通信システムの構成例を示す。
 この通信システムは、図3に示すように、HTTPサーバ12とHTTPクライアント11とをインターネット13によって接続して構成している。ただし、セキュリティを向上させるため、HTTPクライアント11はファイアウォール14を介してインターネット13に接続するようにしている。そして、HTTPサーバ12が通信サーバであって第1の通信装置に該当し、HTTPクライアント11が通信クライアントであって第2の通信装置に該当する。
[Example in which HTTP is adopted: FIGS. 3 to 21]
FIG. 3 shows a configuration example of a communication system to which the embodiment adopting HTTP is applied.
This communication system is configured by connecting an HTTP server 12 and an HTTP client 11 via the Internet 13, as shown in FIG. However, in order to improve security, the HTTP client 11 connects to the Internet 13 via the firewall 14. The HTTP server 12 is a communication server and corresponds to a first communication device, and the HTTP client 11 is a communication client and corresponds to a second communication device.

 なお、HTTPを用いて通信を行う場合、ファイアウォール14の内側にあるノードに対しては、ファイアウォール14の外側からは自由にアクセスできず、そのノードからの通信要求(HTTPリクエスト)に対する通信応答(HTTPレスポンス)という形でしかデータを送信できない。そこで、この通信システムにおいては、ファイアウォール14の内側にあるノードをHTTPクライアント11、外側にあるノードをHTTPサーバ12としているのである。従って、これらの各ノードの機能は、これら相互間の通信以外においては、クライアントあるいはサーバに限定する必要はない。 When communication is performed using HTTP, a node inside the firewall 14 cannot be freely accessed from outside the firewall 14, and a communication response (HTTP request) to a communication request (HTTP request) from the node is not possible. Response). Therefore, in this communication system, the node inside the firewall 14 is the HTTP client 11, and the node outside the firewall 14 is the HTTP server 12. Therefore, the function of each of these nodes does not need to be limited to the client or server except for the communication between them.

 また、HTTPサーバ12及びHTTPクライアント11は、図1に示した第1の通信装置1及び第2の通信装置2の場合と同様に、互いの制御管理を行うためのアプリケーションプログラムを実装している。そして、RPC(Remote Procedure Call)により、互いの実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。 Also, the HTTP server 12 and the HTTP client 11 have installed application programs for performing mutual control and management, similarly to the case of the first communication device 1 and the second communication device 2 shown in FIG. . Then, by RPC (Remote Procedure Call), an “operation request”, which is a request for processing to a method of an application program to be mounted on each other, is transmitted, and an “operation response” as a result of the requested processing is obtained. I can do it.

 図4に、これらの動作要求と動作応答の関係を示す。
 図4(A)は、HTTPクライアント11でHTTPサーバ12に対する動作要求が発生したケースである。このケースでは、HTTPクライアント11がクライアント側動作要求(クライアント要求に該当する。以下、「クライアントコマンド」とも呼ぶ)を生成してHTTPサーバ12に送信し、これを受け取ったHTTPサーバ12がそのコマンドに対する動作応答(以下、「コマンド応答」あるいは単に「応答」とも呼ぶ)を返すというモデルになる。
FIG. 4 shows the relationship between these operation requests and operation responses.
FIG. 4A shows a case where the HTTP client 11 has issued an operation request to the HTTP server 12. In this case, the HTTP client 11 generates a client-side operation request (corresponding to a client request; hereinafter, also referred to as a “client command”), transmits the generated request to the HTTP server 12, and the HTTP server 12 that has received this generates a request for the command. This is a model that returns an operation response (hereinafter, also referred to as “command response” or simply “response”).

 図4(B)は、HTTPサーバ12でHTTPクライアント11に対する動作要求が発生したケースである。このケースでは、HTTPサーバ12がサーバ側動作要求(サーバ要求に該当する。以下、「サーバコマンド」とも呼ぶ)を生成してHTTPクライアント11に送信し、これを受け取ったHTTPクライアント11がそのコマンドに対する動作応答を返すというモデルになる。
 このように、動作要求及び動作応答は、RPCのレベルではHTTPクライアント11とHTTPサーバ12との間で対称に取り扱われるものである。しかし、通信のレベルでは対称ではない。
FIG. 4B shows a case where an operation request to the HTTP client 11 is generated in the HTTP server 12. In this case, the HTTP server 12 generates a server-side operation request (corresponding to a server request; hereinafter, also referred to as a “server command”) and transmits it to the HTTP client 11. The model returns an operation response.
As described above, the operation request and the operation response are handled symmetrically between the HTTP client 11 and the HTTP server 12 at the RPC level. However, it is not symmetric at the level of communication.

 図5にこの通信システムにおける通信シーケンスの例を示す。
 この図に示すように、この通信システムにおいては、通信は常に、HTTPクライアント11から通信要求としてHTTPリクエストをHTTPサーバ12に送信し、HTTPサーバ12からこの通信要求に対する通信応答としてHTTPレスポンスをHTTPクライアント11に返すという手順で行われる。例えばHTTPクライアント11が送信したHTTPリクエストXに対してHTTPサーバ12がHTTPレスポンスXを返し、同じくHTTPリクエストYに対してHTTPレスポンスYを返すという具合である。
FIG. 5 shows an example of a communication sequence in this communication system.
As shown in this figure, in this communication system, communication always transmits an HTTP request as a communication request from the HTTP client 11 to the HTTP server 12, and transmits an HTTP response from the HTTP server 12 as a communication response to the communication request. 11 is performed. For example, the HTTP server 12 returns an HTTP response X to the HTTP request X transmitted by the HTTP client 11, and also returns an HTTP response Y to the HTTP request Y.

 そして、HTTPリクエストには、HTTPクライアント11からHTTPサーバ12に送信する動作要求であるクライアントコマンドと、HTTPサーバ12からHTTPクライアント11に送信されてきたサーバコマンドに対する応答(コマンド応答)とを記載して送信するようにしている。また、HTTPレスポンスには、HTTPサーバ12からHTTPクライアント11に送信する動作要求であるサーバコマンドと、HTTPクライアント11からHTTPサーバ12に送信されてきたクライアントコマンドに対する応答(コマンド応答)とを記載して送信するようにしている。 In the HTTP request, a client command which is an operation request transmitted from the HTTP client 11 to the HTTP server 12 and a response (command response) to the server command transmitted from the HTTP server 12 to the HTTP client 11 are described. I try to send. In the HTTP response, a server command which is an operation request transmitted from the HTTP server 12 to the HTTP client 11 and a response (command response) to the client command transmitted from the HTTP client 11 to the HTTP server 12 are described. I try to send.

 従って、例えばクライアントコマンドAは、HTTPリクエストXに記載して転送し、コマンド応答をそのHTTPリクエストXと対応するHTTPレスポンスXに記載して転送することができる。しかし、サーバコマンドCについては、HTTPリクエストXと対応するHTTPレスポンスXに記載して転送し、そのコマンド応答は次のHTTPリクエストであるHTTPリクエストYに記載して転送することになる。 Therefore, for example, the client command A can be transmitted by describing it in the HTTP request X, and the command response can be transmitted by describing the command response in the HTTP response X corresponding to the HTTP request X. However, the server command C is described and transferred in the HTTP response X corresponding to the HTTP request X, and the command response is described and transferred in the HTTP request Y which is the next HTTP request.

 また、上記図4(A)のケースでは、クライアントコマンドが生成された後直ちにHTTPクライアント11がHTTPサーバ12とコネクションを確立し、HTTPリクエストにこれを含めて引き渡すことができるが、上記図4(B)のケースでは、HTTPクライアント11側に設置されたファイアウォール14がHTTPサーバ12からのHTTPリクエストを遮断するため、HTTPサーバ12側からHTTPクライアント11へアクセスしてサーバコマンドを直ちに引き渡すことができない。 Further, in the case of FIG. 4A, the HTTP client 11 can establish a connection with the HTTP server 12 immediately after the client command is generated, and deliver the HTTP request including the HTTP command. In the case B), the firewall 14 installed on the HTTP client 11 blocks the HTTP request from the HTTP server 12, so that the HTTP server 12 cannot access the HTTP client 11 and immediately transfer the server command.

 なお、クライアントコマンド及びサーバコマンドに対する応答をそれぞれ任意の数ずつ(0でもよい)1つのHTTPリクエストに記載することができ、サーバコマンド及びクライアントコマンドに対する応答をそれぞれ任意の数ずつ(0でもよい)1つのHTTPレスポンスに記載することができる。そして、1つのHTTPリクエスト又はHTTPレスポンスに記載した内容は、論理的に一括して転送する。
 そして、このようにすることにより、必要な情報を転送するために必要なコネクションの回数を減らし、オーバーヘッドを低減して通信の効率化を図っている。
Note that an arbitrary number (or 0) of responses to the client command and the server command can be described in one HTTP request, and an arbitrary number of (1 may be 0) each of the responses to the server command and the client command. HTTP response. Then, the contents described in one HTTP request or HTTP response are logically and collectively transferred.
By doing so, the number of connections required to transfer necessary information is reduced, overhead is reduced, and communication efficiency is improved.

 図6にこの通信システムにおける別の通信シーケンスの例を示す。
 説明のため、図5には極めて単純なシーケンス例を示したが、図6には、各HTTPリクエストやHTTPレスポンスに記載するコマンドやコマンド応答の数が一定でない例を示している。
 また、コマンドを受信した場合に、次の送信機会の時点で応答を返す必要もない。例えば、図6に示すクライアントコマンドBのように、コマンドを記載したHTTPリクエストX′に対応するHTTPレスポンスX′に記載して応答を返さず、後のHTTPレスポンスY′に記載して応答を返すようにしてもよい。
 もちろんサーバコマンドについても同様であり、サーバコマンドを記載したHTTPレスポンスの次のHTTPリクエストにそのコマンドに対する応答を記載する必要はない。そして、さらに後のHTTPリクエストに記載して転送すればよい。
FIG. 6 shows another example of a communication sequence in this communication system.
For the sake of explanation, FIG. 5 shows an example of a very simple sequence, but FIG. 6 shows an example in which the number of commands and command responses described in each HTTP request or HTTP response is not constant.
Further, when a command is received, it is not necessary to return a response at the next transmission opportunity. For example, like a client command B shown in FIG. 6, a response is described in an HTTP response X 'corresponding to an HTTP request X' in which the command is described, and a response is described in a subsequent HTTP response Y '. You may do so.
Of course, the same applies to the server command, and there is no need to describe the response to the command in the HTTP request next to the HTTP response describing the server command. Then, it may be transferred in a later HTTP request.

 ところで、各コマンド及びコマンド応答は、それぞれ独立して生成され、また処理に供されるべきものであるから、上記のような一括転送を行うためには、転送前にこれらのコマンドやコマンド応答を結合し、また転送後に分離する処理が必要となる。次に、HTTPクライアント11及びHTTPサーバ12のハードウェア構成と共に、このような処理を行うための機能構成及びその処理の手順について説明する。 By the way, since each command and command response are generated independently and should be provided for processing, in order to perform the batch transfer as described above, these commands and command responses must be transmitted before the transfer. It is necessary to perform processing for combining and separating after transfer. Next, a description will be given of a hardware configuration of the HTTP client 11 and the HTTP server 12, a functional configuration for performing such processing, and a procedure of the processing.

 図7は、HTTPクライアント11及びHTTPサーバ12のハードウェア構成例を示す図である。
 この図に示すように、HTTPクライアント11及びHTTPサーバ12においてはそれぞれ、CPU31、ROM32、RAM33、SD(Secure Digital)カード34、ネットワークインタフェースカード(NIC)35を備え、これらがシステムバス36で接続されている。
FIG. 7 is a diagram illustrating a hardware configuration example of the HTTP client 11 and the HTTP server 12.
As shown in this figure, the HTTP client 11 and the HTTP server 12 each include a CPU 31, a ROM 32, a RAM 33, an SD (Secure Digital) card 34, and a network interface card (NIC) 35, which are connected by a system bus 36. ing.

 これら構成要素を更に具体的に説明すると、まずCPU31は、ROM32に格納している制御プログラムによってHTTPクライアント11又はHTTPサーバ12全体を統括的に制御する制御手段である。そして、ROM32は、CPU31が使用する制御プログラムを含む各種固定データを格納している読み出し専用メモリである。
 RAM33は、CPU31がデータ処理を行う際のワークメモリ等として使用する一時記憶用メモリである。SDカード34は、装置の電源がオフになっても記憶内容を保持するようになっている不揮発性メモリである。NIC35は、インターネット13を始めとするネットワークを介して通信相手と情報の送受信を行うための通信手段である。
To describe these components more specifically, first, the CPU 31 is a control unit that controls the entire HTTP client 11 or the entire HTTP server 12 by a control program stored in the ROM 32. The ROM 32 is a read-only memory that stores various fixed data including a control program used by the CPU 31.
The RAM 33 is a temporary storage memory used as a work memory or the like when the CPU 31 performs data processing. The SD card 34 is a non-volatile memory that retains stored contents even when the power of the apparatus is turned off. The NIC 35 is a communication unit for transmitting and receiving information to and from a communication partner via a network such as the Internet 13.

 図8は、HTTPクライアント11の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。
 図8に示す機能のうち、クライアントコマンドプール41及びサーバコマンドプール42は、いずれかの書き換え可能な記憶手段に設けられるものである。例えばSDカード34に設けることができるが、RAM33や図示しないHDD(ハードディスクドライブ)に設けてもよい。クライアントコマンド生成手段43、サーバコマンド実行結果生成手段44、送信メッセージ収集手段45、受信メッセージ分配手段48の機能は、CPU31によって実現されるものである。また、HTTPリクエスト送信手段46及びHTTPレスポンス受信手段47の機能は、CPU31及びNIC35によって実現されるものである。
FIG. 8 is a functional block diagram showing a configuration of a function for performing processing relating to a command and a command response among functions of the HTTP client 11.
Among the functions shown in FIG. 8, the client command pool 41 and the server command pool 42 are provided in any rewritable storage means. For example, it can be provided in the SD card 34, but may be provided in the RAM 33 or an HDD (hard disk drive) not shown. The functions of the client command generation unit 43, the server command execution result generation unit 44, the transmission message collection unit 45, and the reception message distribution unit 48 are realized by the CPU 31. The functions of the HTTP request transmitting unit 46 and the HTTP response receiving unit 47 are realized by the CPU 31 and the NIC 35.

 これらの機能についてさらに詳述する。
 まず、クライアントコマンドプール41は、HTTPクライアント11に設けた第2の記憶領域に該当し、クライアントコマンドと、このコマンドに対する応答と、このコマンドの識別情報とを関連付けて登録するプールである。また、サーバコマンドプール42は、HTTPクライアント11に設けた第1の記憶領域に該当し、サーバコマンドと、このコマンドに対する応答と、このコマンドの識別情報とを関連付けて登録するプールである。これらのプールにおいては、コマンド毎にテーブル形式のコマンドシートを作成して情報を格納することにより、コマンドと、識別情報や応答等の情報とを関連付けるようにしている。また、これらのプールを設けた記憶手段がそれぞれHTTPクライアント11の第2,第1の記憶手段に該当するものとする。
These functions will be described in more detail.
First, the client command pool 41 corresponds to a second storage area provided in the HTTP client 11, and is a pool for registering a client command, a response to the command, and identification information of the command in association with each other. The server command pool 42 corresponds to a first storage area provided in the HTTP client 11, and is a pool for registering a server command, a response to the command, and identification information of the command in association with each other. In these pools, a command sheet in a table format is created for each command and the information is stored, so that the command is associated with information such as identification information and a response. It is also assumed that storage means provided with these pools correspond to the second and first storage means of the HTTP client 11, respectively.

 クライアントコマンド生成手段43は、要求生成手段に該当する。そして、クライアントコマンドを生成し、このコマンドを識別する識別情報(ID)を割り当て、さらにこのコマンドを管理するための管理情報を付し、これらの情報を関連付けてテーブル形式のクライアントコマンドシートとしてクライアントコマンドプール41に登録する機能を有する。このうち、クライアントコマンドを生成する部分には、例えばHTTPクライアント11に備えるアプリケーションが該当する。また、クライアントコマンド生成手段43に、HTTPサーバ12に各コマンドを実行させる際の優先順位を、生成したクライアントコマンドに付する機能を設けてもよい。 The client command generation means 43 corresponds to a request generation means. Then, a client command is generated, identification information (ID) for identifying the command is assigned, management information for managing the command is added, and the information is associated with the client command as a client command sheet in a table format. It has a function of registering in the pool 41. Among these, the portion that generates the client command corresponds to, for example, an application provided in the HTTP client 11. Further, the client command generation unit 43 may be provided with a function of assigning a priority order when the HTTP server 12 executes each command to the generated client command.

 ここで、図9にHTTPクライアント11のクライアントコマンドシートにおけるデータ構造の例を示す。
 この図に示すように、HTTPクライアント11においては、クライアントコマンドシートには、「コマンドID」、「メソッド名」、「入力パラメータ」、「状態」、「クライアントコマンド実行結果の通知先」、および「出力パラメータ」のデータを記憶する領域を設けている。そして、このうち「コマンドID」、「メソッド名」、および「入力パラメータ」がクライアントコマンド(及びそこに付されたID)に該当し、「状態」及び「クライアントコマンド実行結果の通知先」が管理情報に該当する。「出力パラメータ」は、HTTPサーバ12から受信するコマンド応答の内容である。
Here, FIG. 9 shows an example of a data structure in the client command sheet of the HTTP client 11.
As shown in this figure, in the HTTP client 11, the client command sheet includes “command ID”, “method name”, “input parameter”, “state”, “notification destination of client command execution result”, and “ An area for storing data of “output parameters” is provided. The “command ID”, the “method name”, and the “input parameter” correspond to the client command (and the ID attached thereto), and the “status” and the “report destination of the execution result of the client command” are managed. Applicable to information. The “output parameter” is the content of the command response received from the HTTP server 12.

 次に、各項目の内容について説明する。
 まず、「メソッド名」は、HTTPサーバ12に対するリクエストの内容であり、HTTPサーバ12において呼び出す関数の種類を示す。「入力パラメータ」は、「メソッド名」に付随するデータであり、関数を呼び出す際の引数である。「コマンドID」は、クライアントコマンドを識別するための識別情報である。「状態」は、クライアントコマンドに関する処理の進行状況を示すデータであり、処理の進行と共に、「未送信」→「応答待ち」→「応答受信済」と遷移していく。
Next, the contents of each item will be described.
First, the “method name” is the content of a request to the HTTP server 12 and indicates the type of function to be called in the HTTP server 12. The “input parameter” is data accompanying the “method name”, and is an argument when calling a function. “Command ID” is identification information for identifying a client command. The “state” is data indicating the progress of the process related to the client command, and transitions from “not transmitted” to “response wait” to “response received” as the process proceeds.

 「クライアントコマンド実行結果の通知先」は、そのシートに記載しているクライアントコマンドに対する応答を受信した場合に、その旨を通知して必要な処理を実行させるモジュールを示す参照情報である。参照するモジュールは、クライアントコマンドを生成したアプリケーションであることが多いが、必ずしもそうである必要はない。「出力パラメータ」には、コマンド応答を受け取った段階で、その内容を格納する。HTTPサーバ12からのコマンド応答を受け取るまでは空である。 "Notification destination of client command execution result" is reference information indicating a module that, when a response to the client command described in the sheet is received, notifies that effect and executes necessary processing. The referenced module is often, but not necessarily, the application that generated the client command. In the “output parameter”, the content of the command response is stored when the command response is received. It is empty until a command response from the HTTP server 12 is received.

 図8の説明に戻ると、サーバコマンド実行結果生成手段44は、応答生成手段に該当する。そして、サーバコマンドプール42からサーバコマンドを読み出して実行するアプリケーションである。そして、サーバコマンドに対する応答を生成し、サーバコマンドのコマンドIDと関連付けてサーバコマンドプール42に登録する機能を有する。なお、HTTPサーバ12から受信したサーバコマンドは、このコマンドを識別するID及びこのコマンドを管理するための管理情報と関連付けて、テーブル形式のサーバコマンドシートとしてサーバコマンドプール42に登録しておくようにしている。そして、サーバコマンド実行結果生成手段44が生成したコマンド応答も、実行したサーバコマンドについてのサーバコマンドシートに登録する。 << Returning to the description of FIG. 8, the server command execution result generating means 44 corresponds to the response generating means. The application reads a server command from the server command pool 42 and executes it. Then, it has a function of generating a response to the server command and registering it in the server command pool 42 in association with the command ID of the server command. It should be noted that the server command received from the HTTP server 12 is registered in the server command pool 42 as a server command sheet in a table format in association with an ID for identifying the command and management information for managing the command. ing. Then, the command response generated by the server command execution result generation unit 44 is also registered in the server command sheet for the executed server command.

 また、サーバコマンド実行結果生成手段44に、サーバコマンドプール42から複数の種類のサーバコマンドを読み出し、各サーバコマンドに対する応答を生成する機能を設けることが考えられる。さらに、サーバコマンドがHTTPクライアント11に優先して処理を実行させるための実行優先順位の情報を含む場合には、優先順位の高いものから優先的に読み出して実行する機能を設けることも考えられる。
 なお、サーバコマンド実行結果生成手段44は、アプリケーションそのものではなく、サーバコマンドの実行に必要なアプリケーションを呼び出してコマンドを実行させるモジュールであってもよい。
It is also conceivable to provide the server command execution result generation means 44 with a function of reading a plurality of types of server commands from the server command pool 42 and generating a response to each server command. Further, when the server command includes information on the execution priority for causing the HTTP client 11 to execute the processing in priority, it is conceivable to provide a function of reading and executing the server command with higher priority.
Note that the server command execution result generation unit 44 may be a module that calls up an application necessary for executing the server command and executes the command, instead of the application itself.

 ここで、図10にHTTPクライアント11のサーバコマンドシートにおけるデータ構造の例を示す。
 この図に示すように、HTTPクライアント11においては、サーバコマンドシートには、「コマンドID」、「メソッド名」、「入力パラメータ」、「状態」、「出力パラメータ」、および「サーバコマンドの通知先」のデータを記憶する領域を設けている。そして、このうち「コマンドID」、「メソッド名」、および「入力パラメータ」がサーバコマンド(及びそこに付されたID)に該当し、「状態」及び「サーバコマンドの通知先」が管理情報に該当する。「出力パラメータ」は、サーバコマンドの実行結果であり、HTTPクライアント11が返すコマンド応答の内容となる。
Here, FIG. 10 shows an example of the data structure in the server command sheet of the HTTP client 11.
As shown in this figure, in the HTTP client 11, the server command sheet includes "command ID", "method name", "input parameter", "status", "output parameter", and "server command notification destination". Is stored in the storage area. The “command ID”, the “method name”, and the “input parameter” correspond to the server command (and the ID attached thereto), and the “status” and the “notification destination of the server command” are included in the management information. Applicable. The “output parameter” is the execution result of the server command, and is the content of the command response returned by the HTTP client 11.

 次に、各データの内容について説明する。
 まず、「メソッド名」は、HTTPクライアント11に対するリクエストの内容であり、HTTPクライアント11において呼び出す関数の種類を示す。「入力パラメータ」は、「メソッド名」に付随するデータであり、関数を呼び出す際の引数である。「コマンドID」は、サーバコマンドを識別するための識別情報である。「状態」は、サーバコマンドに関する処理の状態を示すデータであり、処理の進行と共に、「未処理」→「処理完了」→「応答済」、あるいは「未処理」→「処理中」→「処理完了」→「応答済」と遷移していく。「出力パラメータ」には、サーバコマンド実行結果生成手段44によって生成された応答が格納される。サーバコマンドの実行が終了し、上記の「状態」が「処理完了」となるまでは空である。「サーバコマンドの通知先」は、サーバコマンドの実行を行うモジュールを示す参照情報である。
Next, the contents of each data will be described.
First, “method name” is the content of a request to the HTTP client 11 and indicates the type of function to be called in the HTTP client 11. The “input parameter” is data accompanying the “method name”, and is an argument when calling a function. “Command ID” is identification information for identifying a server command. “Status” is data indicating the status of the process related to the server command. As the process proceeds, “Unprocessed” → “Processed” → “Responded” or “Unprocessed” → “Processing” → “Processed” It transitions from “Completed” to “Responded”. In the “output parameter”, a response generated by the server command execution result generating unit 44 is stored. It is empty until the execution of the server command ends and the above “state” becomes “processing completed”. “Notification destination of server command” is reference information indicating a module that executes the server command.

 再び図8の説明に戻ると、送信メッセージ収集手段45は、収集手段に該当する。そして、サーバコマンド実行結果生成手段44が生成したコマンド応答とこのコマンド応答に対応するサーバコマンドのコマンドIDとを関連付けてサーバコマンドプール42から読み出すと共に、クライアントコマンド生成手段43が生成したクライアントコマンドとこのコマンドのコマンドIDとを関連付けてクライアントコマンドプール41から読み出し、これらから送信メッセージを生成する機能を有する。
 なお、コマンド応答やクライアントコマンドに実行優先順位が指定されている場合には、送信メッセージ収集手段45がそれぞれ実行優先順位の高いものから順に読み出すようにすることが考えられる。
Returning to the description of FIG. 8 again, the transmission message collecting unit 45 corresponds to the collecting unit. Then, the command response generated by the server command execution result generation unit 44 and the command ID of the server command corresponding to the command response are read out from the server command pool 42 in association with each other, and the client command generated by the client command generation unit 43 and the It has a function of reading out from the client command pool 41 in association with the command ID of the command and generating a transmission message from these.
If the execution priority is specified in the command response or the client command, the transmission message collecting unit 45 may read the transmission priority in descending order of the execution priority.

 ここで、送信メッセージとは、上記のコマンド応答やコマンドとコマンドIDとを、構造化言語であるXML(Extensible Markup Language)で、SOAPメッセージとして記載したものである。そして、送信メッセージ収集手段45は、1つのコマンド応答あるいはコマンドにつき、送信メッセージとして1つのSOAPメッセージを生成する。またこのとき、各コマンドのコマンドIDはSOAPヘッダに記載し、コマンド応答及びクライアントコマンドの内容はSOAPボディに記載する。SOAPによる通信では、SOAPヘッダとSOAPボディとからなるSOAPエンベロープ(封筒)と呼ばれるメッセージをXMLで記載し、HTTPなどのプロトコルで交換することになる。
 このようなコマンドやコマンド応答からのSOAPメッセージの生成は、WSDL(Web Service Description Language)に基づいて生成される所要の変換プログラム(シリアライザ)を実行し、データを直列化することによって行うことができる。
Here, the transmission message describes the command response, the command, and the command ID as a SOAP message in XML (Extensible Markup Language), which is a structured language. Then, the transmission message collecting unit 45 generates one SOAP message as a transmission message for one command response or command. At this time, the command ID of each command is described in the SOAP header, and the contents of the command response and the client command are described in the SOAP body. In communication by SOAP, a message called a SOAP envelope (envelope) including a SOAP header and a SOAP body is described in XML, and exchanged by a protocol such as HTTP.
The generation of a SOAP message from such a command or command response can be performed by executing a required conversion program (serializer) generated based on WSDL (Web Service Description Language) and serializing the data. .

 そして、HTTPリクエスト送信手段46は、送信手段に該当し、送信メッセージ収集手段45が生成した送信メッセージを含むHTTPリクエストを生成し、HTTPサーバ12に送信する機能を有する。このとき、1つのHTTPリクエストに送信メッセージをいくつ含めてもよいし、コマンド応答に係る送信メッセージとクライアントコマンドに係る送信メッセージとを任意に混在させることもできる。
 そこで、HTTPリクエスト送信手段46は、これらのいずれに係る送信メッセージかに関わり無く、送信メッセージ収集手段45が生成した全ての送信メッセージを1つのHTTPリクエストに含めて送信するようにしている。ただし、1つのHTTPリクエストに含める送信メッセージの数に上限を設けることも考えられる。
The HTTP request transmitting unit 46 corresponds to the transmitting unit, and has a function of generating an HTTP request including the transmission message generated by the transmission message collecting unit 45 and transmitting the generated HTTP request to the HTTP server 12. At this time, any number of transmission messages may be included in one HTTP request, or a transmission message relating to a command response and a transmission message relating to a client command may be arbitrarily mixed.
Therefore, the HTTP request transmitting unit 46 transmits all the transmission messages generated by the transmission message collecting unit 45 in one HTTP request regardless of which of these transmission messages. However, it is also conceivable to set an upper limit on the number of transmission messages included in one HTTP request.

 ところで、このHTTPリクエストの送信は、送信メッセージ収集手段45がクライアントコマンドやコマンド応答等の読み出しを試みた場合には、読み出すデータがなく、結果的に送信すべきSOAPメッセージを生成しなかった場合にも行うものである。そして、この読み出しの試みは、定期的に行うものとする。例えば、タイマによって60分毎に読み出すことが考えられる。
 このようにするのは、上述のように、HTTPサーバ12からHTTPクライアント11に送信したい情報があったとしてもHTTPクライアント11から通信を要求しない限り送信できないためである。HTTPクライアント11から何も送信するデータがなかったとしても、定期的にHTTPサーバ12に対して通信要求を送信して、HTTPサーバ12からHTTPクライアント11に情報を送信する機会を与えることにより、転送の必要な情報が長期間に亘ってHTTPサーバ12に滞留してしまうことを防止できる。
By the way, the transmission of the HTTP request is performed when the transmission message collecting unit 45 attempts to read a client command or a command response, etc., when there is no data to be read and, as a result, a SOAP message to be transmitted is not generated. Also do. Then, this reading attempt is performed periodically. For example, it is conceivable to read out every 60 minutes using a timer.
This is because, as described above, even if there is information to be transmitted from the HTTP server 12 to the HTTP client 11, the information cannot be transmitted unless the HTTP client 11 requests communication. Even if there is no data to be transmitted from the HTTP client 11, a communication request is periodically transmitted to the HTTP server 12 to give an opportunity to transmit information from the HTTP server 12 to the HTTP client 11. Can be prevented from staying in the HTTP server 12 for a long time.

 なお、送信メッセージ収集手段45による読み出しと、それに続くHTTPリクエスト送信手段46によるHTTPリクエストの送信とを、定期的なタイミング以外に適宜行ってよいことはもちろんである。例えば、緊急に送信が必要な情報がいずれかのプールに登録された場合に、クライアントコマンド生成手段43あるいはサーバコマンド実行結果生成手段44が送信メッセージ収集手段45にその旨を通知して読み出しを行わせるようにしてもよい。 Note that the reading by the transmission message collecting unit 45 and the subsequent transmission of the HTTP request by the HTTP request transmitting unit 46 may be performed at an appropriate time other than the regular timing. For example, when information that needs to be transmitted urgently is registered in one of the pools, the client command generation unit 43 or the server command execution result generation unit 44 notifies the transmission message collection unit 45 of the fact and reads the information. You may make it do.

 次に、HTTPレスポンス受信手段47は、受信手段に該当し、HTTPサーバ12からHTTPレスポンスを受信する機能を有する。そしてここでは、HTTPレスポンスには、サーバコマンド及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージと、クライアントコマンドに対する応答及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージとが、任意に混在して含まれている。
 ここで、受信メッセージとは、上記のコマンドや応答とコマンドIDとをSOAPメッセージとして記載したものである。
Next, the HTTP response receiving unit 47 corresponds to a receiving unit, and has a function of receiving an HTTP response from the HTTP server 12. Here, in the HTTP response, a received message including a server command and a command ID associated with the command, and a received message including a response to the client command and a command ID associated with the command are arbitrarily mixed. Included.
Here, the received message describes the command or response and the command ID as a SOAP message.

 受信メッセージ分配手段48は、分配手段に該当する。そして、HTTPレスポンス受信手段47が受信したHTTPレスポンスに含まれるデータを、クライアントコマンドプール41及びサーバコマンドプール42に振り分けて登録する機能を有する。
 具体的には、サーバコマンド及びそのコマンドと関連付けられたコマンドIDとをサーバコマンドプール42にサーバコマンドシートを設けて登録すると共に、クライアントコマンドに対する応答については、そのコマンドと関連付けられたコマンドIDをクライアントコマンドプール41に記憶しているクライアントコマンドシートのコマンドIDと照合して対応するクライアントコマンドを特定し、そのクライアントコマンドについての「出力パラメータ」として登録する。
 そしてこのとき、HTTPレスポンスを分割してそこに含まれる各受信メッセージを取り出し、そのデータをテーブルへの登録に必要な形式に変換するが、この変換は、WSDLに基づいて生成される所要の変換プログラム(デシリアライザ)を実行することによって行うことができる。
The received message distribution unit 48 corresponds to a distribution unit. Then, it has a function of distributing and registering data included in the HTTP response received by the HTTP response receiving means 47 to the client command pool 41 and the server command pool 42.
More specifically, a server command and a command ID associated with the command are registered in a server command pool 42 by providing a server command sheet. The corresponding client command is specified by comparing it with the command ID of the client command sheet stored in the command pool 41, and registered as an “output parameter” for the client command.
At this time, the HTTP response is divided and each received message included therein is taken out, and the data is converted into a format required for registration in the table. This can be performed by executing a program (deserializer).

 次に、このような機能を有するHTTPクライアント11がHTTPサーバ12に送信するHTTPリクエストの例を図11に示す。
 このHTTPリクエストは、図11に示すように、ボディ部としてMIME(Multipurpose Internet Mail Extension)に従ったマルチパートのメッセージが記載され、この各パートには、それぞれエンティティヘッダが記載されると共に、詳細な図示は省略しているが、SOAPエンベロープが埋め込まれている。図11の例では、HTTPリクエストのHTTPボディには、「MIME_boundary」で区分された各要素が、独立した第1パート、第2パート、第3パート、第4パートを構成しているが、HTTPボディに含めることのできるパート数は4つに限られない。0個を含め、いくつでもよい。
 HTTPリクエストに埋め込まれて引き渡されるSOAPエンベロープには、クライアントコマンドを記載したものと、サーバコマンドに対する応答を記載したものとがある。
Next, an example of an HTTP request transmitted from the HTTP client 11 having such a function to the HTTP server 12 is shown in FIG.
In the HTTP request, as shown in FIG. 11, a multi-part message in accordance with MIME (Multipurpose Internet Mail Extension) is described as a body part. Although not shown, a SOAP envelope is embedded. In the example of FIG. 11, in the HTTP body of the HTTP request, each element divided by “MIME_boundary” forms independent first part, second part, third part, and fourth part. The number of parts that can be included in the body is not limited to four. Any number is acceptable, including zero.
The SOAP envelope embedded and delivered in the HTTP request includes a description of a client command and a description of a response to a server command.

 また、このような機能を有するHTTPクライアント11がHTTPサーバ12から受信するHTTPレスポンスの例を図12に示す。
 図12に示すように、このHTTPレスポンスは、形式としては図11に示したHTTPリクエストとHTTPヘッダ部が異なるのみであり、ボディ部にはHTTPリクエストの場合と同様に、詳細な図示は省略しているが、MIMEに従ったマルチパートのSOAPエンベロープが記載される。SOAPエンベロープの内容については、当然コマンドやコマンド応答の内容に従って異なるものである。
 HTTPレスポンスに埋め込まれて引き渡されるSOAPエンベロープには、サーバコマンドを記載したものと、クライアントコマンドに対する応答を記載したものとがある。
FIG. 12 shows an example of an HTTP response received from the HTTP server 12 by the HTTP client 11 having such a function.
As shown in FIG. 12, this HTTP response is different only in the format of the HTTP header shown in FIG. 11 from the HTTP request shown in FIG. 11, and detailed description is omitted in the body as in the case of the HTTP request. However, a multi-part SOAP envelope according to MIME is described. The contents of the SOAP envelope naturally differ according to the contents of the command and the command response.
The SOAP envelope embedded and delivered in the HTTP response includes a description of a server command and a description of a response to a client command.

 次に、これらのHTTPリクエスト又はHTTPレスポンスに記載されるパートの具体例を図13乃至図16に示す。
 図13に示すのは、クライアントコマンドを記載したパートの例である。
 この例においては、まず、エンティティヘッダの部分の「X-SOAP-Type」ヘッダに、このパートに記載されているSOAPメッセージがSOAPリクエストであるかSOAPレスポンスであるかを示す情報を記載している。この例では、値の「Request」により、SOAPリクエストであること、すなわちコマンドを記載したSOAPメッセージであることを示している。
 また、「SOAPAction」ヘッダは、SOAPリクエストの内容を示すものであり、この例では、「http://www.…」というURI(Uniform Resource Identifier)によりリクエストの内容を示している。なお、「SOAPAction」ヘッダは、SOAPメッセージがSOAPレスポンスである場合には付加しないため、メッセージの受信側において、このヘッダの有無により、SOAPメッセージがSOAPリクエストであるかSOAPレスポンスであるかを判断することもできる。
Next, specific examples of the parts described in the HTTP request or the HTTP response are shown in FIGS.
FIG. 13 shows an example of a part describing a client command.
In this example, first, information indicating whether the SOAP message described in this part is a SOAP request or a SOAP response is described in the “X-SOAP-Type” header of the entity header portion. . In this example, the value “Request” indicates that the request is a SOAP request, that is, a SOAP message describing a command.
The "SOAPAction" header indicates the content of the SOAP request. In this example, the content of the request is indicated by a URI (Uniform Resource Identifier) "http: // www ....". Since the "SOAPAction" header is not added when the SOAP message is a SOAP response, the message receiving side determines whether the SOAP message is a SOAP request or a SOAP response based on the presence or absence of this header. You can also.

 そして、「Envelope」タグの属性として、名前空間の宣言を行っている。そしてここでは、SOAPで標準として定義されている名前空間の他に、「http://www.foo.com/header」及び「http://www.foo.com/server」のURIで特定される名前空間の宣言を行っている。従って、「n」の名前空間接頭辞が付されたXMLタグについては「http://www.foo.com/header」のURIで特定される名前空間に属するタグであることがわかり、「ns」の名前空間接頭辞が付されたXMLタグについては「http://www.foo.com/server」のURIで特定される名前空間に属するタグであることがわかる。 Then, the namespace is declared as an attribute of the "Envelope" tag. And here, in addition to the namespace defined as a standard in SOAP, it is specified by URIs of "http://www.foo.com/header" and "http://www.foo.com/server". To declare a namespace. Therefore, the XML tag with the namespace prefix “n” is found to belong to the namespace specified by the URI “http://www.foo.com/header”, and “ns” It can be understood that the XML tag to which the namespace prefix of "" is attached belongs to the namespace specified by the URI of "http://www.foo.com/server".

 またSOAPヘッダには、「要求ID」のXMLタグの内容として、このクライアントコマンドのIDである「12345」が記載されている。そして、SOAPボディには、クライアントコマンドシートの「メソッド名」に記憶されていたメソッドを指定する情報として、「異常通知」タグが記載され、その下位のタグ「エラーID」や「説明」の要素として、「入力パラメータ」に記憶されていた引数が記載されている。ここでは異常通知の通知内容が記載されている。 $ Also, in the SOAP header, "12345" which is the ID of this client command is described as the content of the XML tag of "request ID". In the SOAP body, an “abnormal notification” tag is described as information for specifying the method stored in the “method name” of the client command sheet, and the lower-order tags “error ID” and “description” Is described as an argument stored in the “input parameter”. Here, the notification contents of the abnormality notification are described.

 図14に示すのは、クライアントコマンドに対する応答を記載したパートの例である。
 この例においては、まず、エンティティヘッダの部分の「X-SOAP-Type」ヘッダの値を「Response」と記載することにより、このパートに記載されているSOAPメッセージがSOAPレスポンスであること、すなわちコマンド応答を記載したSOAPメッセージであることを示している。
 また、この例においても、名前空間の宣言は図13に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、応答を生成したクライアントコマンドのIDである「12345」が記述されている。SOAPボディには、「異常通知」コマンドに対する応答であることを示すための「異常通知Response」タグが設けられ、その下位のタグに、コマンド応答の内容が記載される。ここでは、異常通知を正常に受信した旨の情報が記載されている。そして、この情報がクライアントコマンドシートの「出力パラメータ」の項目に格納される。
FIG. 14 shows an example of a part describing a response to a client command.
In this example, first, the value of the “X-SOAP-Type” header in the entity header is described as “Response”, so that the SOAP message described in this part is a SOAP response, This indicates that the message is a SOAP message describing a response.
Also in this example, the declaration of the name space is the same as in the example shown in FIG. In the SOAP header, “12345”, which is the ID of the client command that generated the response, is described as the content of the “command ID” XML tag. The SOAP body is provided with an "abnormal notification response" tag for indicating a response to the "abnormal notification" command, and the tag below the "abnormal notification response" describes the content of the command response. Here, information indicating that the abnormality notification has been normally received is described. Then, this information is stored in the item “output parameter” of the client command sheet.

 図15に示すのは、サーバコマンドを記載したパートの例である。
 この例においても、図13の場合と同様に、「X-SOAP-Type」ヘッダの値の「Request」により、このパートに記載されているSOAPエンベロープがSOAPリクエストであることを示し、「SOAPAction」ヘッダの情報により、SOAPリクエストの内容を示している。
FIG. 15 shows an example of a part describing a server command.
Also in this example, as in the case of FIG. 13, “Request” of the value of the “X-SOAP-Type” header indicates that the SOAP envelope described in this part is a SOAP request, and “SOAPAction” The information of the header indicates the content of the SOAP request.

 また、「Envelope」タグの属性として、名前空間の宣言を行っている点も、図13の場合と同様である。そしてここでは、SOAPで標準として定義されている名前空間の他に、「http://www.foo.com/header」及び「http://www.foo.com/client」のURIで特定される名前空間の宣言を行っている。
 SOAPヘッダには、「要求ID」のXMLタグの内容として、このクライアントコマンドのIDである「98765」が記載されている。そして、SOAPボディには、サーバコマンドシートの「メソッド名」に記憶されるべきメソッドを指定する情報として、「温度センサ値取得」タグが記載され、その下位のタグ「センサID」の要素として、「入力パラメータ」に記憶されるべき引数が記載されている。ここではセンサ値を取得するセンサのIDが記載されている。
 なお、サーバがこのようなコマンドを送信する場合としては、例えば、クライアントからの異常通知を受けて異常の原因を特定しようとする場合等が考えられる。
In addition, the fact that a namespace is declared as an attribute of the “Envelope” tag is the same as in the case of FIG. And here, in addition to the namespace defined as a standard in SOAP, it is specified by URIs of "http://www.foo.com/header" and "http://www.foo.com/client". To declare a namespace.
In the SOAP header, “98765” which is the ID of this client command is described as the content of the XML tag of “request ID”. In the SOAP body, a “temperature sensor value acquisition” tag is described as information for specifying a method to be stored in the “method name” of the server command sheet, and as an element of a lower tag “sensor ID”, Arguments to be stored in "input parameters" are described. Here, the ID of the sensor for acquiring the sensor value is described.
As a case where the server transmits such a command, for example, a case where an abnormality notification is received from a client and an attempt is made to identify the cause of the abnormality is considered.

 図16に示すのは、サーバコマンドに対する応答を記載したパートの例である。
 この例においても、図14の場合と同様に、エンティティヘッダの部分の「X-SOAP-Type」ヘッダの値を「Response」と記載することにより、このパートに記載されているSOAPメッセージがSOAPレスポンスであることを示している。
 また、この例においても、名前空間の宣言は図15に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、応答を生成したサーバコマンドのIDである「98765」が記述されている。SOAPボディには、「温度センサ値取得」コマンドに対する応答であることを示すための「温度センサ値取得Response」タグが設けられ、その下位のタグに、コマンド応答の内容が記載される。ここでは、値取得を要求されたセンサの示す温度値の情報が記載されている。
FIG. 16 shows an example of a part describing a response to a server command.
In this example, as in the case of FIG. 14, the value of the “X-SOAP-Type” header in the entity header is described as “Response”, so that the SOAP message described in this part Is shown.
Also in this example, the declaration of the name space is the same as in the example shown in FIG. In the SOAP header, “98765”, which is the ID of the server command that generated the response, is described as the content of the “command ID” XML tag. The SOAP body is provided with a “Temperature Sensor Value Acquisition Response” tag for indicating that it is a response to the “Temperature Sensor Value Acquisition” command, and its lower tag describes the content of the command response. Here, information on the temperature value indicated by the sensor for which the value acquisition was requested is described.

 次に、以上説明したような構成及び機能を有するHTTPクライアント11において実行する処理について、図17乃至図21のフローチャートを用いて説明する。これらのフローチャートに示す処理は、HTTPクライアント11のCPU31が所要の制御プログラムを実行することによって行うものである。 Next, the processing executed in the HTTP client 11 having the above-described configuration and function will be described with reference to the flowcharts in FIGS. The processing shown in these flowcharts is performed by the CPU 31 of the HTTP client 11 executing a required control program.

 まず、図17にメッセージの収集及び分配処理の基本動作のフローチャートを示す。
 HTTPクライアント11のCPU31は、送信メッセージ収集手段45がクライアントコマンドやコマンド応答等の読み出しを試みるタイミングになると、図17のフローチャートに示す処理を開始する。
 そして、まずクライアントコマンドの収集処理を行う(S11)。この処理は、クライアントコマンドプール41からHTTPサーバ12に送信すべきクライアントコマンドを収集する処理であり、収集したデータからSOAPエンベロープによるパートを生成する処理を含む。
First, FIG. 17 shows a flowchart of the basic operation of message collection and distribution processing.
The CPU 31 of the HTTP client 11 starts the processing shown in the flowchart of FIG. 17 when the transmission message collecting unit 45 tries to read a client command, a command response, or the like.
Then, first, a client command collection process is performed (S11). This process is a process of collecting client commands to be transmitted from the client command pool 41 to the HTTP server 12, and includes a process of generating a SOAP envelope part from the collected data.

 次に、サーバコマンドに対する応答であるサーバコマンド実行結果の収集処理を行う(S12)。この処理は、サーバコマンドプールからHTTPサーバ12に送信すべきコマンド応答を収集する処理であり、やはり収集したデータからSOAPエンベロープによるパートを生成する処理を含む。
 その後、ステップS11及びS12の処理で生成したパートを1つにマージして、すべてのパートを含むHTTPリクエストを生成し(S13)、そのHTTPリクエストをHTTPサーバ12に送信する(S14)。
 ここまでの処理において、ステップS11及びS12ではCPU31は送信メッセージ収集手段45として機能し、ステップS13及びS14ではHTTPリクエスト送信手段46として機能する。
Next, a collection process of a server command execution result, which is a response to the server command, is performed (S12). This process is a process of collecting a command response to be transmitted to the HTTP server 12 from the server command pool, and also includes a process of generating a part based on the SOAP envelope from the collected data.
Thereafter, the parts generated in the processes of steps S11 and S12 are merged into one, an HTTP request including all parts is generated (S13), and the HTTP request is transmitted to the HTTP server 12 (S14).
In the processing so far, the CPU 31 functions as the transmission message collection unit 45 in steps S11 and S12, and functions as the HTTP request transmission unit 46 in steps S13 and S14.

 次に、HTTPリクエストに対する通信応答としてHTTPサーバ12からHTTPレスポンスを受信する(S15)。そして、受信したHTTPレスポンスのHTTPボディを各パートに分割する(S16)。ここで、各パートへの分割は、「MIME_boundary」で区分された要素に分割することであり、またここで全てのパートに関して分割する。
 そしてその後、分割して得た全てのパートを順に対象として、ステップS17乃至S19の処理を繰り返す。この処理においては、まず対象のパートがサーバコマンドを記載したパートか否か判断する(S17)。そして、サーバコマンドであればサーバコマンド登録処理を行う(S18)。また、サーバコマンドでないときは、クライアントコマンドに対する応答が記載されたパートであるので、応答通知処理を行う(S19)。
Next, an HTTP response is received from the HTTP server 12 as a communication response to the HTTP request (S15). Then, the HTTP body of the received HTTP response is divided into each part (S16). Here, division into each part is to divide into elements divided by “MIME_boundary”, and here, division is performed for all parts.
After that, the processing of steps S17 to S19 is repeated for all the parts obtained by division in order. In this processing, first, it is determined whether or not the target part is a part describing the server command (S17). If it is a server command, server command registration processing is performed (S18). If it is not a server command, it is a part in which a response to the client command is described, so that a response notification process is performed (S19).

 ステップS18又はS19の後は、ステップS17に戻り、次のパートを対象として処理を繰り返す。そして、全てのパートについてこれらの処理を行った時点で、図17のフローチャートに示す処理を終了する。
 ここまでの処理において、ステップS15及びS16ではCPU31はHTTPレスポンス受信手段47として機能し、ステップS17乃至S19では受信メッセージ分配手段48として機能する。
After step S18 or S19, the process returns to step S17, and the process is repeated for the next part. Then, when these processes have been performed for all parts, the process shown in the flowchart of FIG. 17 ends.
In the processing so far, the CPU 31 functions as the HTTP response receiving unit 47 in steps S15 and S16, and functions as the received message distribution unit 48 in steps S17 to S19.

 次に、図17のフローチャートに示した処理について、一部分ずつより詳細に示したフローチャートを用いて説明する。
 図18は、図17のステップS11乃至S14の部分の処理をより詳細に示したフローチャートである。
Next, the processing shown in the flowchart of FIG. 17 will be described with reference to a flowchart showing in detail part by part.
FIG. 18 is a flowchart showing the processing of steps S11 to S14 in FIG. 17 in more detail.

 この処理においては、HTTPクライアント11のCPU31はまず、クライアントコマンドプール41から、「状態」が「未送信」であるクライアントコマンドシートの「メソッド名」と「入力パラメータ」の内容を、送信すべきクライアントコマンドとして収集し、「コマンドID」の内容もそのコマンドのコマンドIDとして収集する(S21)。「未送信」という「状態」は、コマンドがクライアントコマンド生成手段43によって生成された後、まだHTTPサーバ12に通知されていないことを示すものであるので、これを基準にHTTPサーバ12に送信すべきコマンドを抽出できる。 In this process, the CPU 31 of the HTTP client 11 first sends, from the client command pool 41, the contents of the “method name” and the “input parameter” of the client command sheet whose “status” is “not sent” to the client to be sent. It is collected as a command, and the contents of “command ID” are also collected as the command ID of the command (S21). Since the “state” of “not transmitted” indicates that the command has not been notified to the HTTP server 12 after the command has been generated by the client command generation unit 43, the command is transmitted to the HTTP server 12 based on this. Command to be extracted.

 その後、ステップS21で収集した全てのクライアントコマンドを順次対象として、ステップS22乃至S24の処理を繰り返す。これらの処理においては、まず対象のクライアントコマンドとそのコマンドIDとを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書に変換し(S22)、対象のコマンドに関するパートとなるSOAPエンベロープを生成する(S23)。そして、対象のクライアントコマンドを記載していたクライアントコマンドシートの「状態」を「応答待ち」に変更する(S24)。「応答待ち」という「状態」は、コマンドをHTTPサーバ12に通知済であることを示すものである。 (4) Thereafter, the processing of steps S22 to S24 is repeated for all the client commands collected in step S21. In these processes, first, a target client command and its command ID are converted into an XML document whose information is included in the SOAP body and the SOAP header, respectively (S22), and a SOAP envelope which is a part related to the target command is converted. Is generated (S23). Then, the “status” of the client command sheet describing the target client command is changed to “waiting for response” (S24). The “state” of “waiting for response” indicates that the command has been notified to the HTTP server 12.

 これらが全て完了した後、CPU31は、サーバコマンドプール42から、「状態」が「処理完了」であるサーバコマンドシートの「出力パラメータ」の内容を、サーバコマンドに対するコマンド応答のうち送信すべきものとして収集し、「コマンドID」の内容も、対応するサーバコマンドのコマンドIDとして収集する(S25)。「処理完了」という「状態」は、サーバコマンドに対応する処理がサーバコマンド実行結果生成手段44によって生成された後、まだHTTPサーバ12に通知されていないことを示すものであるので、これを基準にHTTPサーバ12に送信すべきコマンド応答を抽出できる。 After all of these steps are completed, the CPU 31 collects, from the server command pool 42, the contents of the “output parameters” of the server command sheet whose “status” is “processing completed” as a command response to the server command to be transmitted. Then, the content of the “command ID” is also collected as the command ID of the corresponding server command (S25). The “state” of “processing completed” indicates that the processing corresponding to the server command has been generated by the server command execution result generating unit 44 and has not been notified to the HTTP server 12 yet. A command response to be transmitted to the HTTP server 12 can be extracted.

 その後、ステップS25で収集した全てのコマンド応答を順次対象として、ステップS26乃至S28の処理を繰り返す。これらの処理は、まず対象のコマンド応答とその応答と共に収集したコマンドIDとを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書に変換し(S26)、対象のコマンド応答に関するパートとなるSOAPエンベロープを生成する(S27)処理である。これらの処理は、対象が異なる点以外はステップS22及びS23の処理と同じものである。そして、次に対象のコマンド応答を記載していたサーバコマンドシートの「状態」を「応答済」に変更する(S28)。「応答済」という「状態」は、コマンド応答をHTTPサーバ12に通知済であることを示すものである。 Thereafter, the processing of steps S26 to S28 is repeated for all command responses collected in step S25. In these processes, first, the target command response and the command ID collected together with the response are converted into an XML document whose information is included in the SOAP body and the SOAP header, respectively (S26). This is the process of generating a SOAP envelope (S27). These processes are the same as the processes in steps S22 and S23 except that the targets are different. Then, the “status” of the server command sheet describing the target command response is changed to “responded” (S28). The “status” of “responded” indicates that the command response has been notified to the HTTP server 12.

 そして、ここまでの処理が全て完了した後、CPU31は、ステップS23又はS27で生成した各パートをマージし、図11に示したようなマルチパートのHTTPリクエストを生成してHTTPサーバ12に送信する(S29)。
 なお、ステップS24又はS28で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンド及びコマンド応答を再度送信の対象とすることができるので、システムの信頼性が向上する。
 以上でHTTPリクエストの送信に関する処理を終了し、図17のステップS15以降に相当する処理に進む。
Then, after all the processes up to this point are completed, the CPU 31 merges the respective parts generated in step S23 or S27, generates a multi-part HTTP request as shown in FIG. 11, and sends it to the HTTP server 12. (S29).
Note that the change of the “state” performed in step S24 or S28 may be performed after the transmission is actually finished. By doing so, even if a communication error occurs, the command and command response to be transmitted can be targeted for transmission again, so that the reliability of the system is improved.
Thus, the process related to the transmission of the HTTP request is completed, and the process proceeds to a process corresponding to step S15 and subsequent steps in FIG.

 図19は、図17のステップS15以下の部分の処理をより詳細に示すフローチャートである。図18のステップS29の次の処理は、この図ではステップS31に該当する。
 この処理においては、HTTPクライアント11のCPU31はまず、送信したHTTPリクエストに対するHTTPレスポンスの受信を待ち、HTTPサーバ12からこれを受信する(S31)。これを受信すると、そのHTTPボディを解析して各パートに分割する(S32)。
 そしてその後、分割して得た各パートを順次対象として、ステップS33乃至ステップS39の処理を繰り返す。
FIG. 19 is a flowchart showing in more detail the processing of the portion following step S15 in FIG. The processing subsequent to step S29 in FIG. 18 corresponds to step S31 in this figure.
In this process, the CPU 31 of the HTTP client 11 first waits for an HTTP response to the transmitted HTTP request, and receives it from the HTTP server 12 (S31). When this is received, the HTTP body is analyzed and divided into each part (S32).
After that, the processing of steps S33 to S39 is repeated for each of the parts obtained by division.

 この部分の処理においては、まず、対象のパートがサーバコマンドであるか否か判断する(S33)。上述したように、HTTPレスポンスには、サーバコマンドと、クライアントコマンドに対する応答とが含まれている可能性があるので、対象のパートがこのいずれであるかを判断するのである。そして、この判断は、対象のパートにSOAPActionヘッダが存在するか否か、あるいはX-SOAP-Typeヘッダの内容によって判断することができる。 In the processing of this part, first, it is determined whether or not the target part is a server command (S33). As described above, since the HTTP response may include a server command and a response to a client command, it is determined whether the target part is one of them. This determination can be made based on whether or not a SOAPAction header exists in the target part, or on the content of the X-SOAP-Type header.

 ステップS33でサーバコマンドでなければ、そのパートはクライアントコマンドに対する応答であるので、そのパートのXML文書を解析してクライアントコマンドシートに登録できる形式のデータに変換し(S34)、クライアントコマンドプール41からそのコマンド応答に対応するクライアントコマンドを探索し、そのクライアントコマンドについてのクライアントコマンドシートの「出力パラメータ」の項目にコマンド応答のデータを登録する(S35)。なお、コマンド応答には、「コマンドID」の情報として、クライアントコマンドの送信時に付したものと同じコマンドIDが付してあるものとし、クライアントコマンドの探索は、この情報をキーとして行うことができる。 If it is not a server command in step S33, since the part is a response to the client command, the XML document of the part is analyzed and converted into data in a format that can be registered in the client command sheet (S34). The client command corresponding to the command response is searched, and the data of the command response is registered in the item of “output parameter” of the client command sheet for the client command (S35). It is assumed that the command response has the same command ID as that given when the client command was transmitted as information of the “command ID”, and the client command search can be performed using this information as a key. .

 データの登録が終わると、データを登録したクライアントコマンドシートの「状態」を「応答受信済」に変更してその旨を示す(S36)。そして、「クライアントコマンド実行結果の通知先」に登録されている通知先に、応答があった旨を通知する(S37)。この通知によって、クライアントコマンドを生成したアプリケーション等は、その生成したコマンドに応答があったことを認識し、応答に応じた処理を行うことができる。 When the data registration is completed, the "status" of the client command sheet in which the data is registered is changed to "response received" to indicate that (S36). Then, a notification is sent to the notification destination registered in the “notification destination of the client command execution result” (S37). By this notification, the application or the like that has generated the client command recognizes that there has been a response to the generated command, and can perform processing according to the response.

 例えば、異常通知を発するアプリケーションがHTTPサーバ12に異常通知を行う旨のクライアントコマンドを生成した場合、このコマンドがHTTPサーバ12に送信されると、HTTPサーバ12はこれを正しく受け取った旨のコマンド応答を返してくる。そして、HTTPクライアント11側では、このコマンド応答を受信すると、ここに含まれるコマンドIDを基にどのクライアントコマンドに対する応答であるかを探索し、見つかったクライアントコマンドと対応させてそのコマンド応答を登録する。そして、そのコマンドの実行結果通知先として登録されている、異常通知を発するアプリケーションに、応答があった旨を通知するのである。アプリケーションは、この通知を受けた場合にクライアントコマンドシートを参照すれば、生成したコマンドの実行結果を「出力パラメータ」の項目から取得することができる。
 以上のステップS37までの処理が終了すると、次のパートがあればそれを対象としてステップS33からの処理を繰り返す。
For example, when an application that issues an abnormality notification generates a client command for notifying the HTTP server 12 of an abnormality, when the command is transmitted to the HTTP server 12, the HTTP server 12 responds to the command response that the HTTP server 12 has correctly received the command. Will be returned. Upon receiving this command response, the HTTP client 11 searches for a response to which client command based on the command ID included in the command response, and registers the command response in association with the found client command. . Then, an application that issues an abnormality notification, which is registered as an execution result notification destination of the command, is notified that there is a response. If the application receives this notification and refers to the client command sheet, the application can obtain the execution result of the generated command from the item of “output parameter”.
When the processing up to step S37 is completed, the processing from step S33 is repeated for the next part, if any.

 一方、ステップS33でサーバコマンドであれば、そのパートのXML文書を解析してサーバコマンドシートに登録できる形式のデータに変換し(S38)、そのサーバコマンドに対応するサーバコマンドシートを作成して、コマンドIDと共にサーバコマンドプールに登録する(S39)。ここで、サーバコマンドの内容はサーバコマンドシートの「メソッド名」及び「入力パラメータ」の項目に登録し、パートに記載されていたコマンドIDは「コマンドID」の項目に登録する。また、「サーバコマンドの通知先」の項目には、「メソッド名」に記憶させたメソッドを実行させるアプリケーション等への参照情報を、予め用意してあるメソッドとアプリケーション等との対応関係の情報を参照して登録する。「状態」の初期値は「未処理」であり、「出力パラメータ」の初期値はNULLである。 On the other hand, if the command is a server command in step S33, the XML document of the part is analyzed and converted into data in a format that can be registered in the server command sheet (S38), and a server command sheet corresponding to the server command is created. It is registered in the server command pool together with the command ID (S39). Here, the content of the server command is registered in the item of “method name” and “input parameter” of the server command sheet, and the command ID described in the part is registered in the item of “command ID”. In the item of “server command notification destination”, reference information to an application or the like for executing the method stored in the “method name” is stored. Browse and register. The initial value of “state” is “unprocessed”, and the initial value of “output parameter” is NULL.

 以上のステップS39までの処理が終了すると、次のパートがあればそれを対象としてステップS33からの処理を繰り返す。
 全てのパートについてステップS33乃至S39の処理が終了すると、図19のフローチャートに示した処理は終了する。
 以上のような処理を行うことにより、HTTPクライアント11が、HTTPサーバ12に送信すべき動作要求とHTTPサーバ12から受信した動作要求に対する動作応答とを一括してHTTPサーバ12に送信することができる。また、HTTPサーバ12からの動作要求とHTTPサーバ12に送信した動作要求に対する動作応答とを一括してHTTPサーバ12から受信して処理することができる。
When the processing up to step S39 is completed, the processing from step S33 is repeated for the next part, if any.
When the processing of steps S33 to S39 is completed for all parts, the processing shown in the flowchart of FIG. 19 ends.
By performing the above processing, the HTTP client 11 can transmit the operation request to be transmitted to the HTTP server 12 and the operation response to the operation request received from the HTTP server 12 to the HTTP server 12 collectively. . Further, an operation request from the HTTP server 12 and an operation response to the operation request transmitted to the HTTP server 12 can be collectively received from the HTTP server 12 and processed.

 なお、ここでは送信すべき全てのパートを全て生成してからマージして送信を行うようにし、また全てのパートを受信してからこれを各パートに分割して処理を行うように説明したが、このようにする必要はない。
 送信については、まず始めにHTTPヘッダを送信し、以後パートを生成するたびにそのパートを順次送信し、全てのパートの送信が完了した時点でその旨のデータを送信するようにしてもよい。このようにしても、これらの課程で送信されるデータが1つのみのHTTPヘッダを持つ論理的に連続した1つのHTTPリクエストであれば、1回のセッションで転送でき、ネゴシエーションの処理は1回で済むので、マージして送信する場合と同様な効果を得ることができる。また、送信すべきデータのバッファに必要なメモリ容量を低減できるので、低コストの通信装置で大きなデータを取り扱うことができる。
 また、受信側でも、各パートに関する処理を、各パートを受信するたびに順次行うようにすることができる。このようにした場合に容量を低減できることは、送信側の場合と同様である。
Here, it has been described that all parts to be transmitted are generated and then merged and transmitted, and that all parts are received and then divided into individual parts for processing. You don't have to do this.
Regarding transmission, an HTTP header may be transmitted first, and thereafter, each time a part is generated, the part may be transmitted sequentially, and when transmission of all the parts is completed, data indicating the transmission may be transmitted. Even in this case, if the data transmitted in these processes is one logically continuous HTTP request having only one HTTP header, it can be transferred in one session, and the negotiation process is performed once. Therefore, it is possible to obtain the same effect as in the case of transmitting by merging. Further, since the memory capacity required for the buffer of data to be transmitted can be reduced, large data can be handled by a low-cost communication device.
Also, the receiving side can sequentially perform the processing for each part each time each part is received. The capacity can be reduced in this case as in the case of the transmission side.

 次に、サーバコマンドの実行に関する処理について説明する。
 図20は、この処理の一例を示すフローチャートである。
 サーバコマンドの実行に関する処理としては、まず、図20のフローチャートに示す処理を、図19に示したステップS39の処理の後に、すなわちサーバコマンドをサーバコマンドプール42に登録した直後に行うことが考えられる。この処理において、HTTPクライアント11のCPU31は、サーバコマンド実行結果生成手段44として機能する。
Next, processing relating to execution of a server command will be described.
FIG. 20 is a flowchart showing an example of this processing.
As the processing relating to the execution of the server command, first, the processing illustrated in the flowchart of FIG. 20 may be performed after the processing of step S39 illustrated in FIG. 19, that is, immediately after the server command is registered in the server command pool 42. . In this process, the CPU 31 of the HTTP client 11 functions as a server command execution result generation unit 44.

 そして、この処理においては、まず登録したサーバコマンドについてのサーバコマンドシートの「サーバコマンドの通知先」の情報に基づいてアプリケーション等を呼び出し、「メソッド名」や「入力パラメータ」のデータを渡してサーバコマンドに関する処理を実行させる(S41)。なお、サーバコマンドに関する処理は、このフローチャートには示していないが、CPU31が別途実行することになる。
 そして、これが完了すると、実行結果をサーバコマンドシートの「出力パラメータ」の項目に登録する(S42)と共に、サーバコマンドシートの「状態」を「処理完了」に変更し、処理が完了したことを示して(S43)、もとの図19の処理に戻る。
 以上の処理を行うことにより、サーバコマンドを実行し、その結果をコマンド応答としてHTTPサーバ12に送信可能な状態にすることができる。
In this process, first, an application or the like is called based on the information of “server command notification destination” in the server command sheet for the registered server command, and data of “method name” and “input parameter” is passed to the server. A command-related process is executed (S41). It should be noted that the processing relating to the server command is not shown in this flowchart, but is executed separately by the CPU 31.
When this is completed, the execution result is registered in the "output parameter" item of the server command sheet (S42), and the "status" of the server command sheet is changed to "processing completed" to indicate that the processing is completed. (S43), and returns to the original processing of FIG.
By performing the above processing, the server command is executed, and the result can be transmitted to the HTTP server 12 as a command response.

 また、サーバコマンドの実行に関する処理としては、図19に示した処理とは独立に、図21に示す処理を実行することも考えられる。この処理においても、HTTPクライアント11のCPU31は、サーバコマンド実行結果生成手段44として機能する。
 この場合、CPU31は適当なタイミングで図21のフローチャートに示す処理を開始する。
In addition, as the processing related to the execution of the server command, the processing illustrated in FIG. 21 may be performed independently of the processing illustrated in FIG. Also in this processing, the CPU 31 of the HTTP client 11 functions as the server command execution result generation unit 44.
In this case, the CPU 31 starts the processing shown in the flowchart of FIG. 21 at an appropriate timing.

 そして、この処理においては、まずサーバコマンドプールに「状態」が「処理待ち」であるサーバコマンドシートがあるか否か判断し(SX1)、なければこのようなサーバコマンドシートが追加されるまで待機する。そして、このようなサーバコマンドシートを発見した場合、その1つを処理対象とし、そのサーバコマンドシートの「状態」を「処理中」に変更する(SX2)。
 その後、図20の場合と同様なステップS41乃至S43の処理を行って処理対象のサーバコマンドシートに記載されたサーバコマンドを実行し、これが完了するとステップSX1に戻って処理を繰り返す。
In this process, first, it is determined whether or not there is a server command sheet whose “status” is “waiting for processing” in the server command pool (SX1). If not, the process waits until such a server command sheet is added. I do. When such a server command sheet is found, one of the server command sheets is set as a processing target, and the “state” of the server command sheet is changed to “processing” (SX2).
After that, the processes in steps S41 to S43 similar to those in FIG. 20 are performed to execute the server command described in the server command sheet to be processed, and when this is completed, the process returns to step SX1 to repeat the process.

 以上の処理は、複数のスレッド(例えば4スレッド)で同時に行うようにしてもよい。処理対象となったサーバコマンドシートの「状態」は、「処理待ち」ではないため、複数のスレッドで同時に処理を行っても、1つのサーバコマンドシートを重複して処理対象としてしまうことはない。 The above processing may be performed simultaneously by a plurality of threads (for example, 4 threads). Since the “state” of the server command sheet to be processed is not “waiting for processing”, even if processing is performed simultaneously by a plurality of threads, one server command sheet is not redundantly processed.

 以上のような処理を行うようにすれば、任意のタイミングでサーバコマンドを実行することができるので、実行に時間のかかるコマンドがあった場合でも、以後の処理が滞ることがない。そして、実行の終了したものから順に、その結果をコマンド応答としてHTTPサーバ12に送信可能な状態にすることができる。
 以上で、HTTPクライアント11において実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
By performing the above processing, the server command can be executed at an arbitrary timing, so that even if there is a command that takes a long time to execute, the subsequent processing is not interrupted. The results can be sequentially transmitted to the HTTP server 12 as a command response in the order from the end of execution.
This concludes the description of the processing relating to the transfer of each command and the command response executed in the HTTP client 11.

 次に、HTTPサーバ12側の機能構成について説明する。ハードウェアについては、図7を用いて説明した通り、HTTPクライアント11と同様なものを用いることができる。従って、以下のHTTPサーバ12の説明において、ハードウェアの構成要素を指す場合には、HTTPクライアント11の場合と共通の符号を用いるものとする。
 図22は、HTTPサーバ12の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。
 図22に示す機能のうち、サーバコマンドプール141及びクライアントコマンドプール142は、いずれかの書き換え可能な記憶手段に設けられるものである。例えばSDカード34に設けることができるが、RAM33や図示しないHDD(ハードディスクドライブ)に設けてもよい。サーバコマンド生成手段143、クライアントコマンド実行結果生成手段144、送信メッセージ収集手段145、受信メッセージ分配手段148の機能は、CPU31によって実現されるものである。また、HTTPレスポンス送信手段146及びHTTPリクエスト受信手段147の機能は、CPU31及びNIC35によって実現されるものである。
Next, the functional configuration of the HTTP server 12 will be described. As the hardware, as described with reference to FIG. 7, the same hardware as the HTTP client 11 can be used. Therefore, in the following description of the HTTP server 12, when referring to hardware components, the same reference numerals as those of the HTTP client 11 are used.
FIG. 22 is a functional block diagram showing a configuration of a function for performing a process related to a command and a command response among functions of the HTTP server 12.
Among the functions shown in FIG. 22, the server command pool 141 and the client command pool 142 are provided in any rewritable storage means. For example, it can be provided in the SD card 34, but may be provided in the RAM 33 or an HDD (hard disk drive) not shown. The functions of the server command generation unit 143, the client command execution result generation unit 144, the transmission message collection unit 145, and the reception message distribution unit 148 are realized by the CPU 31. The functions of the HTTP response transmitting unit 146 and the HTTP request receiving unit 147 are realized by the CPU 31 and the NIC 35.

 これらの機能についてさらに詳述する。
 まず、サーバコマンドプール141は、HTTPサーバ12に設けた第2の記憶領域に該当し、サーバコマンドと、このコマンドに対する応答と、このコマンドの識別情報とを関連付けて登録するプールである。また、クライアントコマンドプール142は、HTTPサーバ12に設けた第1の記憶領域に該当し、クライアントコマンドと、このコマンドに対する応答と、このコマンドの識別情報とを関連付けて登録するプールである。また、これらのプールを設けた記憶手段がそれぞれHTTPサーバ12の第2,第1の記憶手段に該当するものとする。
These functions will be described in more detail.
First, the server command pool 141 corresponds to a second storage area provided in the HTTP server 12, and is a pool for registering a server command, a response to the command, and identification information of the command in association with each other. The client command pool 142 corresponds to a first storage area provided in the HTTP server 12, and is a pool in which a client command, a response to the command, and identification information of the command are registered in association with each other. It is also assumed that the storage units provided with these pools correspond to the second and first storage units of the HTTP server 12, respectively.

 サーバコマンド生成手段143は、要求生成手段に該当する。そして、サーバコマンドを生成し、このコマンドを識別する識別情報(ID)を割り当て、さらにこのコマンドを管理するための管理情報を付し、これらの情報を関連付けてテーブル形式のサーバコマンドシートとしてサーバコマンドプール141に登録する機能を有する。このうち、サーバコマンドを生成する部分には、例えばHTTPサーバ12に備えるアプリケーションが該当する。また、サーバコマンド生成手段143に、HTTPクライアント11に各コマンドを実行させる際の優先順位を生成したサーバコマンドに付する機能を設けてもよい。 The server command generation means 143 corresponds to a request generation means. Then, a server command is generated, identification information (ID) for identifying the command is assigned, management information for managing the command is added, and the information is associated with the server command as a server command sheet in a table format. It has a function of registering in the pool 141. Among these, the part that generates the server command corresponds to, for example, an application provided in the HTTP server 12. In addition, the server command generation unit 143 may be provided with a function of assigning a priority to the generated server command when causing the HTTP client 11 to execute each command.

 ここで、図23にHTTPサーバ12のサーバコマンドシートにおけるデータ構造の例を示す。
 この図に示すように、HTTPサーバ12のサーバコマンドシートには、このサーバコマンドシートに記載するコマンドがサーバコマンドであり、その送信先やコマンド応答の送信元がHTTPクライアント11である点で若干異なるが、図9に示したHTTPクライアント11のクライアントコマンドシートとほぼ同様なデータを記憶する領域を設けている。「サーバコマンド実行結果の通知先」については、このシートに記載しているコマンドがサーバコマンドであることに伴って項目の名称が異なるが、内容は図9の「クライアントコマンド実行結果の通知先」と同様なものである。
Here, FIG. 23 shows an example of the data structure in the server command sheet of the HTTP server 12.
As shown in this figure, the server command sheet of the HTTP server 12 is slightly different in that the command described in the server command sheet is a server command, and the transmission destination and the transmission source of the command response are the HTTP client 11. However, an area for storing data substantially similar to the client command sheet of the HTTP client 11 shown in FIG. 9 is provided. Regarding the “server command execution result notification destination”, the names of the items differ according to the fact that the command described in this sheet is a server command, but the content is “client command execution result notification destination” in FIG. Is similar to

 図22の説明に戻ると、クライアントコマンド実行結果生成手段144は、応答生成手段に該当する。そして、クライアントコマンドプール142からクライアントコマンドを読み出して実行するアプリケーションである。そして、クライアントコマンドに対する応答を生成し、クライアントコマンドのコマンドIDと関連付けてクライアントコマンドプール142に登録する機能を有する。なお、HTTPクライアント11から受信したクライアントコマンドは、このコマンドを識別するID及びこのコマンドを管理するための管理情報と関連付けて、テーブル形式のクライアントコマンドシートとしてクライアントコマンドプール142に登録しておくようにしている。そして、クライアントコマンド実行結果生成手段144が生成したコマンド応答も、実行したクライアントコマンドについてのクライアントコマンドシートに登録する。 {Returning to the description of FIG. 22, the client command execution result generation unit 144 corresponds to a response generation unit. The application reads a client command from the client command pool 142 and executes it. Then, it has a function of generating a response to the client command and registering the response in the client command pool 142 in association with the command ID of the client command. The client command received from the HTTP client 11 is registered in the client command pool 142 as a client command sheet in a table format in association with an ID for identifying the command and management information for managing the command. ing. Then, the command response generated by the client command execution result generation unit 144 is also registered in the client command sheet for the executed client command.

 また、クライアントコマンド実行結果生成手段144に、クライアントコマンドプール142から複数の種類のクライアントコマンドを読み出し、各クライアントコマンドに対する応答を生成する機能を設けることが考えられる。さらに、クライアントコマンドがHTTPサーバ12に優先して処理を実行させるための実行優先順位の情報を含む場合には、優先順位の高いものから優先的に読み出して実行する機能を設けることも考えられる。
 なお、クライアントコマンド実行結果生成手段144は、アプリケーションそのものではなく、クライアントコマンドの実行に必要なアプリケーションを呼び出してコマンドを実行させるモジュールであってもよい。
Further, it is conceivable to provide the client command execution result generation means 144 with a function of reading a plurality of types of client commands from the client command pool 142 and generating a response to each client command. Further, when the client command includes information on the execution priority for causing the HTTP server 12 to execute the processing with priority, it is conceivable to provide a function of reading and executing the command with the highest priority.
Note that the client command execution result generation unit 144 may be a module that calls up an application necessary for executing a client command and executes the command, instead of the application itself.

 ここで、図24にHTTPサーバ12のクライアントコマンドシートにおけるデータ構造の例を示す。
 この図に示すように、HTTPサーバ12のクライアントコマンドシートには、このクライアントコマンドシートに記載するコマンドがクライアントコマンドであり、その送信元やコマンド応答の送信先がHTTPクライアント11である点で若干異なるが、図10に示したHTTPクライアント11のサーバコマンドシートとほぼ同様なデータを記憶する領域を設けている。「クライアントコマンドの通知先」については、このシートに記載しているコマンドがサーバコマンドであることに伴って項目の名称が異なるが、内容は図10の「サーバコマンドの通知先」と同様なものである。
Here, FIG. 24 shows an example of the data structure in the client command sheet of the HTTP server 12.
As shown in this figure, the client command sheet of the HTTP server 12 is slightly different in that the command described in the client command sheet is a client command, and the source of the command and the destination of the command response are the HTTP client 11. However, an area for storing data substantially similar to the server command sheet of the HTTP client 11 shown in FIG. 10 is provided. Regarding the “client command notification destination”, the names of the items differ according to the fact that the command described in this sheet is a server command, but the content is the same as the “server command notification destination” in FIG. It is.

 再び図22の説明に戻ると、送信メッセージ収集手段145は、収集手段に該当する。そして、クライアントコマンド実行結果生成手段144が生成したコマンド応答とこのコマンド応答に対応するクライアントコマンドのコマンドIDとを関連付けてクライアントコマンドプール42から読み出すと共に、サーバコマンド生成手段143が生成したサーバコマンドとこのコマンドのコマンドIDとを関連付けてサーバコマンドプール141から読み出し、これらから送信メッセージを生成する機能を有する。
 なお、コマンド応答やサーバコマンドに実行優先順位が指定されている場合には、送信メッセージ収集手段145がそれぞれ実行優先順位の高いものから順に読み出すようにすることが考えられる。
 送信メッセージの形式については、HTTPクライアント11の場合と同様である。
Returning to the description of FIG. 22 again, the transmission message collecting unit 145 corresponds to the collecting unit. Then, the command response generated by the client command execution result generation unit 144 and the command ID of the client command corresponding to this command response are read out from the client command pool 42 in association with each other, and the server command generated by the server command generation unit 143 and the It has a function of reading out the server command pool 141 in association with the command ID of the command and generating a transmission message from these.
When the execution priority is specified in the command response or the server command, the transmission message collection unit 145 may read out the transmission message in descending order of execution priority.
The format of the transmission message is the same as that of the HTTP client 11.

 また、HTTPレスポンス送信手段146は、送信手段に該当し、送信メッセージ収集手段145が生成した送信メッセージを含むHTTPレスポンスを、HTTPクライアント11から受信したHTTPリクエストに対する通信応答として生成し、HTTPクライアント11に送信する機能を有する。このとき、1つのHTTPレスポンスに送信メッセージをいくつ含めてもよいし、コマンド応答に係る送信メッセージとサーバコマンドに係る送信メッセージとを任意に混在させることもできる。
 そこで、HTTPレスポンス送信手段146は、これらのいずれに係る送信メッセージかに関わり無く、送信メッセージ収集手段145が生成した全ての送信メッセージを1つのHTTPレスポンスに含めて送信するようにしている。ただし、1つのHTTPレスポンスに含める送信メッセージの数に上限を設けることも考えられる。
The HTTP response transmission unit 146 corresponds to the transmission unit, generates an HTTP response including the transmission message generated by the transmission message collection unit 145 as a communication response to the HTTP request received from the HTTP client 11, and sends the HTTP response to the HTTP client 11. It has a function to send. At this time, any number of transmission messages may be included in one HTTP response, or a transmission message relating to a command response and a transmission message relating to a server command may be arbitrarily mixed.
Therefore, the HTTP response transmission unit 146 transmits all transmission messages generated by the transmission message collection unit 145 in one HTTP response, regardless of which of these transmission messages. However, it is also conceivable to set an upper limit on the number of transmission messages included in one HTTP response.

 ところで、HTTPレスポンスの送信は、送信メッセージ収集手段145がサーバコマンドやコマンド応答等の読み出しを試みた場合には、読み出すデータがなく、結果的に送信すべきSOAPメッセージを生成しなかった場合にも行うものである。そして、この読み出しの試みは、HTTPクライアント11からのHTTPリクエストを受信した場合に行うものとする。
 このようにするのは、上述のように、HTTPサーバ12からファイアウォール14を越えてHTTPクライアント11にHTTPリクエストを送信することができないためである。
Incidentally, the transmission of the HTTP response is performed even when the transmission message collection unit 145 attempts to read a server command, a command response, or the like, when there is no data to be read, and as a result, when the SOAP message to be transmitted is not generated. Is what you do. The reading attempt is performed when an HTTP request from the HTTP client 11 is received.
This is because the HTTP request cannot be transmitted from the HTTP server 12 to the HTTP client 11 across the firewall 14 as described above.

 HTTPリクエスト受信手段147は、受信手段に該当し、HTTPクライアント11からのHTTPリクエストを受信する機能を有する。そしてここでは、HTTPリクエストには、クライアントコマンド及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージと、サーバコマンドに対する応答及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージとが、任意に混在して含まれている。
 ここで、受信メッセージとは、上記のコマンドや応答とコマンドIDとをSOAPメッセージとして記載したものである。
The HTTP request receiving unit 147 corresponds to a receiving unit, and has a function of receiving an HTTP request from the HTTP client 11. Here, in the HTTP request, a received message including a client command and a command ID associated with the command, and a received message including a response to the server command and a command ID associated with the command are arbitrarily mixed. Included.
Here, the received message describes the command or response and the command ID as a SOAP message.

 受信メッセージ分配手段148は、分配手段に該当する。そして、HTTPリクエスト受信手段147が受信したHTTPリクエストに含まれるデータを、サーバコマンドプール141及びクライアントコマンドプール142に振り分けて登録する機能を有する。
 具体的には、クライアントコマンド及びそのコマンドと関連付けられたコマンドIDとをクライアントコマンドプール142にクライアントコマンドシートを設けて登録すると共に、サーバコマンドに対する応答については、そのコマンドと関連付けられたコマンドIDをサーバコマンドプール141に記憶しているサーバコマンドシートのコマンドIDと照合して対応するサーバコマンドを特定し、そのサーバコマンドについての「出力パラメータ」として登録する。
The received message distribution means 148 corresponds to the distribution means. Then, it has a function of distributing and registering data included in the HTTP request received by the HTTP request receiving unit 147 to the server command pool 141 and the client command pool 142.
Specifically, a client command and a command ID associated with the command are registered in a client command pool 142 by providing a client command sheet. In response to a server command, a command ID associated with the command is registered in the server A server command corresponding to the command ID of the server command sheet stored in the command pool 141 is identified, and the corresponding server command is specified, and registered as an “output parameter” for the server command.

 そしてこのとき、HTTPリクエストを分割してそこに含まれる各受信メッセージを取り出し、そのデータをテーブルへの登録に必要な形式に変換するが、この変換は、WSDLに基づいて生成される所要の変換プログラム(デシリアライザ)を実行することによって行うことができる。
 このような機能を有するHTTPサーバ12が受信するHTTPリクエストは、HTTPクライアント11から送信されてくるものであるので、例えばHTTPクライアント11の機能の説明中で図11を用いて説明したものである。HTTPサーバ12が送信するHTTPレスポンスも、HTTPクライアント11に対して送信し、HTTPクライアント11が受信するものであるので、例えば図12を用いて説明したものである。これらに含まれるパートの内容も、図13乃至図16を用いて説明したようなものとなる。
At this time, the HTTP request is divided, each received message included therein is extracted, and the data is converted into a format required for registration in a table. This conversion is performed by a required conversion generated based on WSDL. This can be performed by executing a program (deserializer).
Since the HTTP request received by the HTTP server 12 having such a function is transmitted from the HTTP client 11, it is described with reference to FIG. 11 in the description of the function of the HTTP client 11, for example. The HTTP response transmitted by the HTTP server 12 is also transmitted to the HTTP client 11 and received by the HTTP client 11, and thus is described with reference to FIG. 12, for example. The contents of the parts included therein are also as described with reference to FIGS.

 次に、以上説明したような構成及び機能を有するHTTPサーバ12において実行する処理について、図25乃至図29のフローチャートを用いて説明する。これらのフローチャートに示す処理は、HTTPサーバ12のCPU31が所要の制御プログラムを実行することによって行うものである。 Next, the processing executed in the HTTP server 12 having the above-described configuration and function will be described with reference to the flowcharts in FIGS. The processing shown in these flowcharts is performed by the CPU 31 of the HTTP server 12 executing a required control program.

 まず、図25にメッセージの収集及び分配処理の基本動作のフローチャートを示す。
 HTTPサーバ12のCPU31は、HTTPクライアント11からHTTPリクエストが送信されてくると、図25のフローチャートに示す処理を開始する。
 そして、まずそのHTTPリクエストを受信する(S111)。そして、受信したHTTPリクエストのHTTPボディを各パートに分割する(S112)。ここで、各パートへの分割は、「MIME_boundary」で区分された要素に分割することであり、またここで全てのパートに関して分割する。
First, FIG. 25 shows a flowchart of the basic operation of message collection and distribution processing.
When the HTTP request is transmitted from the HTTP client 11, the CPU 31 of the HTTP server 12 starts the processing shown in the flowchart of FIG.
Then, first, the HTTP request is received (S111). Then, the HTTP body of the received HTTP request is divided into each part (S112). Here, division into each part is to divide into elements divided by “MIME_boundary”, and here, division is performed for all parts.

 そしてその後、分割して得た全てのパートを順に対象として、ステップS113乃至S115の処理を繰り返す。この処理においては、まず対象のパートがクライアントコマンドを記載したパートか否か判断する(S113)。そして、クライアントコマンドであればクライアントコマンド登録処理を行う(S114)。また、クライアントコマンドでないときは、サーバコマンドに対する応答が記載されたパートであるので、応答通知処理を行う(S115)。 {Circle around (4)} Then, the processing of steps S113 to S115 is repeated for all the parts obtained by the division in order. In this processing, first, it is determined whether or not the target part is a part in which a client command is described (S113). If it is a client command, a client command registration process is performed (S114). If the received command is not a client command, it is a part in which a response to the server command is described, so that a response notification process is performed (S115).

 ステップS114又はS115の後は、ステップS113に戻り、次のパートを対象として処理を繰り返す。そして、全てのパートについてこれらの処理を行った時点で、次のステップS116に進む。
 ここまでの処理において、ステップS111及びS112ではCPU31はHTTPリクエスト受信手段147として機能し、ステップS113乃至S115では受信メッセージ分配手段148として機能する。
After step S114 or S115, the process returns to step S113, and the process is repeated for the next part. Then, when these processes are performed for all parts, the process proceeds to the next step S116.
In the processing so far, the CPU 31 functions as the HTTP request receiving unit 147 in steps S111 and S112, and functions as the received message distribution unit 148 in steps S113 to S115.

 次に、CPU31はサーバコマンドの収集処理を行う(S116)。この処理は、サーバコマンドプール41からHTTPクライアント11に送信すべきサーバコマンドを収集する処理であり、収集したデータからSOAPエンベロープによるパートを生成する処理を含む。
 次に、クライアントコマンドに対する応答であるクライアントコマンド実行結果の収集処理を行う(S117)。この処理は、クライアントコマンドプールからHTTPクライアント11に送信すべきコマンド応答を収集する処理であり、やはり収集したデータからSOAPエンベロープによるパートを生成する処理を含む。
Next, the CPU 31 performs a server command collection process (S116). This process is a process of collecting server commands to be transmitted to the HTTP client 11 from the server command pool 41, and includes a process of generating a SOAP envelope part from the collected data.
Next, a collection process of a client command execution result, which is a response to the client command, is performed (S117). This process is a process of collecting a command response to be transmitted to the HTTP client 11 from the client command pool, and also includes a process of generating a SOAP envelope part from the collected data.

 その後、ステップS116及びS117の処理で生成したパートを1つにマージして、すべてのパートを含むHTTPレスポンスを生成し(S118)、そのHTTPレスポンスを、ステップS111で受信したHTTPリクエストに対する通信応答としてHTTPクライアント11に送信して(S119)処理を終了する。
 ここまでの処理において、ステップS116及びS117ではCPU31は送信メッセージ収集手段145として機能し、ステップS118及びS119ではHTTPレスポンス送信手段146として機能する。
Thereafter, the parts generated in the processes of steps S116 and S117 are merged into one, an HTTP response including all the parts is generated (S118), and the HTTP response is used as a communication response to the HTTP request received in step S111. The data is transmitted to the HTTP client 11 (S119), and the process ends.
In the processing so far, the CPU 31 functions as the transmission message collection unit 145 in steps S116 and S117, and functions as the HTTP response transmission unit 146 in steps S118 and S119.

 次に、図25のフローチャートに示した処理について、一部分ずつより詳細に示したフローチャートを用いて説明する。
 図26は、図25のステップS111乃至S115の部分の処理をより詳細に示したフローチャートである。
 この処理においては、HTTPサーバ12のCPU31はまず、HTTPクライアント
から送信されてきたHTTPリクエストを受信する(S121)。そして、これを受信すると、そのHTTPボディを解析して各パートに分割する(S122)。
 そしてその後、分割して得た各パートを順次対象として、ステップS123乃至ステップS129の処理を繰り返す。
Next, the processing shown in the flowchart of FIG. 25 will be described with reference to a flowchart showing a part of the processing in more detail.
FIG. 26 is a flowchart showing the processing of steps S111 to S115 in FIG. 25 in more detail.
In this process, the CPU 31 of the HTTP server 12 first receives an HTTP request transmitted from an HTTP client (S121). Then, when this is received, the HTTP body is analyzed and divided into each part (S122).
After that, the processing of steps S123 to S129 is repeated for each of the parts obtained by division.

 この部分の処理においては、まず、対象のパートがクライアントコマンドであるか否か判断する(S123)。上述したように、HTTPリクエストには、クライアントコマンドと、サーバコマンドに対する応答とが含まれている可能性があるので、対象のパートがこのいずれであるかを判断するのである。そして、この判断は、対象のパートにSOAPActionヘッダが存在するか否か、あるいはX-SOAP-Typeヘッダの内容によって判断することができる。 In the processing of this part, first, it is determined whether or not the target part is a client command (S123). As described above, since the HTTP request may include a client command and a response to a server command, it is determined which of the target parts is the HTTP command. This determination can be made based on whether or not a SOAPAction header exists in the target part, or on the content of the X-SOAP-Type header.

 ステップS123でクライアントコマンドでなければ、そのパートはサーバコマンドに対する応答のパートであるので、そのパートのXML文書を解析してサーバコマンドシートに登録できる形式のデータに変換し(S124)、サーバコマンドプール141からそのコマンド応答に対応するサーバコマンドを探索し、そのサーバコマンドについてのサーバコマンドシートの「出力パラメータ」の項目にコマンド応答のデータを登録する(S125)。なお、コマンド応答には、「コマンドID」の情報として、サーバコマンドの送信時に付したものと同じコマンドIDが付してあるものとし、サーバコマンドの探索は、この情報をキーとして行うことができる。 If it is not a client command in step S123, since the part is a response part to the server command, the XML document of the part is analyzed and converted into data in a format that can be registered in the server command sheet (S124), and the server command pool The server command corresponding to the command response is searched for from 141, and the data of the command response is registered in the item of "output parameter" of the server command sheet for the server command (S125). It is assumed that the command response has the same command ID as that given at the time of transmission of the server command as information of “command ID”, and the search for the server command can be performed using this information as a key. .

 データの登録が終わると、データを登録したサーバコマンドシートの「状態」を「応答受信済」に変更してその旨を示す(S126)。そして、「サーバコマンド実行結果の通知先」に登録されている通知先に、応答があった旨を通知する(S127)。この通知によって、サーバコマンドを生成したアプリケーション等は、その生成したコマンドに応答があったことを認識し、応答に応じた処理を行うことができる。 When the data registration is completed, the “status” of the server command sheet in which the data is registered is changed to “response received” to indicate that (S126). Then, a notification is sent to the notification destination registered in "notification destination of server command execution result" (S127). By this notification, the application or the like that has generated the server command recognizes that there has been a response to the generated command, and can perform processing according to the response.

 例えば、HTTPクライアント11での異常発生に対応するアプリケーションがHTTPクライアント11の温度センサのセンサ値を取得するサーバコマンドを生成した場合、このコマンドがHTTPクライアント11に送信されると、HTTPクライアント11は要求されたセンサ値を含むコマンド応答を返してくる。そして、HTTPサーバ12側では、このコマンド応答を受信すると、ここに含まれるコマンドIDを基にどのサーバコマンドに対する応答であるかを探索し、見つかったサーバコマンドと対応させてそのコマンド応答を登録する。そして、そのコマンドの実行結果通知先として登録されている、異常発生に対応するアプリケーションに、応答があった旨を通知するのである。アプリケーションは、この通知を受けた場合にサーバコマンドシートを参照すれば、生成したコマンドの実行結果を「出力パラメータ」の項目から取得することができる。
 以上のステップS127までの処理が終了すると、次のパートがあればそれを対象としてステップS123からの処理を繰り返す。
For example, when an application corresponding to the occurrence of an abnormality in the HTTP client 11 generates a server command for acquiring a sensor value of a temperature sensor of the HTTP client 11, when the command is transmitted to the HTTP client 11, the HTTP client 11 issues a request. A command response including the obtained sensor value is returned. When the HTTP server 12 receives the command response, the HTTP server 12 searches for a response to the server command based on the command ID included in the command response, and registers the command response in association with the found server command. . Then, the application corresponding to the occurrence of the abnormality registered as the execution result notification destination of the command is notified that there is a response. If the application receives the notification and refers to the server command sheet, the application can obtain the execution result of the generated command from the item of “output parameter”.
When the processing up to step S127 is completed, the processing from step S123 is repeated for the next part, if any.

 一方、ステップS123でクライアントコマンドであれば、そのパートのXML文書を解析してクライアントコマンドシートに登録できる形式のデータに変換し(S128)、そのクライアントコマンドに対応するクライアントコマンドシートを作成して、コマンドIDと共にクライアントコマンドプールに登録する(S129)。ここで、クライアントコマンドの内容はクライアントコマンドシートの「メソッド名」及び「入力パラメータ」の項目に登録し、パートに記載されていたコマンドIDは「コマンドID」の項目に登録する。また、「クライアントコマンドの通知先」の項目には、「メソッド名」に記憶させたメソッドを実行させるアプリケーション等への参照情報を、予め用意してあるメソッドとアプリケーション等との対応関係の情報を参照して登録する。「状態」の初期値は「未処理」であり、「出力パラメータ」の初期値はNULLである。 On the other hand, if it is a client command in step S123, the XML document of the part is analyzed and converted into data in a format that can be registered in the client command sheet (S128), and a client command sheet corresponding to the client command is created. It is registered in the client command pool together with the command ID (S129). Here, the content of the client command is registered in the item of “method name” and “input parameter” of the client command sheet, and the command ID described in the part is registered in the item of “command ID”. In the item of “client command notification destination”, reference information to an application or the like that executes the method stored in the “method name” is stored, and information on the correspondence between the previously prepared method and the application is stored. Browse and register. The initial value of “state” is “unprocessed”, and the initial value of “output parameter” is NULL.

 以上のステップS129までの処理が終了すると、次のパートがあればそれを対象としてステップS123からの処理を繰り返す。
 全てのパートについてステップS123乃至S129の処理が終了すると、図26のフローチャートに示した処理は終了する。
 以上でHTTPリクエストの受信に関する処理を終了し、図25のステップS116以降に相当する処理に進む。
When the processing up to step S129 is completed, the processing from step S123 is repeated for the next part, if any.
When the processing of steps S123 to S129 is completed for all parts, the processing shown in the flowchart of FIG. 26 ends.
Thus, the processing related to the reception of the HTTP request is completed, and the process proceeds to the processing corresponding to step S116 and subsequent steps in FIG.

 図27は、図25のステップS116以降の部分の処理をより詳細に示すフローチャートである。図26のステップS127又はS129の次の処理は、この図ではステップS131に該当する。
 この処理においては、HTTPサーバ12のCPU31はまず、サーバコマンドプール141から、「状態」が「未送信」であるサーバコマンドシートの「メソッド名」と「入力パラメータ」の内容を、送信すべきサーバコマンドとして収集し、「コマンドID」の内容もそのコマンドのコマンドIDとして収集する(S131)。HTTPサーバ12においては、「未送信」という「状態」は、コマンドがサーバコマンド生成手段143によって生成された後、まだHTTPクライアント11に通知されていないことを示すものであるので、これを基準にHTTPクライアント11に送信すべきコマンドを抽出できる。
FIG. 27 is a flowchart showing in more detail the processing of the part after step S116 in FIG. The processing subsequent to step S127 or S129 in FIG. 26 corresponds to step S131 in this figure.
In this process, the CPU 31 of the HTTP server 12 first transmits, from the server command pool 141, the contents of the “method name” and the “input parameter” of the server command sheet whose “status” is “not transmitted” to the server to be transmitted. It is collected as a command, and the contents of “command ID” are also collected as the command ID of the command (S131). In the HTTP server 12, the "status" of "not sent" indicates that the command has not been notified to the HTTP client 11 after the command has been generated by the server command generating means 143. A command to be transmitted to the HTTP client 11 can be extracted.

 その後、ステップS131で収集した全てのサーバコマンドを順次対象として、ステップS132乃至S134の処理を繰り返す。これらの処理においては、まず対象のサーバコマンドとそのコマンドIDとを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書に変換し(S132)、対象のコマンドに関するパートとなるSOAPエンベロープを生成する(S133)。そして、対象のサーバコマンドを記載していたサーバコマンドシートの「状態」を「応答待ち」に変更する(S134)。ここでの「応答待ち」という「状態」は、コマンドをHTTPクライアント11に通知済であることを示すものである。 (4) Thereafter, the processing of steps S132 to S134 is repeated for all the server commands collected in step S131. In these processes, first, the target server command and its command ID are converted into an XML document in which the information is included in the SOAP body and the SOAP header, respectively (S132), and the SOAP envelope which is a part related to the target command is converted. Is generated (S133). Then, the "status" of the server command sheet describing the target server command is changed to "waiting for response" (S134). Here, the “state” of “waiting for response” indicates that the command has been notified to the HTTP client 11.

 これらが全て完了した後、CPU31は、クライアントコマンドプール142から、「状態」が「処理完了」であるクライアントコマンドシートの「出力パラメータ」の内容を、クライアントコマンドに対するコマンド応答のうち送信すべきものとして収集し、「コマンドID」の内容も、対応するクライアントコマンドのコマンドIDとして収集する(S135)。HTTPサーバ12においては、「処理完了」という「状態」は、クライアントコマンドに対応する処理がクライアントコマンド実行結果生成手段144によって生成された後、まだHTTPクライアント11に通知されていないことを示すものであるので、これを基準にHTTPクライアント11に送信すべきコマンド応答を抽出できる。 After completing these, the CPU 31 collects the contents of the “output parameters” of the client command sheet whose “status” is “processing completed” from the client command pool 142 as a command response to the client command to be transmitted. Then, the contents of the “command ID” are also collected as the command ID of the corresponding client command (S135). In the HTTP server 12, the “state” of “processing completed” indicates that the processing corresponding to the client command has been generated by the client command execution result generating unit 144 and has not yet been notified to the HTTP client 11. Therefore, a command response to be transmitted to the HTTP client 11 can be extracted based on this.

 その後、ステップS135で収集した全てのコマンド応答を順次対象として、ステップS136乃至S138の処理を繰り返す。これらの処理は、まず対象のコマンド応答とその応答と共に収集したコマンドIDとを、これらの情報がSOAPボディとSOAPヘッダとにそれぞれ含まれるXML文書に変換し(S136)、対象のコマンド応答に関するパートとなるSOAPエンベロープを生成する(S137)処理である。これらの処理は、対象が異なる点以外はステップS132及びS133の処理と同じものである。そして、次に対象のコマンド応答を記載していたクライアントコマンドシートの「状態」を「応答済」に変更する(S138)。「応答済」という「状態」は、ここではコマンド応答をHTTPクライアント11に通知済であることを示すものである。 Thereafter, the processing of steps S136 to S138 is repeated for all command responses collected in step S135. In these processes, first, the target command response and the command ID collected together with the response are converted into an XML document in which the information is respectively included in the SOAP body and the SOAP header (S136). This is the process of generating a SOAP envelope (S137). These processes are the same as the processes of steps S132 and S133 except that the targets are different. Then, the “status” of the client command sheet describing the target command response is changed to “responded” (S138). The “state” of “responded” indicates that the command response has been notified to the HTTP client 11 here.

 そして、ここまでの処理が全て完了した後、CPU31は、ステップS133又はS137で生成した各パートをマージし、図12に示したようなマルチパートのHTTPレスポンスを生成してHTTPクライアント11に送信する。
 なお、ステップS134又はS138で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンド及びコマンド応答を再度送信の対象とすることができるので、システムの信頼性が向上する。
Then, after all the processes up to this point are completed, the CPU 31 merges the parts generated in step S133 or S137, generates a multi-part HTTP response as shown in FIG. 12, and transmits the multi-part HTTP response to the HTTP client 11. .
Note that the change of the “state” performed in step S134 or S138 may be performed after the transmission is actually finished. By doing so, even if a communication error occurs, the command and command response to be transmitted can be targeted for transmission again, so that the reliability of the system is improved.

 なお、ここでは送信すべきパートを全て生成してからマージして送信を行うようにし、また全てのパートを受信してからこれを各パートに分割して処理を行うように説明したが、このようにする必要はない。各パートを生成するたびに順次送信するようにしたり、各パートを受信するたびに順次各パートに関する処理を行うようにしてもよいことは、HTTPクライアント11の場合と同様である。 Here, it has been described that all parts to be transmitted are generated and then merged for transmission, and that all parts are received and then divided into individual parts for processing. You don't have to. It is the same as the case of the HTTP client 11 that the transmission may be sequentially performed each time each part is generated, or the processing regarding each part may be sequentially performed each time each part is received.

 次に、クライアントコマンドの実行に関する処理について説明する。
 図28は、この処理の一例を示すフローチャートである。
 クライアントコマンドの実行に関する処理としては、まず、図28のフローチャートに示す処理を、図27に示したステップS129の処理の後に、すなわちクライアントコマンドをクライアントコマンドプール42に登録した直後に行うことが考えられる。この処理において、HTTPサーバ12のCPU31は、クライアントコマンド実行結果生成手段144として機能する。
Next, processing relating to execution of a client command will be described.
FIG. 28 is a flowchart showing an example of this processing.
As the processing related to the execution of the client command, first, the processing shown in the flowchart of FIG. 28 may be performed after the processing of step S129 shown in FIG. 27, that is, immediately after the client command is registered in the client command pool 42. . In this process, the CPU 31 of the HTTP server 12 functions as a client command execution result generation unit 144.

 そして、この処理においては、まず登録したクライアントコマンドについてのクライアントコマンドシートの「クライアントコマンドの通知先」の情報に基づいてアプリケーション等を呼び出し、「メソッド名」や「入力パラメータ」のデータを渡してクライアントコマンドに関する処理を実行させる(S141)。なお、クライアントコマンドに関する処理は、このフローチャートには示していないが、CPU31が別途実行することになる。 In this process, first, an application or the like is called based on the information of the “client command notification destination” in the client command sheet for the registered client command, and data of the “method name” and the “input parameter” is passed to the client. The processing related to the command is executed (S141). Although not shown in the flowchart, the processing related to the client command is separately executed by the CPU 31.

 そして、これが完了すると、実行結果をクライアントコマンドシートの「出力パラメータ」の項目に登録する(S142)と共に、クライアントコマンドシートの「状態」を「処理完了」に変更し、処理が完了したことを示して(S143)、もとの図27の処理に戻る。
 以上の処理を行うことにより、クライアントコマンドを実行し、その結果をコマンド応答としてHTTPクライアント11に送信可能な状態にすることができる。
When this is completed, the execution result is registered in the “output parameter” item of the client command sheet (S142), and the “state” of the client command sheet is changed to “processing completed”, indicating that the processing is completed. (S143), and returns to the original process of FIG.
By performing the above processing, the client command is executed, and the result can be transmitted to the HTTP client 11 as a command response.

 また、クライアントコマンドの実行に関する処理としては、図27に示した処理とは独立に、図29に示す処理を実行することも考えられる。この処理においても、HTTPサーバ12のCPU31は、クライアントコマンド実行結果生成手段144として機能する。
 この場合、CPU31は適当なタイミングで図29のフローチャートに示す処理を開始する。
Further, as the processing relating to the execution of the client command, it is also conceivable to execute the processing shown in FIG. 29 independently of the processing shown in FIG. Also in this processing, the CPU 31 of the HTTP server 12 functions as the client command execution result generation unit 144.
In this case, the CPU 31 starts the processing shown in the flowchart of FIG. 29 at an appropriate timing.

 そして、この処理においては、まずクライアントコマンドプールに「状態」が「処理待ち」であるクライアントコマンドシートがあるか否か判断し(SY1)、なければこのようなクライアントコマンドシートが追加されるまで待機する。そして、このようなクライアントコマンドシートを発見した場合、その1つを処理対象とし、そのクライアントコマンドシートの「状態」を「処理中」に変更する(SY2)。
 その後、図28の場合と同様なステップS141乃至S143の処理を行って処理対象のクライアントコマンドシートに記載されたクライアントコマンドを実行し、これが完了するとステップSY1に戻って処理を繰り返す。
 以上の処理を複数のスレッドで同時に行うようにしてもよいことは、HTTPクライアント11の場合と同様である。
In this process, first, it is determined whether or not there is a client command sheet whose “status” is “waiting for processing” in the client command pool (SY1). I do. When such a client command sheet is found, one of the client command sheets is set as a processing target, and the “state” of the client command sheet is changed to “processing” (SY2).
After that, the processes in steps S141 to S143 similar to those in FIG. 28 are performed to execute the client command described in the client command sheet to be processed, and when this is completed, the process returns to step SY1 to repeat the process.
The above processing may be performed simultaneously by a plurality of threads as in the case of the HTTP client 11.

 以上のような処理を行うようにすれば、任意のタイミングでクライアントコマンドを実行することができるので、実行に時間のかかるコマンドがあった場合でも、以後の処理が滞ることがない。そして、実行の終了したものから順に、その結果をコマンド応答としてHTTPクライアント11に送信可能な状態にすることができる。
 以上で、HTTPサーバ12において実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
By performing the above processing, the client command can be executed at an arbitrary timing, so that even if there is a command that takes a long time to execute, the subsequent processing is not interrupted. The results can be sequentially transmitted to the HTTP client 11 as a command response in the order from the end of the execution.
This concludes the description of the processing relating to transfer of each command and command response, which is executed in the HTTP server 12.

 HTTPクライアント11とHTTPサーバ12とに以上説明してきたような各機能を設け、各処理を行わせることにより、送信元から通信相手に送信すべき動作要求と、通信相手から受信した動作要求に対する動作応答とを、一括して通信相手に送信することができるので、動作要求の送信と動作応答の送信とについて別々にネゴシエーションを行って通信のコネクションを確立する必要がなく、通信のオーバーヘッドを低減して通信効率を高めることができる。 The HTTP client 11 and the HTTP server 12 are provided with the respective functions as described above, and by performing the respective processes, an operation request to be transmitted from the transmission source to the communication partner and an operation for the operation request received from the communication partner are performed. Since the response and the response can be transmitted to the communication partner at the same time, it is not necessary to negotiate separately the transmission of the operation request and the transmission of the operation response to establish a communication connection, thereby reducing the communication overhead. Communication efficiency.

 また、動作要求と動作応答とを一括して送信できるのは、これらをそれぞれ直列化したデータに変換し、構造化言語形式で記載した送信メッセージに変換しているためである。このようにしたことにより、フォーマットの異なる動作要求と動作応答とを容易に結合し、論理的に1つの送信内容として送信することができるのである。
 また、このようにしたことにより、受信側でも、通信相手に送信した動作要求に対する動作応答と通信相手からの動作要求とを一括して受信し、その受信した内容を容易に個々のメッセージに分離し、それが動作要求であるか動作応答であるかに応じて適切な処理を行うことができる。
The reason why the operation request and the operation response can be transmitted collectively is that they are converted into serialized data and converted into a transmission message described in a structured language format. With this configuration, the operation request and the operation response having different formats can be easily combined and logically transmitted as one transmission content.
In addition, the receiving side collectively receives the operation response to the operation request transmitted to the communication partner and the operation request from the communication partner, and easily separates the received content into individual messages. However, appropriate processing can be performed depending on whether the request is an operation request or an operation response.

 さらに、通信要求を常に一方の装置から発して通信を行い、その通信相手から通信要求元への動作要求等の送信は、その通信要求に対する応答として行うようにすれば、通信要求を発する側の装置(通信クライアント)がファイアウォールの内側に設けられているような通信システムであっても、ファイアウォールの存在を意識せずに動作要求及び動作応答の送受信を行うことができる。また、通信要求と通信応答とが対応しているため、通信のレベルでのタイミング管理が容易である。 Furthermore, if a communication request is always issued from one device to perform communication, and the transmission of an operation request or the like from the communication partner to the communication request source is performed as a response to the communication request, the communication requesting side can send the request. Even in a communication system in which a device (communication client) is provided inside a firewall, an operation request and an operation response can be transmitted and received without being aware of the existence of the firewall. Further, since the communication request corresponds to the communication response, timing management at the communication level is easy.

 この場合において、上記の一方の装置から通信相手に定期的に通信要求を送信するようにすれば、ファイアウォールの外側から内側に向けての情報の送信が長時間に亘って停滞してしまう事態を防止できる。
 また、クライアントコマンドプールやサーバコマンドプールを設け、各アプリケーション等が生成した動作要求や動作応答をこれらのプールに蓄積しておくようにすることにより、動作要求や動作応答の生成を、通信相手に対する送信タイミングを考慮せずに行うことができる。従って、アプリケーション等が行う処理を簡略化することができ、設計や開発が容易になる。
In this case, if a communication request is periodically transmitted from the one device to the communication partner, transmission of information from the outside to the inside of the firewall may be stagnated for a long time. Can be prevented.
In addition, by providing a client command pool and a server command pool and accumulating operation requests and operation responses generated by each application and the like in these pools, generation of operation requests and operation responses can be performed with respect to a communication partner. This can be performed without considering the transmission timing. Therefore, processing performed by an application or the like can be simplified, and design and development are facilitated.

 そして、このようにした場合でも、通信相手に送信すべき動作要求や動作応答をプールから読み出す収集手段を設けることにより、通信を行う場合に、送信すべき情報を漏れなく送信することができる。
 また、受信した動作要求や動作応答を各々分離して適切なプールに記憶させる分配手段を設け、受信した情報もプールに蓄積しておくようにすることにより、受信した動作要求に係る動作の実行や、動作応答受信後の処理を、通信相手からの受信タイミングを考慮せずに行うことができる。従って、アプリケーション等が行う処理を簡略化することができ、設計や開発が容易になる。
Even in such a case, the information to be transmitted can be transmitted without fail when communication is performed by providing a collection unit for reading out an operation request and an operation response to be transmitted to the communication partner from the pool.
Also, by providing distribution means for separating received operation requests and operation responses from each other and storing them in an appropriate pool, and by storing received information in the pool, execution of the operation related to the received operation request is performed. Alternatively, the processing after receiving the operation response can be performed without considering the reception timing from the communication partner. Therefore, processing performed by an application or the like can be simplified, and design and development are facilitated.

 また、生成した動作要求にID等の識別情報を付して、動作要求を記憶、送信する際にこの識別情報と関連付けて行うようにし、また動作応答を記憶、送信する際にも対応する動作要求の識別情報と関連付けて行うようにすれば、1つのメッセージ(ここではHTTPメッセージ)に複数の動作要求や動作応答を含める場合でも、その識別情報を媒介に動作要求と動作応答との対応関係を容易に認識することができる。
 さらに、動作要求に優先順位を付して、これが高いものから順に実行したり応答を送信したりするようにすれば、緊急を要する動作を優先的に実行すると共にその応答も優先的に返すことができる。
Also, identification information such as an ID is attached to the generated operation request so that the operation request is stored and transmitted in association with the identification information, and an operation corresponding to the operation response is stored and transmitted. If a plurality of operation requests and operation responses are included in one message (here, an HTTP message), the correspondence between the operation request and the operation response can be obtained through the identification information. Can be easily recognized.
Furthermore, by assigning priorities to operation requests and executing the requests in descending order or transmitting a response, it is possible to execute urgent operations with priority and return the response with priority. Can be.

〔SMTPを採用する場合の実施例:図30乃至図35〕
 次に、通信プロトコルにSMTPを採用する場合の実施例について説明する。この実施例は、上述のHTTPを採用する場合の実施例と共通点が多いので、共通点については説明を省略するか簡単にし、相違点を中心に説明する。
 まず、図30に、SMTPを採用する場合の実施例を適用する通信システムの構成例を示す。
[Example in which SMTP is adopted: FIGS. 30 to 35]
Next, an embodiment in which SMTP is adopted as a communication protocol will be described. This embodiment has many points in common with the above-described embodiment in which the HTTP is adopted. Therefore, the description of the common points will be omitted or simplified, and differences will be mainly described.
First, FIG. 30 shows a configuration example of a communication system to which an embodiment employing SMTP is applied.

 この通信システムは、図30に示すように、通信装置AとメールサーバA′とを接続したLAN_Aと、通信装置BとメールサーバB′とを接続したLAN_Bとを、それぞれファイアウォールAとファイアウォールBとを介してインターネット13に接続して構成している。また、ファイアウォールを介して外部からアクセス可能な位置に、LAN_A側ではメールサーバAを、LAN_B側ではメールサーバBをそれぞれ設けている。そして、通信装置Aが第1の通信装置に、通信装置Bが第2の通信装置に該当する。 As shown in FIG. 30, the communication system includes a LAN_A connecting the communication device A and the mail server A ', and a LAN_B connecting the communication device B and the mail server B'. And is connected to the Internet 13 via the Internet. Further, a mail server A is provided on the LAN_A side and a mail server B is provided on the LAN_B side at positions accessible from the outside via a firewall. The communication device A corresponds to the first communication device, and the communication device B corresponds to the second communication device.

 SMTPを用いて通信を行う場合には、通信装置Aと通信装置Bとの間での情報転送は電子メールによって行う。そして、例えば通信装置Bから通信装置Aに情報を送信する場合、図22に破線で示したように、通信装置Bは通信装置Aを宛先とする電子メールを送信し、これをまずメールサーバB′に送信する。すると、各メールサーバB′,B,Aを順次介して、通信装置Aが直接アクセスするメールサーバA′まで電子メールが転送される。また、図示は省略したが、通常はメールサーバBとメールサーバAとの間に更に別のメールサーバを介して転送を行うことになる。 When communication is performed using SMTP, information transfer between the communication device A and the communication device B is performed by e-mail. For example, when transmitting information from the communication device B to the communication device A, the communication device B transmits an e-mail addressed to the communication device A as shown by a broken line in FIG. '. Then, the e-mail is transferred to the mail server A 'directly accessed by the communication device A via the respective mail servers B', B, A in order. Although illustration is omitted, transfer is usually performed between the mail server B and the mail server A via another mail server.

 そして、一点鎖線で示したように通信装置Aが定期的にメールサーバA′にアクセスすることにより、通信装置A宛の電子メールを受け取ることができ、以上で通信装置Bから通信装置Aへの情報転送が完了する。通信装置Aから通信装置Bへの情報転送は、逆の手順で行うことができ、情報転送に関しては、通信装置Aと通信装置Bとは対称である。ただし、メールサーバA′及びB′を設けることは必須ではなく、通信装置AがメールサーバAと、通信装置BがメールサーバBと直接通信を行うようにしてもよい。また、メール受信用のメールサーバとメール送信用のメールサーバが異なってもよい。 Then, as shown by the one-dot chain line, the communication device A can periodically access the mail server A 'to receive an electronic mail addressed to the communication device A. Information transfer is completed. The information transfer from the communication device A to the communication device B can be performed in the reverse order, and the information transfer is symmetric between the communication device A and the communication device B. However, it is not essential to provide the mail servers A 'and B'. The communication device A may directly communicate with the mail server A, and the communication device B may directly communicate with the mail server B. Also, the mail server for receiving mail and the mail server for sending mail may be different.

 このような通信システムにおいて、各LANには外部からアクセス可能な位置にメールサーバを設けていることから、ファイアウォールを越えて電子メールを転送することができる。
 なお、この実施例においては、通信装置Aと通信装置Bとが直接ネゴシエーションをした上で通信を行っているわけではないが、相互に情報転送を行うことが可能である。
In such a communication system, each LAN is provided with a mail server at a position accessible from the outside, so that e-mail can be transferred through a firewall.
Note that, in this embodiment, the communication device A and the communication device B do not perform communication after directly negotiating with each other, but can transfer information to each other.

 また、通信装置A及び通信装置Bも、図1に示した第1の通信装置及び第2の通信装置の場合と同様に、互いの制御管理を行うためのアプリケーションプログラムを実装している。そして、RPCにより、互いの実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。 {Circle around (1)} Similarly, the communication device A and the communication device B also have application programs for performing mutual control and management, as in the case of the first communication device and the second communication device shown in FIG. Then, the RPC transmits an "operation request" as a request for processing to a method of an application program to be mounted on each other, and an "operation response" as a result of the requested processing can be obtained. I have.

 図31に、これらの動作要求と動作応答の関係を示すが、動作要求のレベルでは、通信装置Aと通信装置Bとの関係は、既に説明したHTTPクライアント11とHTTPサーバ12との関係と同様に、対称なものである。しかし、SMTPの場合には、通信のレベルでも通信装置Aと通信装置Bとが対称な関係にあることが、HTTPの場合と異なる。 FIG. 31 shows the relationship between the operation request and the operation response. At the operation request level, the relationship between the communication device A and the communication device B is the same as the relationship between the HTTP client 11 and the HTTP server 12 already described. In addition, it is symmetric. However, in the case of SMTP, the communication device A and the communication device B have a symmetrical relationship even at the communication level, which is different from the case of HTTP.

 図32に、この通信システムにおける通信シーケンスの例を示す。
 上述したように、この通信システムにおいては、通信装置Aと通信装置Bとの間の通信は、電子メールを用いて行う。そして、電子メールには、送信元と宛先は存在し、その宛先から送信元に返信を行うことも可能である。しかし、初めの電子メールと返信とは全く独立したものであり、HTTPの場合のような、通信要求と通信応答のような関係はない。
 従って、どちらの通信装置から先に通信を行ってもよいし、交互に電子メールを送信しなければならないということもないのであるが、ここでは、通信装置Aから通信装置Bにまず電子メールを送信し、交互に計3通の電子メールを送受信する場合の例を示している。
FIG. 32 shows an example of a communication sequence in this communication system.
As described above, in this communication system, communication between the communication device A and the communication device B is performed using electronic mail. The electronic mail has a transmission source and a destination, and it is possible to send a reply from the destination to the transmission source. However, the initial e-mail and the reply are completely independent, and do not have a relationship such as a communication request and a communication response as in the case of HTTP.
Therefore, either of the communication devices may perform the communication first, and it is not necessary to send the e-mail alternately. Here, the e-mail is first sent from the communication device A to the communication device B. An example is shown in which three e-mails are transmitted and transmitted alternately in total.

 これらの電子メールには、送信先(宛先)に対する動作要求(コマンド)及び、送信先から受信したコマンドに対する動作応答(コマンド応答、あるいは単に「応答」)を記載して送信するようにしている。これは、通信装置Aと通信装置Bのどちらが送信元であっても同様である。
 従って、例えば通信装置A側コマンドaは、電子メールxに記載して転送し、通信装置Bからのコマンド応答をその後の電子メールyに記載して転送することができる。また、通信装置B側コマンドcは、電子メールyに記載して転送し、通信装置Aからのコマンド応答をその後の電子メールzに記載して転送することができる。
These e-mails are transmitted by describing an operation request (command) to the transmission destination (destination) and an operation response (command response or simply “response”) to the command received from the transmission destination. This is the same regardless of which of the communication device A and the communication device B is the transmission source.
Therefore, for example, the command a on the communication device A side can be transferred in the form of an e-mail x, and the command response from the communication device B can be transferred in the subsequent e-mail y. Also, the command c on the communication device B side can be transferred in an e-mail y, and the command response from the communication device A can be transferred in an e-mail z.

 なお、動作要求及び動作応答に対する応答をそれぞれ任意の数ずつ(0でもよい)1通の電子メールに記載することができる。そして、1通の電子メールに記載した内容は、1つのメッセージであり、当然論理的に一括して転送する。そして、このようにすることにより、必要な情報を転送するための電子メールの数を減らし、オーバーヘッドを低減して通信の効率化を図っている。
 また、コマンドを受信した後最初に送信する電子メールにコマンド応答を記載しなくてもよいことは、図6を用いて説明したHTTPの場合と同様である。
An arbitrary number (or may be zero) of responses to the operation request and the operation response can be described in one e-mail. The content described in one e-mail is one message, which is logically and collectively transferred. By doing so, the number of electronic mails for transferring necessary information is reduced, overhead is reduced, and communication efficiency is improved.
Also, the fact that the command response need not be described in the e-mail transmitted first after receiving the command is the same as in the case of HTTP described with reference to FIG.

 次に、通信装置A及び通信装置Bにおける、コマンドやコマンド応答を結合し、また分離する処理を行うための機能構成及びその処理の手順について説明する。ハードウェア構成については、HTTPを用いる実施例の説明において図7に示したHTTPクライアント11の場合と同様なものを使用することができる。 Next, a description will be given of a functional configuration for combining and separating commands and command responses in the communication devices A and B and a procedure of the processing. Regarding the hardware configuration, the same hardware configuration as that of the HTTP client 11 shown in FIG. 7 in the description of the embodiment using HTTP can be used.

 図33は、通信装置Aの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す図8と対応する機能ブロック図である。
 図33に示す機能のうち、通信装置A側コマンドプール51,通信装置B側コマンドプール52,通信装置A側コマンド生成手段53,通信装置B側コマンド実行結果生成手段54は、それぞれ図8に示したクライアントコマンドプール41,サーバコマンドプール42,クライアントコマンド生成手段43,サーバコマンド実行結果生成手段44と対応する機能であり、装置の名称が異なることにより名称を変更したものである。
FIG. 33 is a functional block diagram corresponding to FIG. 8 showing a configuration of a function for performing a process related to a command and a command response among the functions of the communication device A.
33, the communication device A command pool 51, the communication device B command pool 52, the communication device A command generation means 53, and the communication device B command execution result generation means 54 are shown in FIG. This is a function corresponding to the client command pool 41, the server command pool 42, the client command generation unit 43, and the server command execution result generation unit 44, and the name is changed due to a different device name.

 また、送信メッセージ収集手段45及び受信メッセージ分配手段48は、図8に示した同名の手段と対応するものである。ただし、送受信するためのデータの形式が、SMTPに対応した形式である点が図8に示した例とは異なる。しかし、コマンドやコマンド応答に対応する、個々のSOAPメッセージについては、図8の場合と同様なものである。
 メール送信手段56及びメール受信手段57については、それぞれ送信手段及び受信手段に該当するが、送受信に使用するプロトコルが異なることに伴って、図8に示したHTTPリクエスト送信手段46及びHTTPレスポンス受信手段47とは異なるものである。
The transmission message collection unit 45 and the reception message distribution unit 48 correspond to the units of the same name shown in FIG. However, it differs from the example shown in FIG. 8 in that the format of data to be transmitted and received is a format corresponding to SMTP. However, individual SOAP messages corresponding to commands and command responses are the same as those in FIG.
The mail transmitting unit 56 and the mail receiving unit 57 correspond to the transmitting unit and the receiving unit, respectively. However, the HTTP request transmitting unit 46 and the HTTP response receiving unit shown in FIG. It is different from 47.

 すなわち、メール送信手段56は、送信メッセージ収集手段45が生成した送信メッセージを含む、通信装置B宛の電子メールを生成し、メールサーバA′に送信する機能を有する。なお、それ以降の電子メールの転送には、通信装置Aは関与しない。また、1つの電子メールに送信メッセージをいくつ含めてもよいし、コマンド応答に係る送信メッセージと通信装置A側コマンドに係る送信メッセージとを任意に混在させることもできる点等は、図8に示した例の場合と同様である。 That is, the mail transmitting unit 56 has a function of generating an electronic mail including the transmission message generated by the transmission message collecting unit 45 and addressed to the communication device B, and transmitting the generated electronic mail to the mail server A ′. The communication device A is not involved in the subsequent transfer of the e-mail. FIG. 8 shows that one electronic mail may include any number of transmission messages, and a transmission message relating to a command response and a transmission message relating to a command on the communication device A side may be arbitrarily mixed. This is the same as in the case of the above example.

 メール受信手段57は、定期的にメールサーバA′にアクセスして通信装置A宛ての新着メールの有無を調べ、新着メールがあった場合にこれを受信する機能を有する。そしてここでは、受信する電子メールには、通信装置B側コマンド及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージと、通信装置A側コマンドに対する応答及びそのコマンドと関連付けられたコマンドIDを含む受信メッセージとが、任意に混在して含まれている。 The mail receiving means 57 has a function of periodically accessing the mail server A 'to check whether there is any new mail addressed to the communication device A, and receiving the new mail if any. Here, the received e-mail includes a received message including the command on the communication device B side and the command ID associated with the command, and a reception message including the response to the command on the communication device A side and the command ID associated with the command. Message is arbitrarily mixed.

 次に、このような機能を有する通信装置Aが通信装置B宛てに送信する電子メールの例を図34に示す。
 この電子メールは、図11に示したHTTPリクエストの場合と同様に、ボディ部としてMIME(Multipurpose Internet Mail Extension)に従ったマルチパートのメッセージが記載され、この各パートには、それぞれSOAPエンベロープが埋め込まれている。すなわち、ボディの部分はHTTPリクエストの場合と同様なものになっている。
Next, FIG. 34 shows an example of an electronic mail transmitted from the communication device A having such a function to the communication device B.
As in the case of the HTTP request shown in FIG. 11, a multi-part message according to MIME (Multipurpose Internet Mail Extension) is described in the body of this e-mail, and a SOAP envelope is embedded in each part. Have been. That is, the body part is similar to the case of the HTTP request.

 しかし、ヘッダ部分はHTTPリクエストの場合とは異なり、電子メールの送信元アドレスを示すFrom、宛先アドレスを示すTo、表題を示すSubject等の情報が記載されている。
 通信装置Bから通信装置Aに送信する電子メールについては、ヘッダのうちFromの内容とToの内容を入れ替えたものになる。
 また、これらの電子メールに記載されるSOAPエンベロープの内容は、HTTPリクエストやHTTPレスポンスの場合と同様なものである。ただし、各パートのエンティティヘッダの部分は、データのエンコード方式が異なるためHTTPの場合とは一部が異なる。
However, unlike the case of the HTTP request, the header portion describes information such as From indicating the source address of the e-mail, To indicating the destination address, and Subject indicating the title.
The e-mail transmitted from the communication device B to the communication device A is obtained by exchanging the contents of From and the contents of To in the header.
The contents of the SOAP envelope described in these e-mails are the same as those in the case of the HTTP request and the HTTP response. However, a part of the entity header part of each part is different from the case of HTTP because the data encoding method is different.

 次に、以上説明したような構成及び機能を有する通信装置Aにおいて実行する処理について、図35及び図36のフローチャートを用いて説明する。これらのフローチャートに示す処理は、通信装置AのCPUが所要の制御プログラムを実行することによって行うものである。 Next, processing executed in the communication device A having the above-described configuration and function will be described with reference to the flowcharts in FIGS. 35 and 36. The processing shown in these flowcharts is performed by the CPU of the communication device A executing a required control program.

 まず、図35にメッセージ送信時の処理の基本動作のフローチャートを示す。
 通信装置AのCPUは、送信メッセージ収集手段45が通信装置A側コマンドやコマンド応答等の読み出しを試みるタイミングになると、図35のフローチャートに示す処理を開始する。
 そして、まず通信装置A側コマンドの収集処理を行う(S51)。この処理は、通信装置A側コマンドプール51から通信装置Bに送信すべき通信装置A側コマンドを収集する処理であり、収集したデータからSOAPエンベロープのパートを生成する処理を含む。
First, FIG. 35 shows a flowchart of the basic operation of the process at the time of message transmission.
The CPU of the communication device A starts the processing shown in the flowchart of FIG. 35 when the transmission message collection unit 45 tries to read the communication device A-side command and the command response.
Then, first, a communication device A-side command collection process is performed (S51). This process is a process of collecting a communication device A command to be transmitted to the communication device B from the communication device A command pool 51, and includes a process of generating a SOAP envelope part from the collected data.

 次に、通信装置B側コマンドに対する応答である通信装置B側コマンド実行結果の収集処理を行う(S52)。この処理は、通信装置B側コマンドプール52から通信装置Bに送信すべきコマンド応答を収集する処理であり、やはり収集したデータからSOAPエンベロープのパートを生成する処理を含む。
 その後、ステップS51及びS52の処理で生成したパートを1つにマージして、すべてのパートを含む電子メールを生成し(S53)、その電子メールを通信装置Bに宛てて送信して(S54)、処理を終了する。
Next, a process of collecting a communication device B command execution result, which is a response to the communication device B command, is performed (S52). This process is a process of collecting a command response to be transmitted to the communication device B from the communication device B-side command pool 52, and also includes a process of generating a SOAP envelope part from the collected data.
Thereafter, the parts generated in the processing of steps S51 and S52 are merged into one, an e-mail including all parts is generated (S53), and the e-mail is transmitted to the communication device B (S54). , And the process ends.

 以上の処理において、ステップS51及びS52ではCPU31は送信メッセージ収集手段45として機能し、ステップS53及びS54ではメール送信手段56として機能する。
 これらの処理は、図17に示したステップS11乃至S14の処理と対応するものであるが、SMTPの場合には、電子メールの送信と受信の間には、通信要求と通信応答のような関係はないため、処理は一旦ここで終了し、電子メールを受信する場合には、別途図36に示す処理を行う。
In the above processing, the CPU 31 functions as the transmission message collecting unit 45 in steps S51 and S52, and functions as the mail transmitting unit 56 in steps S53 and S54.
These processes correspond to the processes of steps S11 to S14 shown in FIG. 17, but in the case of SMTP, there is a relationship such as a communication request and a communication response between transmission and reception of an e-mail. Therefore, the process is temporarily terminated here, and when an e-mail is received, the process shown in FIG. 36 is separately performed.

 図36には、メッセージ受信時の処理の基本動作のフローチャートを示す。
 通信装置AのCPUは、定期的にメールサーバA′にアクセスし、通信装置A宛ての新着の電子メールがあると、図36のフローチャートに示す処理を開始する。
 この処理においては、まず新着の電子メールを受信する(S61)。そして、受信した電子メールのボディ(本文)を、各パートに分割する(S62)。ここで、各パートへの分割は、「MIME_boundary」で区分された要素に分割することであり、またここで全てのパートに関して分解する。
FIG. 36 shows a flowchart of the basic operation of the process when receiving a message.
The CPU of the communication device A periodically accesses the mail server A ', and when there is a new electronic mail addressed to the communication device A, starts the processing shown in the flowchart of FIG.
In this process, first, a new electronic mail is received (S61). Then, the body (body) of the received e-mail is divided into each part (S62). Here, the division into each part is to divide into elements divided by “MIME_boundary”, and here, all parts are decomposed.

 そしてその後、全てのパートを順に対象としてステップS63乃至S65の処理を繰り返す。この処理においては、まず対象のパートが通信装置B側コマンドを記載したパートか否か判断する(S63)。そして、通信装置B側コマンドであれば通信装置B側コマンド登録処理を行う(S64)。また、通信装置B側コマンドでないときは、通信装置A側コマンドに対する応答が記載されたパートであるので、応答通知処理を行う(S65)。 Then, the processing of steps S63 to S65 is repeated for all the parts in order. In this process, first, it is determined whether or not the target part is a part in which the communication device B side command is described (S63). If the command is the communication device B side command, the communication device B side command registration processing is performed (S64). If the command is not the command for the communication device B, the response notification process is performed because the response is a part in which a response to the command for the communication device A is described (S65).

 ステップS63又はS64の後は、ステップS63に戻り、次のパートを対象として処理を繰り返す。そして、全てのパートについてこれらの処理を行った時点で、図36のフローチャートに示す処理を終了する。
 以上の処理においては、ステップS61ではCPU31はメール受信手段57として機能し、ステップS62乃至S65では受信メッセージ分配手段48として機能する。
 これらの処理は、図17に示したステップS15乃至S19の処理と対応するものである。
After step S63 or S64, the process returns to step S63, and the process is repeated for the next part. Then, when these processes are performed for all parts, the process shown in the flowchart of FIG. 36 ends.
In the above processing, the CPU 31 functions as the mail receiving unit 57 in step S61, and functions as the received message distribution unit 48 in steps S62 to S65.
These processes correspond to the processes of steps S15 to S19 shown in FIG.

 また、通信装置B側コマンドの実行に関する処理については、図20及び図21を用いて説明したサーバコマンドの実行に関する処理と同様なものである。
 以上で、通信装置Aにおいて実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
 なお、通信装置Bの機能及び通信装置Bにおいて実行する処理については、通信装置A側コマンドと通信装置B側コマンドとの意味合いが逆になる点以外は、通信装置Aの場合と全く同じであるので、説明を省略する。
The processing related to the execution of the command on the communication apparatus B side is the same as the processing related to the execution of the server command described with reference to FIGS.
This concludes the description of the processing relating to transfer of each command and command response, which is executed in communication device A.
Note that the functions of the communication device B and the processing executed by the communication device B are exactly the same as those of the communication device A, except that the meanings of the communication device A-side command and the communication device B-side command are reversed. Therefore, the description is omitted.

 以上説明してきたように、この発明は、SMTPのように、情報の送信と返信とが必ずしも対応しないプロトコルを使用して通信を行う場合にも適用できる。そして、この場合にも、送信元から通信相手に送信すべき動作要求と、通信相手から受信した動作要求に対する動作応答とを、一括して通信相手に送信することができるので、動作要求の送信と動作応答の送信とについて別々の単位で転送を行う必要がなく、通信のオーバーヘッドを低減して通信効率を高めることができる。
 また、通信に電子メールを用いれば、ファイアウォールの内側へも容易に情報を転送することができる。
As described above, the present invention can be applied to a case where communication is performed using a protocol such as SMTP, which does not necessarily support transmission and return of information. Also in this case, the operation request to be transmitted from the transmission source to the communication partner and the operation response to the operation request received from the communication partner can be transmitted to the communication partner at a time. It is not necessary to perform transfer in separate units for transmission of the operation response and the transmission of the operation response, and it is possible to reduce communication overhead and increase communication efficiency.
In addition, if electronic mail is used for communication, information can be easily transferred to the inside of a firewall.

〔各実施例の変形例:図37〕
 次に、上述した各実施例の変形例について説明する。
 まず、上述した各実施例では、説明を簡単にするために2つの通信装置からなる通信システムを例としてこの発明について説明したが、この発明は、さらに多くの通信装置からなる通信システムやこのような通信システムを構成する通信装置に適用することも当然可能である。
 例えば、HTTPを採用する場合の実施例は、図37に示すような通信システムにも適用することができる。
[Modification of Each Embodiment: FIG. 37]
Next, a modification of each of the above-described embodiments will be described.
First, in each of the above-described embodiments, the present invention has been described by taking a communication system including two communication devices as an example for the sake of simplicity of description. Naturally, it is also possible to apply the present invention to a communication device constituting a simple communication system.
For example, the embodiment employing HTTP can be applied to a communication system as shown in FIG.

 この通信システムは、通信機能を備えた通信装置である管理装置102と、同じく通信機能を備えた通信装置である被管理装置100とをインターネット13を含むネットワークを介して接続し、管理装置102によって被管理装置100を管理する遠隔管理システムとして構成している。
 ここで、被管理装置100の具体例としては、プリンタ、スキャナ、複写機、あるいはこれらの機能を兼ね備えたデジタル複合機等の画像処理装置を始めとし、通信機能を備えたネットワーク家電,自動販売機,医療機器,電源装置,空調システム,ガス・水道・電気等の計量システム等や、ネットワークに接続可能なコンピュータ等も含め、通信機能を備える各種電子装置が考えられる。
In this communication system, a management device 102, which is a communication device having a communication function, and a managed device 100, which is also a communication device having a communication function, are connected via a network including the Internet 13, and the management device 102 It is configured as a remote management system that manages the managed device 100.
Here, specific examples of the managed device 100 include an image processing apparatus such as a printer, a scanner, a copier, or a digital multifunction peripheral having these functions, a network home appliance having a communication function, and a vending machine. Various types of electronic devices having a communication function, including medical devices, power supply devices, air conditioning systems, measuring systems for gas, water, electricity, and the like, and computers that can be connected to a network can be considered.

 また、この遠隔管理システムにおいては、管理装置102と被管理装置100との間の通信を仲介する通信装置である仲介装置101を設けており、管理装置102と被管理装置100とはこの仲介装置101を介して通信を行う。
 そして、仲介装置101及び被管理装置100は、その利用環境に応じて多様な階層構造を成す。例えば、図37に示す設置環境Aでは、管理装置102とHTTPによるコネクションを確立できる仲介装置101aが、被管理装置100a及び100bを従える単純な階層構造になっているが、設置環境Bでは、4台の被管理装置100を設置するため、1台の仲介装置101を設置しただけでは負荷が大きくなる。
Further, in this remote management system, an intermediary device 101 which is a communication device for mediating communication between the management device 102 and the managed device 100 is provided, and the management device 102 and the managed device 100 Communication is performed via 101.
Then, the mediation device 101 and the managed device 100 form various hierarchical structures according to the usage environment. For example, in the installation environment A shown in FIG. 37, the mediation device 101a that can establish a connection with the management device 102 by HTTP has a simple hierarchical structure that follows the managed devices 100a and 100b. Since one managed device 100 is installed, the load is increased if only one intermediary device 101 is installed.

 そのため、管理装置102とHTTPによるコネクションを確立できる仲介装置101bが、被管理装置100c及び100dだけでなく、他の仲介装置101cを従え、この仲介装置101cが被管理装置100e及び100fを更に従えるという階層構造を形成している。この場合、被管理装置100e及び100fを遠隔管理するために管理装置102から発せられた情報は、仲介装置101bとその下位のノードである仲介装置101cとを経由して、被管理装置100e又は100fに到達することになる。なお、各設置環境には、セキュリティ面を考慮し、ファイアウォール14を設置している。 Therefore, the mediation device 101b that can establish a connection with the management device 102 by HTTP follows not only the managed devices 100c and 100d but also another mediation device 101c, and the mediation device 101c can further follow the managed devices 100e and 100f. It forms a hierarchical structure. In this case, the information issued from the management device 102 for remotely managing the managed devices 100e and 100f is transmitted to the managed device 100e or 100f via the mediation device 101b and the mediation device 101c which is a lower node thereof. Will be reached. In each installation environment, a firewall 14 is installed in consideration of security.

 このような遠隔管理システムにおいても、仲介装置101をHTTPクライアント、管理装置102をHTTPサーバとして取り扱うことにより、この発明を適用することができる。
 なお、この場合において、管理装置102から被管理装置100にコマンドを送信しようとする場合、仲介装置101に対して、「被管理装置100にコマンドを送信せよ」というコマンドを送信し、コマンドに応じた動作として被管理装置100に対してコマンドを送信させることが考えられる。また、宛先として被管理装置100のいずれかを指定して仲介装置101に対してコマンドを送信し、仲介装置101に、自己以外が宛先となっているコマンドを、その宛先に対して転送させることも考えられる。
Also in such a remote management system, the present invention can be applied by treating the mediation apparatus 101 as an HTTP client and the management apparatus 102 as an HTTP server.
In this case, in the case where a command is to be transmitted from the management apparatus 102 to the managed apparatus 100, a command “send a command to the managed apparatus 100” is transmitted to the mediation apparatus 101, and As another operation, a command may be transmitted to the managed device 100. In addition, a command is transmitted to the mediation device 101 by designating any one of the managed devices 100 as the destination, and the mediation device 101 is caused to transfer a command having a destination other than itself to the destination. Is also conceivable.

 また、3つ以上のノード間でコマンドやコマンド応答の送受信を行う場合、コマンドの発信元と宛先とを把握できるように、これらの情報もコマンドやコマンド応答のメッセージに含め、またコマンドシートにも記載して管理するようにするとよい。
 また、メールサーバを設ければ、SMTPを採用する場合の実施例も、このような通信システムに適用することができる。
When sending and receiving commands and command responses among three or more nodes, include these information in the command and command response messages and also in the command sheet so that the source and destination of the command can be grasped. It is good to describe and manage.
If a mail server is provided, the embodiment in which SMTP is adopted can be applied to such a communication system.

 さらに、この発明には、上記以外の変形を適用することも可能である。例えば、クライアントコマンドプール41及びサーバコマンドプール42に登録するクライアントコマンドシート及びサーバコマンドシートを、XMLドキュメントとして記載するようにしてもよい。「入力パラメータ」をデシリアライズする前のXMLドキュメントとして保存したり、「出力パラメータ」をシリアライズした後のXMLドキュメントとして保存したりしてもよい。
 また、送受信するコマンドやコマンド応答の情報量に制限を設けても構わない。特に、受信するコマンドの情報量を制限するようにすると、受信側がメモリ容量の限られた装置である場合にメモリの使用量を抑えることができる。
Further, modifications other than those described above can be applied to the present invention. For example, a client command sheet and a server command sheet registered in the client command pool 41 and the server command pool 42 may be described as an XML document. The “input parameters” may be stored as an XML document before deserialization, or the “output parameters” may be stored as an XML document after serialization.
Further, a limit may be imposed on the information amount of a command to be transmitted / received or a command response. In particular, if the information amount of the command to be received is limited, the memory usage can be reduced when the receiving side is a device having a limited memory capacity.

 また、上述した実施例においては、RPCを実現する上位プロトコルとしてSOAPを採用し、アプリケーションは直接プールを操作してRPCを実現しているが、アプリケーションとプールとの間にCORBA(Common Object Request Broker Architecture)やJAVA(登録商標)RMI(Remote Method Invocation)とのブリッジ(メッセージ変換機能)を備えることによってアプリケーションの開発効率をさらに向上させてもよい。
 すなわち、上述した実施例における、HTTPクライアント11とHTTPサーバ12との間等でのコマンド及びこれに対するコマンド応答のやり取りは、XMLで記述されたSOAPメッセージにより行うこととしているが、これに限るものでなく、他の形式で記述されていてもよい。
Further, in the above-described embodiment, SOAP is adopted as an upper protocol for realizing RPC, and the application directly operates the pool to realize RPC. However, a CORBA (Common Object Request Broker) is provided between the application and the pool. Architecture) or a bridge (message conversion function) with JAVA (registered trademark) RMI (Remote Method Invocation) may further improve application development efficiency.
That is, in the above-described embodiment, the exchange of the command and the response to the command between the HTTP client 11 and the HTTP server 12 is performed by the SOAP message described in XML, but is not limited thereto. Instead, it may be described in another format.

 また、上述した実施例において、SOAP標準のプロトコルだけでなく、SOAPとMIMEマルチパートを組み合わせた独自のプロトコルをもこれに加えて採用することにより、HTTPリクエスト、或いはHTTPレスポンスに含まれるSOAPエンベロープを全く独立したものとして扱うこととするが、SOAPの関連仕様として定義されたSOAPアタッチメントによって、HTTPレスポンスに含まれる第1パートのSOAPエンベロープに、第2パート以降のSOAPエンベロープへのリンクを埋め込んでこれらを関連付けて引き渡す構成にしてもよい。SMTPを用いる電子メールの場合にも同様である。 Further, in the above-described embodiment, not only the SOAP standard protocol but also a unique protocol combining SOAP and MIME multi-part is additionally adopted, so that the SOAP envelope included in the HTTP request or the HTTP response can be used. Although it is treated as completely independent, the links to the SOAP envelopes of the second and subsequent parts are embedded in the SOAP envelope of the first part included in the HTTP response by the SOAP attachment defined as the SOAP related specification. May be delivered in association with each other. The same applies to an e-mail using SMTP.

 更に、SOAP等の上位プロトコルの下位に位置するデータ通信のプロトコルとして、ここではHTTPあるいはSMTPを採用した例について説明したが、この下位プロトコルについても、FTP(File Transfer Protocol)等の他のプロトコルを採用してもよい。
 さらにまた、通信システムの構成についても、以上説明したものに限られることはない。
Furthermore, an example in which HTTP or SMTP is adopted as a data communication protocol located below a higher protocol such as SOAP has been described here, but other protocols such as FTP (File Transfer Protocol) are also used for this lower protocol. May be adopted.
Furthermore, the configuration of the communication system is not limited to that described above.

 また、この発明によるプログラムは、コンピュータを、他の通信装置を通信相手として通信可能な通信装置である、HTTPクライアント11、HTTPサーバ12、あるいは通信装置A,Bのような装置として機能させるためのプログラムであり、このようなプログラムをコンピュータに実行させることにより、上述したような効果を得ることができる。 Also, the program according to the present invention causes a computer to function as a device such as the HTTP client 11, the HTTP server 12, or the communication devices A and B, which is a communication device capable of communicating with another communication device as a communication partner. It is a program, and the above-described effects can be obtained by causing a computer to execute such a program.

 このようなプログラムは、はじめからコンピュータに備えるROMあるいはHDD等の記憶手段に格納しておいてもよいが、記録媒体であるCD−ROMあるいはフレキシブルディスク,SRAM,EEPROM,メモリカード等の不揮発性記録媒体(メモリ)に記録して提供することもできる。そのメモリに記録されたプログラムをコンピュータにインストールしてCPUに実行させるか、CPUにそのメモリからこのプログラムを読み出して実行させることにより、上述した各手順を実行させることができる。
 さらに、ネットワークに接続され、プログラムを記録した記録媒体を備える外部機器あるいはプログラムを記憶手段に記憶した外部機器からダウンロードして実行させることも可能である。
Such a program may be stored in a storage means such as a ROM or an HDD provided in the computer from the beginning, but may be stored in a non-volatile storage medium such as a CD-ROM or a flexible disk, an SRAM, an EEPROM, or a memory card as a recording medium. It can also be provided by recording it on a medium (memory). Each of the above-described procedures can be executed by installing the program recorded in the memory in the computer and causing the CPU to execute the program, or reading and executing the program from the memory by the CPU.
Further, the program can be downloaded from an external device provided with a recording medium storing the program or an external device having the program stored in the storage means and executed.

 以上説明してきたように、この発明の通信装置、通信システム、通信装置の制御方法、プログラム及び記録媒体を用いれば、複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する通信システムを構成する場合において、通信の効率を上げることができる。
 従って、この発明を、このような通信システム又はこのような通信システムを構成する通信装置に適用することにより、通信の負荷が小さい通信システムを構成することができる。
As described above, by using the communication device, the communication system, the control method of the communication device, the program, and the recording medium of the present invention, a communication in which a plurality of communication devices mutually transmit and receive an operation request and an operation response to the received operation request. When configuring a system, communication efficiency can be increased.
Therefore, by applying the present invention to such a communication system or a communication device configuring such a communication system, a communication system with a small communication load can be configured.

この発明の通信装置を用いて構成したこの発明の通信システムの構成例を示す図である。1 is a diagram illustrating a configuration example of a communication system of the present invention configured using the communication device of the present invention. 図1に示した通信システムにおける動作要求と動作応答の関係を示す図である。FIG. 2 is a diagram illustrating a relationship between an operation request and an operation response in the communication system illustrated in FIG. 1. 通信プロトコルとしてHTTPを採用する場合の通信システムの構成例を示す図である。FIG. 3 is a diagram illustrating a configuration example of a communication system when HTTP is adopted as a communication protocol. 図3に示した通信システムにおける動作要求と動作応答の関係を示す図である。FIG. 4 is a diagram illustrating a relationship between an operation request and an operation response in the communication system illustrated in FIG. 3. 図3に示した通信システムにおける通信シーケンスの例を示す図である。FIG. 4 is a diagram illustrating an example of a communication sequence in the communication system illustrated in FIG. 3. その別の例を示す図である。It is a figure showing another example. 図3に示したHTTPクライアント及びHTTPサーバのハードウェア構成例を示す図である。FIG. 4 is a diagram illustrating a hardware configuration example of an HTTP client and an HTTP server illustrated in FIG. 3. 図3に示したHTTPクライアントの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。FIG. 4 is a functional block diagram illustrating a configuration of a function for performing processing relating to a command and a command response among functions of the HTTP client illustrated in FIG. 3. 図8に示したクライアントコマンドプールに記憶させるクライアントコマンドシートにおけるデータ構造の例を示す図である。FIG. 9 is a diagram illustrating an example of a data structure in a client command sheet stored in the client command pool illustrated in FIG. 8. 図8に示したサーバコマンドプールに記憶させるサーバコマンドシートにおけるデータ構造の例を示す図である。FIG. 9 is a diagram illustrating an example of a data structure in a server command sheet stored in the server command pool illustrated in FIG. 8;

図3に示したHTTPクライアントがHTTPサーバに送信するHTTPリクエストの例を示す図である。FIG. 4 is a diagram illustrating an example of an HTTP request transmitted from the HTTP client illustrated in FIG. 3 to an HTTP server. 図3に示したHTTPクライアントがHTTPサーバから受信するHTTPレスポンスの例を示す図である。FIG. 4 illustrates an example of an HTTP response received by the HTTP client illustrated in FIG. 3 from an HTTP server. クライアントコマンドを記載したパートの例を示す図である。It is a figure showing the example of the part which described the client command. クライアントコマンドに対する応答を記載したパートの例を示す図である。FIG. 9 is a diagram illustrating an example of a part describing a response to a client command. サーバコマンドを記載したパートの例を示す図である。It is a figure showing the example of the part in which the server command was described. サーバコマンドに対する応答を記載したパートの例を示す図である。FIG. 9 is a diagram illustrating an example of a part describing a response to a server command. 図3に示したHTTPクライアントにおける、メッセージの収集及び分配処理の基本動作を示すフローチャートである。4 is a flowchart illustrating a basic operation of message collection and distribution processing in the HTTP client illustrated in FIG. 3. 図17のステップS11乃至S14の部分の処理をより詳細に示すフローチャートである。18 is a flowchart showing the processing of steps S11 to S14 in FIG. 17 in more detail. 図17のステップS15以降の部分の処理をより詳細に示すフローチャートである。It is a flowchart which shows the process of the part after step S15 of FIG. 17 in more detail. 図3に示したHTTPクライアントにおける、サーバコマンドの実行に関する処理の一例を示すフローチャートである。4 is a flowchart illustrating an example of processing related to execution of a server command in the HTTP client illustrated in FIG. 3.

その別の例を示すフローチャートである。It is a flowchart which shows the other example. 図3に示したHTTPサーバの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。FIG. 4 is a functional block diagram illustrating a configuration of a function for performing a process related to a command and a command response among functions of the HTTP server illustrated in FIG. 3. 図22に示したサーバコマンドプールに記憶させるサーバコマンドシートにおけるデータ構造の例を示す図である。FIG. 23 is a diagram illustrating an example of a data structure in a server command sheet stored in the server command pool illustrated in FIG. 22. 図22に示したクライアントコマンドプールに記憶させるクライアントコマンドシートにおけるデータ構造の例を示す図である。FIG. 23 is a diagram illustrating an example of a data structure in a client command sheet stored in the client command pool illustrated in FIG. 22. 図3に示したHTTPサーバにおける、メッセージの収集及び分配処理の基本動作を示すフローチャートである。4 is a flowchart illustrating a basic operation of message collection and distribution processing in the HTTP server illustrated in FIG. 3. 図25のステップS111乃至S115の部分の処理をより詳細に示すフローチャートである。FIG. 26 is a flowchart illustrating the processing of steps S111 to S115 in FIG. 25 in more detail. 図25のステップS116以降の部分の処理をより詳細に示すフローチャートである。26 is a flowchart showing in more detail the processing of the part after step S116 in FIG. 25. 図3に示したHTTPサーバにおける、クライアントコマンドの実行に関する処理の一例を示すフローチャートである。4 is a flowchart illustrating an example of processing related to execution of a client command in the HTTP server illustrated in FIG. 3. その別の例を示すフローチャートである。It is a flowchart which shows the other example. 通信プロトコルとしてSMTPを採用する場合のこの発明の通信システムの構成例を示す図である。FIG. 2 is a diagram illustrating a configuration example of a communication system of the present invention when SMTP is adopted as a communication protocol.

図30に示した通信システムにおける動作要求と動作応答の関係を示す図である。FIG. 31 is a diagram illustrating a relationship between an operation request and an operation response in the communication system illustrated in FIG. 30. 図30に示した通信システムにおける通信シーケンスの例を示す図である。FIG. 31 is a diagram illustrating an example of a communication sequence in the communication system illustrated in FIG. 30. 図30に示した通信装置Aの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す、図8と対応する機能ブロック図である。FIG. 31 is a functional block diagram corresponding to FIG. 8, showing a configuration of a function for performing processing relating to a command and a command response among the functions of the communication device A shown in FIG. 30. 図30に示した通信装置Aが通信装置B宛てに送信する電子メールの例を示す図である。FIG. 31 is a diagram illustrating an example of an electronic mail transmitted from the communication device A illustrated in FIG. 30 to the communication device B. 図30に示した通信装置Aにおける、メッセージ送信時の処理の基本動作を示すフローチャートである。31 is a flowchart showing a basic operation of a process at the time of message transmission in communication device A shown in FIG. 30. 同じく、メッセージ受信時の処理の基本動作のフローチャートを示すフローチャートである。6 is a flowchart showing a flowchart of a basic operation of a process at the time of receiving a message. この発明の通信システムの別の構成例を示す図である。FIG. 11 is a diagram illustrating another configuration example of the communication system of the present invention.

符号の説明Explanation of reference numerals

1:第1の通信装置    2:第2の通信装置
10:ネットワーク   11:HTTPクライアント
12:HTTPサーバ   13:インターネット
14:ファイアウォール  31:CPU
32:ROM       33:RAM
34:SDカード     35:NIC
41,142:クライアントコマンドプール
42,141:サーバコマンドプール
43:クライアントコマンド生成手段
44:サーバコマンド実行結果生成手段
45,145:送信メッセージ収集手段
46:HTTPリクエスト送信手段
47:HTTPレスポンス受信手段
48,148:受信メッセージ分配手段
51:通信装置A側コマンドプール
52:通信装置B側コマンドプール
53:通信装置A側コマンド生成手段
54:通信装置B側コマンド実行結果生成手段
56:メール送信手段   57:メール受信手段
100:被管理装置    101:仲介装置
102:管理装置  143:サーバコマンド生成手段
144:クライアントコマンド実行結果生成手段
146:HTTPレスポンス送信手段
147:HTTPリクエスト受信手段
1: First communication device 2: Second communication device 10: Network 11: HTTP client 12: HTTP server 13: Internet 14: Firewall 31: CPU
32: ROM 33: RAM
34: SD card 35: NIC
41, 142: client command pool 42, 141: server command pool 43: client command generation unit 44: server command execution result generation unit 45, 145: transmission message collection unit 46: HTTP request transmission unit 47: HTTP response reception unit 48, 148: Received message distribution unit 51: Communication device A side command pool 52: Communication device B side command pool 53: Communication device A side command generation unit 54: Communication device B side command execution result generation unit 56: Mail transmission unit 57: Mail Receiving unit 100: Managed device 101: Mediation device 102: Management device 143: Server command generation unit 144: Client command execution result generation unit 146: HTTP response transmission unit 147: HTTP request reception unit

Claims (25)

 他の通信装置を通信相手として通信可能な通信装置であって、
 前記通信相手に送信すべき動作要求と前記通信相手からの動作要求に対する動作応答とを一括して前記通信相手に送信する送信手段と、
 前記通信相手に送信した動作要求に対する動作応答と前記通信相手からの動作要求とを一括して前記通信相手から受信する受信手段と、
 前記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段とを設けたことを特徴とする通信装置。
A communication device capable of communicating with another communication device as a communication partner,
A transmission unit that collectively transmits an operation request to be transmitted to the communication partner and an operation response to the operation request from the communication partner to the communication partner,
Receiving means for collectively receiving from the communication partner an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
Means for executing an operation related to the operation request from the communication partner and generating an operation response to the operation request as an execution result.
 請求項1記載の通信装置であって、
 前記動作要求は関数呼び出しであり、
 前記動作応答はその関数呼び出しによって呼び出された関数の実行結果であることを特徴とする通信装置。
The communication device according to claim 1, wherein
The operation request is a function call,
The communication device according to claim 1, wherein the operation response is an execution result of a function called by the function call.
 他の通信装置を通信相手として通信可能な通信装置であって、
 前記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、
 前記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、
 前記通信相手に対する動作要求を生成して前記第2の記憶手段に記憶させる要求生成手段と、
 前記第1の記憶手段から前記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて前記第1の記憶手段に記憶させる応答生成手段と、
 前記通信相手からの動作要求に対する動作応答を前記第1の記憶手段から読み出すと共に、前記通信相手に対する動作要求を前記第2の記憶手段から読み出す収集手段と、
 前記通信相手に対して、前記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、
 前記通信相手から、該通信相手に送信した動作要求に対する動作応答と該通信相手からの動作要求とを一括して受信する受信手段と、
 該受信手段が受信した前記通信相手からの動作要求を前記第1の記憶手段に記憶させると共に、前記受信手段が受信した、前記通信相手に送信した動作要求に対する動作応答を、前記通信相手に送信した動作要求と関連付けて前記第2の記憶手段に記憶させる分配手段とを設けたことを特徴とする通信装置。
A communication device capable of communicating with another communication device as a communication partner,
First storage means for storing an operation request from the communication partner and an operation response to the operation request;
Second storage means for storing an operation request to the communication partner and an operation response to the operation request;
Request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means;
An operation request from the communication partner is read from the first storage unit, an operation related to the operation request is executed, an operation response to the operation request is generated as an execution result, and the operation request that has read the operation response is A response generation unit for storing the response in the first storage unit in association with the response generation unit;
Collecting means for reading an operation response to the operation request from the communication partner from the first storage means and reading an operation request for the communication partner from the second storage means;
Transmission means for collectively transmitting the operation response and the operation request read by the collection means to the communication partner,
From the communication partner, receiving means for collectively receiving an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
An operation request from the communication partner received by the receiving unit is stored in the first storage unit, and an operation response to the operation request transmitted to the communication partner received by the receiving unit is transmitted to the communication partner. And a distribution unit for storing in the second storage unit in association with the operation request.
 請求項3記載の通信装置であって、
 前記送信手段が、前記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信するようにし、
 前記受信手段が、前記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信するようにしたことを特徴とする通信装置。
The communication device according to claim 3, wherein
The transmitting unit transmits an operation response and an operation request to be transmitted to the communication partner as SOAP messages, respectively.
A communication device, wherein the receiving means receives an operation response and an operation request received from the communication partner as SOAP messages.
 請求項3又は4記載の通信装置であって、
 前記第1の記憶手段及び前記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、
 前記応答生成手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して前記第1の記憶手段に記憶させる手段とし、
 前記収集手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求に対する動作応答から順に前記第1の記憶手段から読み出し、前記通信相手に対する動作要求のうち前記優先順位の高い動作要求から順に前記第2の記憶手段から読み出す手段としたことを特徴とする通信装置。
The communication device according to claim 3 or 4, wherein
Means for assigning priorities to the operation requests stored in the first storage means and the second storage means,
The response generation means, the operation request from the communication partner, read out in order from the operation request of the higher priority, and means for generating an operation response to the operation request and storing it in the first storage means,
The collecting means reads out from the first storage means in order from an operation response to the operation request having the higher priority among the operation requests from the communication partner, and reads the operation request having the higher priority among the operation requests to the communication partner. A communication device which reads out from the second storage means in order from the first storage means.
 他の通信装置を通信相手として通信可能な通信装置であって、
 前記通信相手に送信すべきSOAPリクエストと前記通信相手からのSOAPリクエストに対するSOAPレスポンスとを1つのメッセージに記載して前記通信相手に送信する送信手段と、
 前記通信相手に送信したSOAPリクエストに対するSOAPレスポンスと前記通信相手からのSOAPリクエストとを1つのメッセージに記載した状態で前記通信相手から受信する受信手段と、
 前記通信相手からのSOAPリクエストによって要求された動作を実行し、そのSOAPリクエストに対するSOAPレスポンスに記載すべき実行結果を生成する手段とを設けたことを特徴とする通信装置。
A communication device capable of communicating with another communication device as a communication partner,
Transmitting means for writing a SOAP request to be transmitted to the communication partner and a SOAP response to the SOAP request from the communication partner in one message and transmitting the message to the communication partner;
Receiving means for receiving a SOAP response to the SOAP request transmitted to the communication partner and a SOAP request from the communication partner from the communication partner in a state described in one message;
Means for executing an operation requested by a SOAP request from the communication partner and generating an execution result to be described in a SOAP response to the SOAP request.
 請求項6記載の通信装置であって、
 前記SOAPリクエストには関数呼び出しを記載し、
 前記SOAPレスポンスにはその関数呼び出しによって呼び出された関数の実行結果を記載するようにしたことを特徴とする通信装置。
The communication device according to claim 6, wherein
Describe the function call in the SOAP request,
The communication device according to claim 1, wherein an execution result of the function called by the function call is described in the SOAP response.
 他の通信装置を通信相手として通信可能な通信装置であって、
 前記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、
 前記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、
 前記通信相手に対する動作要求を生成して前記第2の記憶手段に記憶させる要求生成手段と、
 前記第1の記憶手段から前記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を前記通信相手からの動作要求と関連付けて前記第1の記憶手段に記憶させる応答生成手段と、
 前記通信相手からの動作要求に対する動作応答を前記第1の記憶手段から読み出すと共に、前記通信相手に対する動作要求を前記第2の記憶手段から読み出す収集手段と、
 前記通信相手に対して、前記収集手段が読み出した動作応答の内容を記載したSOAPレスポンスと前記収集手段が読み出した動作要求の内容を記載したSOAPリクエストとを1つのメッセージに記載して送信する送信手段と、
 前記通信相手から、該通信相手に送信した動作要求に対する動作応答の内容を記載したSOAPレスポンスと該通信相手からの動作要求の内容を記載したSOAPリクエストとを1つのメッセージに記載した状態で受信する受信手段と、
 該受信手段が受信したSOAPリクエストに記載された前記通信相手からの動作要求の内容を前記第1の記憶手段に記憶させると共に、前記受信手段が受信したSOAPレスポンスに記載された、前記通信相手に送信した動作要求に対する動作応答の内容を、前記通信相手に送信した動作要求と関連付けて前記第2の記憶手段に記憶させる分配手段とを設けたことを特徴とする通信装置。
A communication device capable of communicating with another communication device as a communication partner,
First storage means for storing an operation request from the communication partner and an operation response to the operation request;
Second storage means for storing an operation request to the communication partner and an operation response to the operation request;
Request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means;
An operation request from the communication partner is read from the first storage unit, an operation related to the operation request is executed, and an operation response to the operation request is generated as a result of the execution, and the operation response is transmitted from the communication partner. Response generation means for storing in the first storage means in association with the operation request;
Collecting means for reading an operation response to the operation request from the communication partner from the first storage means and reading an operation request for the communication partner from the second storage means;
A transmission in which a SOAP response describing the contents of the operation response read by the collection unit and a SOAP request describing the contents of the operation request read by the collection unit are described in one message and transmitted to the communication partner. Means,
A SOAP response describing the contents of an operation response to the operation request transmitted to the communication partner and a SOAP request describing the contents of the operation request from the communication partner are received from the communication partner in a state described in one message. Receiving means;
The content of the operation request from the communication partner described in the SOAP request received by the receiving unit is stored in the first storage unit, and the content of the operation request described in the SOAP response received by the receiving unit is transmitted to the communication partner. A communication device, further comprising: a distribution unit that stores the content of an operation response to the transmitted operation request in the second storage unit in association with the operation request transmitted to the communication partner.
 請求項8記載の通信装置であって、
 前記第1の記憶手段及び前記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、
 前記応答生成手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して前記第1の記憶手段に記憶させる手段とし、
 前記収集手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求に対する動作応答から順に前記第1の記憶手段から読み出し、前記通信相手に対する動作要求のうち前記優先順位の高い動作要求から順に前記第2の記憶手段から読み出す手段としたことを特徴とする通信装置。
The communication device according to claim 8, wherein
Means for assigning priorities to the operation requests stored in the first storage means and the second storage means,
The response generation means, the operation request from the communication partner, read out in order from the operation request of the higher priority, and means for generating an operation response to the operation request and storing it in the first storage means,
The collecting means reads out from the first storage means in order from an operation response to the operation request having the higher priority among the operation requests from the communication partner, and reads the operation request having the higher priority among the operation requests to the communication partner. A communication device which reads out from the second storage means in order from the first storage means.
 互いを通信相手として通信可能な複数の通信装置によって構成した通信システムであって、
 各通信装置に、
 前記通信相手に送信すべき動作要求と前記通信相手からの動作要求に対する動作応答とを一括して前記通信相手に送信する送信手段と、
 前記通信相手に送信した動作要求に対する動作応答と前記通信相手からの動作要求とを一括して前記通信相手から受信する受信手段と、
 前記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段とを設けたことを特徴とする通信システム。
A communication system configured by a plurality of communication devices that can communicate with each other as a communication partner,
For each communication device,
A transmission unit that collectively transmits an operation request to be transmitted to the communication partner and an operation response to the operation request from the communication partner to the communication partner,
Receiving means for collectively receiving from the communication partner an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
Means for executing an operation related to the operation request from the communication partner, and generating an operation response to the operation request as an execution result.
 請求項10記載の通信システムであって、
 前記動作要求は関数呼び出しであり、
 前記動作応答はその関数呼び出しによって呼び出された関数の実行結果であることを特徴とする通信システム。
The communication system according to claim 10,
The operation request is a function call,
The communication system according to claim 1, wherein the operation response is an execution result of a function called by the function call.
 互いを通信相手として通信可能な複数の通信装置によって構成した通信システムであって、
 各通信装置に、
 前記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、
 前記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、
 前記通信相手に対する動作要求を生成して前記第2の記憶手段に記憶させる要求生成手段と、
 前記第1の記憶手段から前記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて前記第1の記憶手段に記憶させる応答生成手段と、
 前記通信相手からの動作要求に対する動作応答を前記第1の記憶手段から読み出すと共に、前記通信相手に対する動作要求を前記第2の記憶手段から読み出す収集手段と、
 前記通信相手に対して、前記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、
 前記通信相手から、該通信相手に送信した動作要求に対する動作応答と該通信相手からの動作要求とを一括して受信する受信手段と、
 該受信手段が受信した前記通信相手からの動作要求を前記第1の記憶手段に記憶させると共に、前記受信手段が受信した、前記通信相手に送信した動作要求に対する動作応答を、前記通信相手に送信した動作要求と関連付けて前記第2の記憶手段に記憶させる分配手段とを設けたことを特徴とする通信システム。
A communication system configured by a plurality of communication devices that can communicate with each other as a communication partner,
For each communication device,
First storage means for storing an operation request from the communication partner and an operation response to the operation request;
Second storage means for storing an operation request to the communication partner and an operation response to the operation request;
Request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means;
An operation request from the communication partner is read from the first storage unit, an operation related to the operation request is executed, an operation response to the operation request is generated as an execution result, and the operation request that has read the operation response is A response generation unit for storing the response in the first storage unit in association with the response generation unit;
Collecting means for reading an operation response to the operation request from the communication partner from the first storage means and reading an operation request for the communication partner from the second storage means;
Transmission means for collectively transmitting the operation response and the operation request read by the collection means to the communication partner,
From the communication partner, receiving means for collectively receiving an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
An operation request from the communication partner received by the receiving unit is stored in the first storage unit, and an operation response to the operation request transmitted to the communication partner received by the receiving unit is transmitted to the communication partner. And a distributing means for storing in the second storage means in association with the requested operation request.
 請求項12記載の通信システムであって、
 前記送信手段が、前記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信するようにし、
 前記受信手段が、前記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信するようにしたことを特徴とする通信システム。
The communication system according to claim 12,
The transmitting unit transmits an operation response and an operation request to be transmitted to the communication partner as SOAP messages, respectively.
A communication system, wherein the receiving means receives an operation response and an operation request received from the communication partner as a SOAP message.
 請求項12又は13記載の通信システムであって、
 前記各通信装置に、
 前記第1の記憶手段及び前記第2の記憶手段に記憶させた動作要求に優先順位を付す手段を設け、
 前記各通信装置の応答生成手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して前記第1の記憶手段に記憶させる手段とし、
 前記各通信装置の収集手段を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求に対する動作応答から順に前記第1の記憶手段から読み出し、前記通信相手に対する動作要求のうち前記優先順位の高い動作要求から順に前記第2の記憶手段から読み出す手段としたことを特徴とする通信システム。
The communication system according to claim 12 or 13, wherein
In each of the communication devices,
Means for assigning priorities to the operation requests stored in the first storage means and the second storage means,
Means for generating a response to the operation request in response to the operation request from the communication partner in order from the operation request having the highest priority, and storing the operation response in the first storage means age,
The collection unit of each communication device reads out from the first storage unit in order from the operation response to the operation request having the higher priority among the operation requests from the communication partner, and reads the priority order among the operation requests to the communication partner. A communication unit that reads out from the second storage unit in order from the operation request having the highest operation request.
 他の通信装置を通信相手として通信可能な通信装置の制御方法であって、
 前記通信相手に送信すべき動作要求と前記通信相手からの動作要求に対する動作応答とを一括して前記通信相手に送信する送信手順と、
 前記通信相手に送信した動作要求に対する動作応答と前記通信相手からの動作要求とを一括して前記通信相手から受信する受信手順と、
 前記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手順とを前記通信装置に実行させることを特徴とする通信装置の制御方法。
A method of controlling a communication device capable of communicating with another communication device as a communication partner,
A transmission procedure of collectively transmitting an operation request to be transmitted to the communication partner and an operation response to an operation request from the communication partner to the communication partner,
A receiving step of collectively receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
Controlling the communication device to execute an operation related to the operation request from the communication partner and generating an operation response to the operation request as an execution result.
 請求項15記載の通信装置の制御方法であって、
 前記動作要求は関数呼び出しであり、
 前記動作応答はその関数呼び出しによって呼び出された関数の実行結果であることを特徴とする通信装置の制御方法。
The control method of a communication device according to claim 15, wherein
The operation request is a function call,
The method according to claim 1, wherein the operation response is an execution result of a function called by the function call.
 他の通信装置を通信相手として通信可能な通信装置の制御方法であって、
 前記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶領域を設ける手順と、
 前記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶領域を設ける手順と、
 前記通信相手に対する動作要求を生成して前記第2の記憶領域に記憶させる要求生成手順と、
 前記第1の記憶領域から前記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて前記第1の記憶領域に記憶させる応答生成手順と、
 前記通信相手からの動作要求に対する動作応答を前記第1の記憶領域から読み出すと共に、前記通信相手に対する動作要求を前記第2の記憶領域から読み出す収集手順と、
 前記通信相手に対して、前記収集手順で読み出した動作応答と動作要求とを一括して送信する送信手順と、
 前記通信相手から、該通信相手に送信した動作要求に対する動作応答と該通信相手からの動作要求とを一括して受信する受信手順と、
 該受信手順で受信した前記通信相手からの動作要求を前記第1の記憶領域に記憶させると共に、前記受信手順で受信した、前記通信相手に送信した動作要求に対する動作応答を、前記通信相手に送信した動作要求と関連付けて前記第2の記憶領域に記憶させる分配手順とを前記通信装置に実行させることを特徴とする通信装置の制御方法。
A method of controlling a communication device capable of communicating with another communication device as a communication partner,
Providing a first storage area for storing an operation request from the communication partner and an operation response to the operation request;
Providing a second storage area for storing an operation request to the communication partner and an operation response to the operation request;
A request generation procedure for generating an operation request for the communication partner and storing the operation request in the second storage area;
An operation request from the communication partner is read from the first storage area, an operation related to the operation request is executed, an operation response to the operation request is generated as a result of the operation, and an operation request that has read the operation response includes A response generation procedure for associating and storing the response in the first storage area;
Collecting an operation response to the operation request from the communication partner from the first storage area, and collecting an operation request to the communication partner from the second storage area;
To the communication partner, a transmission procedure for collectively transmitting the operation response and the operation request read in the collection procedure,
A receiving step of collectively receiving, from the communication partner, an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner;
An operation request from the communication partner received in the receiving procedure is stored in the first storage area, and an operation response to the operation request sent to the communication partner received in the receiving procedure is transmitted to the communication partner. And distributing the communication device in the second storage area in association with the requested operation request.
 請求項17記載の通信装置の制御方法であって、
 前記送信手順において、前記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信させるようにし、
 前記受信手段において、前記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信させるようにしたことを特徴とする通信装置の制御方法。
The control method for a communication device according to claim 17, wherein
In the transmission procedure, an operation response and an operation request to be transmitted to the communication partner are transmitted as SOAP messages, respectively.
The control method of a communication device, wherein the receiving means receives an operation response and an operation request received from the communication partner as a SOAP message.
 請求項17又は18記載の通信装置の制御方法であって、
 前記第1の記憶領域及び前記第2の記憶領域に記憶させた動作要求に優先順位を付す手順を前記通信装置に実行させ、
 前記応答生成手順に、前記通信相手からの動作要求のうち前記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して前記第1の記憶領域に記憶させるようにし、
 前記収集手順に、前記通信相手からの動作要求のうち前記優先順位の高い動作要求に対する動作応答から順に前記第1の記憶領域から読み出し、前記通信相手に対する動作要求のうち前記優先順位の高い動作要求から順に前記第2の記憶領域から読み出させるようにしたことを特徴とする通信装置の制御方法。
It is a control method of the communication apparatus of Claim 17 or 18, Comprising:
Causing the communication device to execute a procedure of assigning priorities to the operation requests stored in the first storage area and the second storage area;
In the response generation procedure, among the operation requests from the communication partner, read out in order from the operation request with the higher priority, generate an operation response to the operation request and store the operation response in the first storage area,
In the collecting procedure, the operation request is read from the first storage area in order from the operation response to the operation request with the higher priority among the operation requests from the communication partner, and the operation request with the higher priority is selected from the operation requests to the communication partner. A method of controlling the communication device, wherein the data is read from the second storage area in order from the first storage area.
 コンピュータを、他の通信装置を通信相手として通信可能な通信装置として機能させるためのプログラムであって、
 前記コンピュータを、
 前記通信相手に送信すべき動作要求と前記通信相手からの動作要求に対する動作応答とを一括して前記通信相手に送信する送信手段と、
 前記通信相手に送信した動作要求に対する動作応答と前記通信相手からの動作要求とを一括して前記通信相手から受信する受信手段と、
 前記通信相手からの動作要求に係る動作を実行し、実行結果としてその動作要求に対する動作応答を生成する手段として機能させるためのプログラム。
A program for causing a computer to function as a communication device capable of communicating with another communication device as a communication partner,
Said computer,
A transmission unit that collectively transmits an operation request to be transmitted to the communication partner and an operation response to the operation request from the communication partner to the communication partner,
Receiving means for collectively receiving from the communication partner an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
A program for executing an operation related to an operation request from the communication partner and causing the unit to function as a unit that generates an operation response to the operation request as an execution result.
 請求項20記載のプログラムであって、
 前記動作要求は関数呼び出しであり、
 前記動作応答はその関数呼び出しによって呼び出された関数の実行結果であることを特徴とするプログラム。
The program according to claim 20, wherein
The operation request is a function call,
The program is characterized in that the operation response is an execution result of a function called by the function call.
 コンピュータを、他の通信装置を通信相手として通信可能な通信装置として機能させるためのプログラムであって、
 前記コンピュータを、
 前記通信相手からの動作要求とこの動作要求に対する動作応答とを記憶する第1の記憶手段と、
 前記通信相手に対する動作要求とこの動作要求に対する動作応答とを記憶する第2の記憶手段と、
 前記通信相手に対する動作要求を生成して前記第2の記憶手段に記憶させる要求生成手段と、
 前記第1の記憶手段から前記通信相手からの動作要求を読み出し、その動作要求に係る動作を実行し、その実行結果としてその動作要求に対する動作応答を生成し、その動作応答を読み出した動作要求と関連付けて前記第1の記憶手段に記憶させる応答生成手段と、
 前記通信相手からの動作要求に対する動作応答を前記第1の記憶手段から読み出すと共に、前記通信相手に対する動作要求を前記第2の記憶手段から読み出す収集手段と、
 前記通信相手に対して、前記収集手段が読み出した動作応答と動作要求とを一括して送信する送信手段と、
 前記通信相手から、該通信相手に送信した動作要求に対する動作応答と該通信相手からの動作要求とを一括して受信する受信手段と、
 該受信手段が受信した前記通信相手からの動作要求を前記第1の記憶手段に記憶させると共に、前記受信手段が受信した、前記通信相手に送信した動作要求に対する動作応答を、前記通信相手に送信した動作要求と関連付けて前記第2の記憶手段に記憶させる分配手段として機能させるためのプログラム。
A program for causing a computer to function as a communication device capable of communicating with another communication device as a communication partner,
Said computer,
First storage means for storing an operation request from the communication partner and an operation response to the operation request;
Second storage means for storing an operation request to the communication partner and an operation response to the operation request;
Request generation means for generating an operation request for the communication partner and storing the operation request in the second storage means;
An operation request from the communication partner is read from the first storage unit, an operation related to the operation request is executed, an operation response to the operation request is generated as an execution result, and the operation request that has read the operation response is A response generation unit for storing the response in the first storage unit in association with the response generation unit;
Collecting means for reading an operation response to the operation request from the communication partner from the first storage means and reading an operation request for the communication partner from the second storage means;
Transmission means for collectively transmitting the operation response and the operation request read by the collection means to the communication partner,
From the communication partner, receiving means for collectively receiving an operation response to the operation request transmitted to the communication partner and an operation request from the communication partner,
An operation request from the communication partner received by the receiving unit is stored in the first storage unit, and an operation response to the operation request transmitted to the communication partner received by the receiving unit is transmitted to the communication partner. A program for functioning as distribution means to be stored in the second storage means in association with the requested operation request.
 請求項22記載のプログラムであって、
 前記送信手段の機能を、前記通信相手に送信すべき動作応答と動作要求とを、それぞれSOAPメッセージとして送信する機能とし、
 前記受信手段の機能を、前記通信相手から受信する動作応答と動作要求とを、それぞれSOAPメッセージとして受信する機能としたことを特徴とするプログラム。
23. The program according to claim 22, wherein
The function of the transmitting means, a function of transmitting an operation response and an operation request to be transmitted to the communication partner as a SOAP message, respectively,
A program according to claim 1, wherein the function of said receiving means is a function of receiving an operation response and an operation request received from said communication partner as a SOAP message.
 請求項22又は23記載のプログラムであって、
 前記コンピュータを、前記第1の記憶手段及び前記第2の記憶手段に記憶させた動作要求に優先順位を付す手段として機能させるためのプログラムをさらに含め、
 前記応答生成手段の機能を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求から順に読み出し、その動作要求に対する動作応答を生成して前記第1の記憶手段に記憶させる機能とし、
 前記収集手段の機能を、前記通信相手からの動作要求のうち前記優先順位の高い動作要求に対する動作応答から順に前記第1の記憶手段から読み出し、前記通信相手に対する動作要求のうち前記優先順位の高い動作要求から順に前記第2の記憶手段から読み出す機能としたことを特徴とするプログラム。
The program according to claim 22 or 23,
A program for causing the computer to function as means for assigning priorities to the operation requests stored in the first storage means and the second storage means,
A function of the response generation unit, a function of reading out the operation requests of the communication partners in order from the operation request with the highest priority, generating an operation response to the operation request and storing the operation response in the first storage unit,
The function of the collection unit is read from the first storage unit in order from the operation response to the operation request with the higher priority among the operation requests from the communication partner, and the operation request with the higher priority among the operation requests to the communication partner is A program having a function of reading from the second storage means in order from an operation request.
 請求項20乃至24のいずれか一項記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。
 
A computer-readable recording medium on which the program according to any one of claims 20 to 24 is recorded.
JP2003305514A 2002-09-19 2003-08-28 Communication equipment, communication system, method for controlling communication equipment, program and recording medium Pending JP2004139566A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003305514A JP2004139566A (en) 2002-09-19 2003-08-28 Communication equipment, communication system, method for controlling communication equipment, program and recording medium
EP03255846.2A EP1418732B1 (en) 2002-09-19 2003-09-18 Communication system implementing a plurality of communication apparatuses as communication client and communication server for exchanging operation requests and operation responses
US10/665,745 US7620700B2 (en) 2002-09-19 2003-09-22 Communication system implementing a plurality of communication apparatuses as communication client and communication server for exchanging operation requests and operation responses

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002272978 2002-09-19
JP2002276451 2002-09-24
JP2003305514A JP2004139566A (en) 2002-09-19 2003-08-28 Communication equipment, communication system, method for controlling communication equipment, program and recording medium

Publications (1)

Publication Number Publication Date
JP2004139566A true JP2004139566A (en) 2004-05-13

Family

ID=32475192

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003305514A Pending JP2004139566A (en) 2002-09-19 2003-08-28 Communication equipment, communication system, method for controlling communication equipment, program and recording medium

Country Status (1)

Country Link
JP (1) JP2004139566A (en)

Similar Documents

Publication Publication Date Title
US7620700B2 (en) Communication system implementing a plurality of communication apparatuses as communication client and communication server for exchanging operation requests and operation responses
EP1638290B1 (en) System, method and intermediary server for transmitting operational requests and responses between apparatuses
US7254601B2 (en) Method and apparatus for managing intelligent assets in a distributed environment
JP4704105B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
EP1638289B1 (en) Transfer device, system and method for mediating communications between first and second communication devices
EP2254310A2 (en) Web service system and method
JP2004334896A (en) Framework having plug-and-play function and its reconstruction method
US20080123668A1 (en) Systems for dynamic inter-operability of nodes in service grids
US7822864B2 (en) Communication apparatus, program product for adding communication mechanism to communication apparatus for providing improved usability and communication efficiency, and recording medium storing program product
JP2004139586A (en) Mediation device, communication system, method for controlling mediation device, program and recording medium
JP2005322222A (en) Communication function adding method, program, storage medium and communication apparatus
JP4966039B2 (en) Network-compatible device and function providing method
JP4382006B2 (en) Mediation apparatus, communication system, communication method, program, and recording medium
Anke et al. A service-oriented middleware for integration and management of heterogeneous smart items environments
JP4030943B2 (en) Image processing apparatus, image processing system, control method for image processing apparatus, program, and recording medium
US8688858B2 (en) Image processing device, device management system, and image processing method
US20030005106A1 (en) Communication control apparatus and method
JP4160480B2 (en) Mediation device, communication system, mediation device control method, program, and recording medium
JP2004139565A (en) Communication method
JP4198562B2 (en) Communication client, communication server, communication system, and communication method
JP2005259106A (en) Mediating device, distributed processing system, data transfer method, program, and recording medium
JP2004140803A (en) Communication client, method of controlling communication client, program, and recording medium therefor
JP2004139566A (en) Communication equipment, communication system, method for controlling communication equipment, program and recording medium
JP2004140804A (en) Communication server, method of controlling communication server, program, and record medium
JP2005259105A (en) Mediating device, communication system, control method of mediating device, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051019

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080304

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080501

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080603