JP4198562B2 - Communication client, communication server, communication system, and communication method - Google Patents

Communication client, communication server, communication system, and communication method Download PDF

Info

Publication number
JP4198562B2
JP4198562B2 JP2003305517A JP2003305517A JP4198562B2 JP 4198562 B2 JP4198562 B2 JP 4198562B2 JP 2003305517 A JP2003305517 A JP 2003305517A JP 2003305517 A JP2003305517 A JP 2003305517A JP 4198562 B2 JP4198562 B2 JP 4198562B2
Authority
JP
Japan
Prior art keywords
request
communication
client
server
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.)
Expired - Lifetime
Application number
JP2003305517A
Other languages
Japanese (ja)
Other versions
JP2004139567A (en
Inventor
弘幸 松島
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 JP2003305517A priority Critical patent/JP4198562B2/en
Priority to EP03255846.2A priority patent/EP1418732B1/en
Priority to US10/665,745 priority patent/US7620700B2/en
Publication of JP2004139567A publication Critical patent/JP2004139567A/en
Application granted granted Critical
Publication of JP4198562B2 publication Critical patent/JP4198562B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

この発明は、通信サーバと通信を行う通信クライアント、通信クライアントと通信を行う通信サーバ、通信クライアントと通信サーバとを備える通信システム、及び上記のような通信クライアントあるいは通信サーバに実行させる通信方法に関する。 The present invention relates to a communication client that communicates with a communication server , a communication server that communicates with a communication client, a communication system that includes the communication client and the communication server, and a communication method that is executed by the communication client or the communication server.

従来から、通信装置をネットワークを介して接続した通信システムにおいて、通信装置同士で互いにメッセージを交換させることにより、通信相手の装置に対して通知や要求を行わせることが行われている。そして、このようなシステムにおいて、ある装置から別の装置に動作要求としてコマンドを送信して動作を実行させ、送信相手から動作の実行結果を動作応答として返信させることも行われている。
また、通信システムを構成する通信装置の一部を通信クライアント、他の一部を通信サーバとし、通信クライアントと通信サーバとの間の通信を、常に通信クライアントから通信サーバに通信要求を送信し、通信サーバからその送信元の通信クライアントに対して通信応答を返すというプロトコルで行うようにすることも知られている。
そこで、通信クライアントから通信サーバへの動作要求を通信要求に記載して送信し、その動作要求に対する動作応答を通信応答に記載して通信サーバから通信クライアントに返信することも行われている。
2. Description of the Related Art Conventionally, in a communication system in which communication devices are connected via a network, communication devices are exchanged with each other so that a communication partner device is notified or requested. In such a system, a command is transmitted as an operation request from one device to another device to execute the operation, and an operation execution result is returned from the transmission partner as an operation response.
Further, a part of the communication device constituting the communication system is a communication client, the other part is a communication server, communication between the communication client and the communication server is always transmitted from the communication client to the communication server, It is also known to use a protocol in which a communication response is returned from a communication server to the transmission source communication client.
Thus, an operation request from the communication client to the communication server is described in the communication request and transmitted, and an operation response to the operation request is described in the communication response and returned from the communication server to the communication client.

また、逆に通信サーバから通信クライアントに動作要求を送信して動作を行わせる技術としては、以下のようなものが知られている。
例えば、特許文献1には、リモートプロセッサがローカルプロセッサに対して実行されるべきコマンドを指示するメッセージを送信し、そのコマンドに対する応答を受信することが記載されている。
また、この文献には、ローカルプロセッサがファイアウォールの内側に配置されている場合において、ローカルプロセッサからファイアウォールの外側のリモートプロセッサに通信要求を送信し、リモートプロセッサがこの通信要求に対する応答としてローカルプロセッサに対してコマンドを送信するようにすることにより、ファイアウォールの外側から内側に向けてコマンドを送信できるようにする技術も開示されている。
この場合において、ローカルプロセッサが通信クライアントに、リモートプロセッサが通信サーバに該当する。
特開2001−273211号公報
On the other hand, as a technique for transmitting an operation request from a communication server to a communication client to perform an operation, the following is known.
For example, Patent Document 1 describes that a remote processor transmits a message indicating a command to be executed to a local processor and receives a response to the command.
Also, in this document, when a local processor is placed 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 response to the communication request to the local processor. A technique is also disclosed in which a command can be transmitted from the outside to the inside of the firewall by transmitting the command.
In this case, the local processor corresponds to the communication client, and the remote processor corresponds to the communication server.
JP 20012733211 A

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

ところで、複数の通信装置間でメッセージを交換する場合において、コマンドを送信する通信装置は、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 send commands to each other. In this case, the communication device that has received the command is caused to return an execution result to the source of each command. It is requested 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 for a command received from the communication partner device.

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

上記の目的を達成するため、この発明の通信クライアントは、通信サーバと通信を行う通信クライアントにおいて、前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1の記憶手段と、前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2の記憶手段と、前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手段と、前記第1の記憶手段から、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2の記憶手段から、前記進捗状況が未処理である前記クライアント要求を取得する収集手段と、前記収集手段が取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信する送信手段とを設けたものである。 In order to achieve the above object, a communication client according to the present invention includes a server request received from the communication server as a request for performing a predetermined operation and a response to the server request. First storage means for storing a certain operation response, second storage means for storing a client request that is a request for performing a predetermined operation on the communication server, and operations related to each of the server request and the client request The progress status has been processed from state storage means for storing status information indicating whether the progress status is unprocessed, being processed, or processed, and the first storage means. An operation response related to the server request is acquired, and the client request whose progress status is unprocessed is acquired from the second storage unit. A collecting means for, in which a communication request including said collection means and said operation response has acquired and the client requests are provided and transmission means for transmitting to the communication server.

このような通信クライアントであって、前記第1の記憶手段から前記進捗状況が未処理である前記サーバ要求を検索し、該サーバ要求の内容に応じて定まる適当なモジュールに該サーバ要求に係る動作を実行させると共に、該サーバ要求についての前記状態情報を処理中に変更する要求処理手段を設けるとよい。Such a communication client retrieves the server request whose progress status is unprocessed from the first storage means, and operates the server request in an appropriate module determined according to the content of the server request. And request processing means for changing the status information about the server request during processing.
さらに、複数の前記要求処理手段を、複数のスレッドで同時に動作させるようにするとよい。Further, it is preferable that a plurality of the request processing means are operated simultaneously by a plurality of threads.
また、前記送信手段を、複数の前記動作応答と複数の前記クライアント要求とを含む通信要求を送信する手段とするとよい。The transmission means may be a means for transmitting a communication request including a plurality of the operation responses and a plurality of the client requests.

さらにまた、前記送信手段が、前記収集手段による前記動作応答及び前記クライアント要求の取得有無に関わらず、定期的に通信要求を前記通信サーバに送信するようにするとよい。Furthermore, it is preferable that the transmission unit periodically transmits a communication request to the communication server regardless of whether the operation response and the client request are acquired by the collection unit.
さらに、前記通信サーバから前記サーバ要求を受けた場合、該サーバ要求に対する動作応答を、前記送信手段が次回以降の前記定期的な通信要求に含めて送信するようにするとよい。Furthermore, when the server request is received from the communication server, the operation response to the server request may be transmitted by being included in the periodic communication request from the next time onward.

また、この発明の通信サーバは、通信クライアントと通信を行う通信サーバにおいて、前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1の記憶手段と、前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2の記憶手段と、前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手段と、前記第1の記憶手段から、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2の記憶手段から、前記進捗状況が未処理である前記サーバ要求を取得する収集手段と、前記通信クライアントから受けた通信要求に対して、前記収集手段が取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信する送信手段とを設けたものである。The communication server of the present invention stores a client request that is a request to perform a predetermined operation received from the communication client and an operation response that is a response to the client request, in the communication server that communicates with the communication client. The first storage means for performing the operation, and the second storage means for storing a server request for requesting the communication client to perform a predetermined operation; State storage means for storing state information indicating which state is processed, being processed, or processed, and an operation related to the client request whose progress status has been processed from the first storage means A response is acquired, and the server request whose progress status is unprocessed is acquired from the second storage unit. Means and to the communication request received from the communication client, in which the communication response comprising the collector means the operational response and which has acquired said server request is provided and transmitting means for transmitting to the communication client.

このような通信サーバにおいて、前記第1の記憶手段から前記進捗状況が未処理である前記クライアント要求を検索し、該クライアント要求の内容に応じて定まる適当なモジュールに該クライアント要求に係る動作を実行させると共に、該クライアント要求についての前記状態情報を処理中に変更する要求処理手段を設けるとよい。In such a communication server, the client request whose progress status is unprocessed is searched from the first storage unit, and the operation related to the client request is executed in an appropriate module determined according to the content of the client request. And request processing means for changing the status information about the client request during processing.
さらに、複数の前記要求処理手段を、複数のスレッドで同時に動作させるようにするとよい。Further, it is preferable that a plurality of the request processing means are operated simultaneously by a plurality of threads.
また、前記送信手段を、複数の前記動作応答と複数の前記サーバ要求とを含む通信応答を送信する手段とするとよい。The transmission means may be a means for transmitting a communication response including a plurality of the operation responses and a plurality of the server requests.

また、この発明は、通信クライアントと通信サーバとを備える通信システムにおいて、前記通信クライアントに、前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1のクライアント側記憶手段と、前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2のクライアント側記憶手段と、前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶するクライアント側状態記憶手段と、前記第1のクライアント側記憶手段から、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2のクライアント側記憶手段から、前記進捗状況が未処理である前記クライアント要求を取得するクライアント側収集手段と、前記クライアント側収集手段が取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信するクライアント側送信手段とを設け、前記通信サーバに、前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1のサーバ側記憶手段と、前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2のサーバ側記憶手段と、前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶するサーバ側状態記憶手段と、前記第1のサーバ側記憶手段から、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2のサーバ側記憶手段から、前記進捗状況が未処理である前記サーバ要求を取得するサーバ側収集手段と、前記通信クライアントから受けた通信要求に対して、前記サーバ側収集手段が取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信するサーバ側送信手段とを設けたものである。Further, the present invention provides a communication system including a communication client and a communication server, wherein the communication client receives a request from the communication server to perform a predetermined operation and a response to the server request. A first client-side storage unit that stores a response; a second client-side storage unit that stores a client request that is a request to perform a predetermined operation on the communication server; and each of the server request and the client request. With respect to the progress status of the operation, the progress from the client-side status storage means for storing status information indicating whether the status is unprocessed, in-process, or processed, and the progress from the first client-side storage means An operation response related to the server request whose status has been processed is acquired, and the second client A communication request including a client-side collection unit that acquires the client request whose progress status is unprocessed from the side storage unit, and the operation response and the client request acquired by the client-side collection unit. A client-side transmitting means for transmitting, and storing, in the communication server, a client request that is a request to perform a predetermined operation received from the communication client and an operation response that is a response to the client request The server-side storage unit, the second server-side storage unit that stores a server request that is a request for performing a predetermined operation on the communication client, and the progress of the operation related to each of the client request and the server request State information indicating whether the state is in process, in process, or processed The server-side status storage means and the first server-side storage means obtain an operation response related to the client request whose processed progress has been processed, and from the second server-side storage means, the progress A server-side collection unit that acquires the server request whose status is unprocessed, and a communication response that includes the operation response and the server request acquired by the server-side collection unit in response to a communication request received from the communication client Is provided with server-side transmission means for transmitting the message to the communication client.

また、この発明の通信方法は、通信サーバと通信を行う通信クライアントに実行させる通信方法において、前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1の記憶手順と、前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2の記憶手順と、前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手順と、前記第1の記憶手順で記憶した、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2の記憶手順で記憶した、前記進捗状況が未処理である前記クライアント要求を取得する収集手順と、前記収集手順で取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信する送信手順とを有するものである。Also, the communication method of the present invention is a server request that is a request to perform a predetermined operation received from the communication server and a response to the server request in a communication method that is executed by a communication client that communicates with a communication server. A first storage procedure for storing an operation response, a second storage procedure for storing a client request that is a request for performing a predetermined operation on the communication server, and an operation relating to each of the server request and the client request. Regarding the progress status, the status storage procedure for storing state information indicating whether the status is unprocessed, being processed, or processed, and the progress status stored in the first storage procedure has been processed. The client request that has acquired an operation response related to the server request and that has been stored in the second storage procedure and whose progress status is unprocessed A collection procedure for acquiring, at a communication request including the collection procedure the operational response and acquired in the said client request having a transmission step of transmitting to the communication server.

このような通信方法において、前記第1の記憶手順で記憶したサーバ要求から前記進捗状況が未処理であるサーバ要求を検索し、該サーバ要求の内容に応じて定まる適当なモジュールに該サーバ要求に係る動作を実行させると共に、該サーバ要求について記憶している前記状態情報を処理中に変更する要求処理手順をさらに設けるとよい。In such a communication method, a server request whose progress status is unprocessed is searched from the server request stored in the first storage procedure, and the server request is assigned to an appropriate module determined according to the content of the server request. It is preferable to further provide a request processing procedure for executing such an operation and changing the state information stored for the server request during processing.
さらに、前記要求処理手順の処理を複数のスレッドで同時に複数実行するようにするとい。Furthermore, a plurality of processes of the request processing procedure may be executed simultaneously by a plurality of threads.
また、前記送信手順を、複数の前記動作応答と複数の前記クライアント要求とを含む通信要求を送信する手順とするとよい。The transmission procedure may be a procedure for transmitting a communication request including a plurality of the operation responses and a plurality of the client requests.

さらにまた、前記送信手順において、前記収集手順における前記動作応答及び前記クライアント要求の取得有無に関わらず、定期的に通信要求を前記通信サーバに送信するようにするとよい。Furthermore, in the transmission procedure, a communication request may be periodically transmitted to the communication server regardless of whether or not the operation response and the client request are acquired in the collection procedure.
さらに、前記通信サーバから前記サーバ要求を受けた場合、該サーバ要求に対する動作応答を、前記送信手順で次回以降の前記定期的な通信要求に含めて送信するようにするとよい。Furthermore, when the server request is received from the communication server, an operation response to the server request may be included in the periodic communication request for the next and subsequent transmissions in the transmission procedure.

また、この発明の別の通信方法は、通信クライアントと通信を行う通信サーバに実行させる通信方法において、前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1の記憶手順と、前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2の記憶手順と、前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手順と、前記第1の記憶手順で記憶した、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2の記憶手順で記憶した、前記進捗状況が未処理である前記サーバ要求を取得する収集手順と、前記通信クライアントから受けた通信要求に対して、前記収集手順で取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信する送信手順とを設けたものである。According to another communication method of the present invention, in a communication method executed by a communication server that communicates with a communication client, a client request that is a request for performing a predetermined operation received from the communication client, and a response to the client request A first storage procedure for storing the operation response, a second storage procedure for storing a server request that is a request for performing a predetermined operation on the communication client, and each of the client request and the server request Regarding the operation progress status, a status storage procedure for storing status information indicating whether the status is unprocessed, in-process, or processed, and the progress status stored in the first storage procedure is processed. The operation response related to the client request that has been completed is acquired, and the progress status stored in the second storage procedure is not processed. A collection procedure for acquiring the server request, and a transmission for transmitting a communication response including the operation response and the server request acquired in the collection procedure to the communication client in response to the communication request received from the communication client. Procedure.

このような通信方法において、前記第1の記憶手順で記憶したクライアント要求から前記進捗状況が未処理であるクライアント要求を検索し、該クライアント要求の内容に応じて定まる適当なモジュールに該クライアント要求に係る動作を実行させると共に、該クライアント要求についての前記状態情報を処理中に変更する要求処理手順をさらに設けるとよい。In such a communication method, a client request whose progress status is not processed is searched from the client request stored in the first storage procedure, and the client request is assigned to an appropriate module determined according to the content of the client request. It is preferable to further provide a request processing procedure for executing such an operation and changing the status information regarding the client request during processing.
さらに、前記要求処理手順の処理を複数のスレッドで同時に複数実行するようにするとよい。Furthermore, it is preferable that a plurality of processes of the request processing procedure are executed simultaneously by a plurality of threads.
また、前記送信手順を、複数の前記動作応答と複数の前記サーバ要求とを含む通信応答を送信する手順とするとよい。The transmission procedure may be a procedure for transmitting a communication response including a plurality of the operation responses and a plurality of the server requests.

以上のようなこの発明の通信クライアント、通信サーバ、通信システム及び通信方法によれば、通信要求とそれに対する通信応答とを送受信する複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する通信システムを構成する場合において、通信の効率を上げることができる。 According to the communication client, communication server, communication system, and communication method of the present invention as described above, a plurality of communication devices that transmit and receive a communication request and a communication response to the communication request send an operation request to each other and an operation response to the received operation request. In the case of configuring a communication system for transmission and reception, communication efficiency can be increased.

以下、この発明を実施するための最良の形態について、図面を参照して説明する。
まず図1に、この発明の通信装置を用いて構成したこの発明の通信システムの構成例を示す。
この通信システムは、図1に示すように、それぞれこの発明の通信装置である第1の通信装置1と第2の通信装置2とをネットワーク10によって接続して構成している。
そして、第1の通信装置1及び第2の通信装置2は、通信機能を備えたPC等のコンピュータを始め、通信機能及び情報処理機能を備えた各種電子装置として構成することができる。ネットワーク10としては、インターネットやLAN(ローカルエリアネットワーク)を始め、有線、無線を問わず、ネットワーク通信が可能な各種通信経路を用いることができる。
The best mode for carrying out the present invention will be described below with reference to the drawings.
First, FIG. 1 shows a configuration example of a communication system of the present invention configured using the communication apparatus 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, via 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)となり、動作応答はその関数呼び出しによって呼び出された関数の実行結果となる。
Further, the first communication device 1 and the second communication device 2 are mounted with application programs for performing mutual control management. Each of these nodes transmits an “operation request” that is a request for processing for a method of the application program to be implemented by RPC (Remote Procedure Call), and “operation response” is a result of the requested processing. Can be acquired. That is, the first communication device 1 generates a request to the second communication device 2 (hereinafter referred to as a first communication device-side request), delivers it to the second communication device 2, and responds to this request. 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 it to the first communication device 1, A response to this request can be acquired.
Here, the method is defined as a logical function that defines the format of input and output. In this case, the operation request is a function call for calling this function (Procedure Call), 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 receives the request transmits an operation response to the request. It becomes a model to return.

図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 where 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 receives the request returns an operation response to the request. It becomes a model.
Here, SOAP (Simple Object Access Protocol) is adopted as a protocol for passing arguments and return values by RPC, and the above operation request and response are described here as SOAP messages.

この発明の特徴は、このように複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する場合において、通信相手の装置に送信すべき動作要求とその通信相手の装置から受信した動作要求に対する動作応答とを一括して送信するようにする点である。
そして、実際に動作要求や動作応答を転送するための通信プロトコルとしては、システムの構成に合わせて適当なものを採用することができ、例えばHTTP(HyperText Transfer Protocol)やSMTP(Simple Mail Transfer Protocol)を採用することができる。ただし、SMTPによって転送される電子メールには通信要求と通信応答のような対応関係がないため、SMTPを採用したシステムは、この発明の通信システムの実施例には含まれない。
そこで、まず通信プロトコルにHTTPを採用する場合の実施例について説明し、次にSMTPを採用する場合についても参考例として説明する。
The feature of the present invention is that when a plurality of communication devices transmit / receive operation requests and operation responses to received operation requests to each other, the operation request to be transmitted to the communication partner device and the communication request device received from the communication partner device. 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. However, since the electronic mail transferred by SMTP does not have a correspondence relationship such as a communication request and a communication response, a system employing SMTP is not included in the embodiment of the communication system of the present invention.
Therefore, first, an embodiment in which HTTP is adopted as a communication protocol will be described, and then a case in which SMTP is adopted will be described as a reference example.

〔HTTPを採用する場合の実施例:図3乃至図21〕
図3に、HTTPを採用する場合の実施例を適用する通信システムの構成例を示す。
この通信システムは、図3に示すように、HTTPサーバ12とHTTPクライアント11とをインターネット13によって接続して構成している。ただし、セキュリティを向上させるため、HTTPクライアント11はファイアウォール14を介してインターネット13に接続するようにしている。そして、HTTPサーバ12が通信サーバであって第1の通信装置に該当し、HTTPクライアント11が通信クライアントであって第2の通信装置に該当する。
[Example when HTTP is adopted: FIGS. 3 to 21]
FIG. 3 shows a configuration example of a communication system to which an embodiment in the case of adopting HTTP is applied.
As shown in FIG. 3, this communication system is configured by connecting an HTTP server 12 and an HTTP client 11 via the Internet 13. However, in order to improve security, the HTTP client 11 is connected to the Internet 13 via the firewall 14. The HTTP server 12 is a communication server and corresponds to the first communication device, and the HTTP client 11 is a communication client and corresponds to the 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. Data can only be sent in the form of (response). Therefore, in this communication system, the node inside the firewall 14 is the HTTP client 11, and the node outside is the HTTP server 12. Therefore, the functions of these nodes need not be limited to the client or server except for communication between them.

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

図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 an operation request for the HTTP server 12 is generated by the HTTP client 11. In this case, the HTTP client 11 generates a client-side operation request (corresponding to a client request; hereinafter also referred to as “client command”) and transmits it to the HTTP server 12, and the HTTP server 12 that has received this request responds to the command. It 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 for 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. It is a model that returns motion 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 symmetrical at the communication level.

図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 an HTTP response is transmitted from the HTTP server 12 as a communication response to the communication request. The procedure is to return to 11. For example, the HTTP server 12 returns an HTTP response X to the HTTP request X transmitted from the HTTP client 11, and similarly 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 that 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 am trying to send it. In the HTTP response, a server command that 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 am trying to send it.

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

また、上記図4(A)のケースでは、クライアントコマンドが生成された後直ちにHTTPクライアント11がHTTPサーバ12とコネクションを確立し、HTTPリクエストにこれを含めて引き渡すことができるが、上記図4(B)のケースでは、HTTPクライアント11側に設置されたファイアウォール14がHTTPサーバ12からのHTTPリクエストを遮断するため、HTTPサーバ12側からHTTPクライアント11へアクセスしてサーバコマンドを直ちに引き渡すことができない。   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 the HTTP request can be delivered including this in the HTTP request. In the case of B), since the firewall 14 installed on the HTTP client 11 side blocks the HTTP request from the HTTP server 12, it is not possible to access the HTTP client 11 from the HTTP server 12 side and immediately deliver the server command.

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

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

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

図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, each of the HTTP client 11 and the HTTP server 12 includes 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を始めとするネットワークを介して通信相手と情報の送受信を行うための通信手段である。
These components will be described more specifically. First, the CPU 31 is a control unit that comprehensively controls the 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 apparatus is turned off. The NIC 35 is a communication means for transmitting / receiving information to / 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 functions for performing processing related to commands and command responses among the 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 transmission unit 46 and the HTTP response reception 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 further detail.
First, the client command pool 41 corresponds to a second storage area provided in the HTTP client 11, and is a pool that registers 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 that registers 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 information is stored to associate the command with information such as identification information and a response. Further, it is assumed that the 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 unit 43 corresponds to a request generation unit. Then, a client command is generated, identification information (ID) for identifying the command is assigned, management information for managing the command is further attached, and these information are associated with each other as a client command sheet in a table format. It has a function of registering in the pool 41. Of these, for example, an application provided in the HTTP client 11 corresponds to a part that generates a client command. In addition, the client command generation unit 43 may be provided with a function of attaching the priority order for causing the HTTP server 12 to execute each command to the generated client command.

ここで、図9にHTTPクライアント11のクライアントコマンドシートにおけるデータ構造の例を示す。
この図に示すように、HTTPクライアント11においては、クライアントコマンドシートには、「コマンドID」、「メソッド名」、「入力パラメータ」、「状態」、「クライアントコマンド実行結果の通知先」、および「出力パラメータ」のデータを記憶する領域を設けている。そして、このうち「コマンドID」、「メソッド名」、および「入力パラメータ」がクライアントコマンド(及びそこに付されたID)に該当し、「状態」及び「クライアントコマンド実行結果の通知先」が管理情報に該当する。「出力パラメータ」は、HTTPサーバ12から受信するコマンド応答の内容である。
FIG. 9 shows an example of the 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 “output parameter” data is provided. Of these, “command ID”, “method name”, and “input parameter” correspond to client commands (and IDs attached thereto), and “status” and “notification destination of client command execution result” 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, “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. “Input parameter” is data attached to “method name”, and is an argument for calling a function. “Command ID” is identification information for identifying a client command. “Status” is data indicating the progress of processing related to the client command, and changes from “not transmitted” → “waiting for response” → “response received” with the progress of processing.

「クライアントコマンド実行結果の通知先」は、そのシートに記載しているクライアントコマンドに対する応答を受信した場合に、その旨を通知して必要な処理を実行させるモジュールを示す参照情報である。参照するモジュールは、クライアントコマンドを生成したアプリケーションであることが多いが、必ずしもそうである必要はない。「出力パラメータ」には、コマンド応答を受け取った段階で、その内容を格納する。HTTPサーバ12からのコマンド応答を受け取るまでは空である。   The “client command execution result notification destination” is reference information indicating a module that, when receiving a response to the client command described in the sheet, notifies that fact and executes a necessary process. The referenced module is often the application that generated the client command, but this need not be the case. The “output parameter” stores the contents 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 unit 44 corresponds to a response generating unit. The server command is an application that reads and executes a server command from the server command pool 42. 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. The server command received from the HTTP server 12 is registered in the server command pool 42 as a table-format server command sheet in association with an ID for identifying this command and management information for managing this command. ing. The command response generated by the server command execution result generating unit 44 is also registered in the server command sheet for the executed server command.

また、サーバコマンド実行結果生成手段44に、サーバコマンドプール42から複数の種類のサーバコマンドを読み出し、各サーバコマンドに対する応答を生成する機能を設けることが考えられる。さらに、サーバコマンドがHTTPクライアント11に優先して処理を実行させるための実行優先順位の情報を含む場合には、優先順位の高いものから優先的に読み出して実行する機能を設けることも考えられる。
なお、サーバコマンド実行結果生成手段44は、アプリケーションそのものではなく、サーバコマンドの実行に必要なアプリケーションを呼び出してコマンドを実行させるモジュールであってもよい。
Further, it is conceivable to provide the server command execution result generating 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. Furthermore, when the server command includes information on the execution priority for causing the HTTP client 11 to execute the processing with priority, it is possible to provide a function for reading and executing the information from the highest priority.
The server command execution result generating unit 44 may be a module that calls 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”, “state”, “output parameter”, and “server command notification destination”. An area for storing the data "is provided. Of these, “command ID”, “method name”, and “input parameter” correspond to the server command (and the ID attached thereto), and “status” and “server command notification destination” are 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. “Input parameter” is data attached to “method name”, and is an argument for calling a function. “Command ID” is identification information for identifying a server command. “Status” is data indicating the status of processing related to the server command. As the processing progresses, “Unprocessed” → “Processing completed” → “Responded” or “Unprocessed” → “Processing” → “Processing” “Complete” → “Responded”. The “output parameter” stores a response generated by the server command execution result generating unit 44. It is empty until the execution of the server command ends and the above “status” becomes “processing complete”. The “server command notification destination” is reference information indicating a module that executes a server command.

再び図8の説明に戻ると、送信メッセージ収集手段45は、収集手段に該当する。そして、サーバコマンド実行結果生成手段44が生成したコマンド応答とこのコマンド応答に対応するサーバコマンドのコマンドIDとを関連付けてサーバコマンドプール42から読み出すと共に、クライアントコマンド生成手段43が生成したクライアントコマンドとこのコマンドのコマンドIDとを関連付けてクライアントコマンドプール41から読み出し、これらから送信メッセージを生成する機能を有する。
なお、コマンド応答やクライアントコマンドに実行優先順位が指定されている場合には、送信メッセージ収集手段45がそれぞれ実行優先順位の高いものから順に読み出すようにすることが考えられる。
Returning to the description of FIG. 8 again, the transmission message collecting means 45 corresponds to the collecting means. Then, the command response generated by the server command execution result generating unit 44 is associated with the command ID of the server command corresponding to the command response and read from the server command pool 42, and the client command generated by the client command generating unit 43 and this It has a function of reading from the client command pool 41 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 client command, it is conceivable that the transmission message collection unit 45 reads the messages in descending order of 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 is a description of the command response, command, and command ID described above as a SOAP message in XML (Extensible Markup Language) that 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 using SOAP, a message called a SOAP envelope (envelope) composed of a SOAP header and a SOAP body is written in XML and exchanged using a protocol such as HTTP.
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 transmission unit 46 corresponds to the transmission unit and has a function of generating an HTTP request including the transmission message generated by the transmission message collection unit 45 and transmitting the HTTP request to the HTTP server 12. At this time, any number of transmission messages may be included in one HTTP request, and a transmission message related to a command response and a transmission message related to a client command can be arbitrarily mixed.
Therefore, the HTTP request transmission means 46 transmits all the transmission messages generated by the transmission message collection means 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, this HTTP request is transmitted when the transmission message collection means 45 attempts to read out a client command, a command response, etc., when there is no data to be read and consequently a SOAP message to be transmitted is not generated. Also do. This reading attempt is made periodically. For example, it is possible to read out every 60 minutes by 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, it cannot be transmitted unless communication is requested from the HTTP client 11. 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 period of time.

なお、送信メッセージ収集手段45による読み出しと、それに続くHTTPリクエスト送信手段46によるHTTPリクエストの送信とを、定期的なタイミング以外に適宜行ってよいことはもちろんである。例えば、緊急に送信が必要な情報がいずれかのプールに登録された場合に、クライアントコマンド生成手段43あるいはサーバコマンド実行結果生成手段44が送信メッセージ収集手段45にその旨を通知して読み出しを行わせるようにしてもよい。   Of course, 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 appropriately performed at other than the regular timing. For example, when information that needs to be transmitted urgently is registered in any 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 it. You may make it let.

次に、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 is a message in which the above command, response, and command ID are described 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. The HTTP response receiving unit 47 has a function of distributing and registering data included in the HTTP response received in the client command pool 41 and the server command pool 42.
Specifically, a server command and a command ID associated with the command are registered in the server command pool 42 by providing a server command sheet, and for a response to the client command, the command ID associated with the command is the client ID. The corresponding client command is identified by comparing 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 extracted, and the data is converted into a format necessary for registration in the table. This conversion is a required conversion generated based on WSDL. This can be done 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, FIG. 11 shows an example of an HTTP request transmitted from the HTTP client 11 having such a function to the HTTP server 12.
In this HTTP request, as shown in FIG. 11, a multi-part message according to MIME (Multipurpose Internet Mail Extension) is described as a body part, and each part includes an entity header and a detailed description. 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 an 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 possible including zero.
The SOAP envelope embedded and delivered in the HTTP request includes a client command and a response to the 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 by the HTTP client 11 having such a function from the HTTP server 12.
As shown in FIG. 12, this HTTP response is different only in the HTTP request shown in FIG. 11 and the HTTP header part, and the body part is not shown in detail 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 command response.
The SOAP envelope embedded and delivered in the HTTP response includes a server command written and a response to the client command written.

次に、これらの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 these HTTP requests or HTTP responses 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 part. . In this example, the value “Request” indicates a SOAP request, that is, a SOAP message in which a command is described.
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で特定される名前空間に属するタグであることがわかる。   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”. The namespace is declared. Therefore, it can be seen that the XML tag with the namespace prefix “n” belongs to the namespace specified by the URI “http://www.foo.com/header”. It can be seen that the XML tag with the namespace prefix “” belongs to the namespace specified by the URI “http://www.foo.com/server”.

またSOAPヘッダには、「要求ID」のXMLタグの内容として、このクライアントコマンドのIDである「12345」が記載されている。そして、SOAPボディには、クライアントコマンドシートの「メソッド名」に記憶されていたメソッドを指定する情報として、「異常通知」タグが記載され、その下位のタグ「エラーID」や「説明」の要素として、「入力パラメータ」に記憶されていた引数が記載されている。ここでは異常通知の通知内容が記載されている。   In the SOAP header, “12345” that is the ID of this client command is described as the content of the XML tag of “request ID”. In the SOAP body, an “abnormality notification” tag is described as information for designating a method stored in the “method name” of the client command sheet, and elements of the lower tag “error ID” and “description” The argument stored in “input parameter” is described. Here, the notification content of the abnormality notification is 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 portion is described as “Response”, so that the SOAP message described in this part is a SOAP response, that is, a command. It indicates that the message is a SOAP message describing a response.
Also in this example, the namespace declaration is the same as in the example shown in FIG. In the SOAP header, “12345” that is the ID of the client command that generated the response is described as the content of the XML tag of “command ID”. The SOAP body is provided with an “abnormality notification response” tag for indicating a response to the “abnormality notification” command, and the content of the command response is described in a lower tag. Here, information indicating that the abnormality notification has been normally received is described. This information is stored in the “output parameter” item 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” in the value of the “X-SOAP-Type” header indicates that the SOAP envelope described in this part is a SOAP request, and “SOAPAction” The contents of the SOAP request are indicated by the header information.

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

図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.
Also in this example, as in the case of FIG. 14, the value of the “X-SOAP-Type” header in the entity header portion is described as “Response”, so that the SOAP message described in this part becomes a SOAP response. It is shown that.
Also in this example, the namespace declaration 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 XML tag of “command ID”. 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 the content of the command response is described in a lower tag. Here, information on the temperature value indicated by the sensor whose value is requested is described.

次に、以上説明したような構成及び機能を有するHTTPクライアント11において実行する処理について、図17乃至図21のフローチャートを用いて説明する。これらのフローチャートに示す処理は、HTTPクライアント11のCPU31が所要の制御プログラムを実行することによって行うものである。   Next, processing executed in the HTTP client 11 having the configuration and functions described above will be described with reference to the flowcharts of 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 basic operations of message collection and distribution processing.
The CPU 31 of the HTTP client 11 starts the process shown in the flowchart of FIG. 17 when the transmission message collection unit 45 tries to read out a client command, a command response, or the like.
First, client command collection processing 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 part by a SOAP envelope 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, server command execution result collection processing, which is a response to the server command, is collected (S12). This process is a process of collecting command responses to be transmitted from the server command pool to the HTTP server 12, and also includes a process of generating a part by a 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 the 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 parts (S16). Here, the division into parts is to divide into elements divided by “MIME_boundary”, and here, all parts are divided.
Thereafter, the processes in steps S17 to S19 are repeated for all the parts obtained by the division in order. In this process, it is first determined whether or not the target part is a part describing a server command (S17). If it is a server command, a server command registration process 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 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 are performed for all the 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 using the flowchart shown in detail one by one.
FIG. 18 is a flowchart showing in more detail the processing of steps S11 to S14 in FIG.

この処理においては、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 the contents of the “method name” and “input parameter” of the client command sheet whose “state” is “unsent” from the client command pool 41 to be transmitted. Collected as a command, the contents of “command ID” are also collected as the command ID of the command (S21). The “status” of “unsent” indicates that the command is not yet sent to the HTTP server 12 after the command is generated by the client command generation unit 43, and is transmitted to the HTTP server 12 based on this. You can extract power commands.

その後、ステップS21で収集した全てのクライアントコマンドを順次対象として、ステップS22乃至S24の処理を繰り返す。これらの処理においては、まず対象のクライアントコマンドとそのコマンドIDとを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書に変換し(S22)、対象のコマンドに関するパートとなるSOAPエンベロープを生成する(S23)。そして、対象のクライアントコマンドを記載していたクライアントコマンドシートの「状態」を「応答待ち」に変更する(S24)。「応答待ち」という「状態」は、コマンドをHTTPサーバ12に通知済であることを示すものである。   Thereafter, the processing of steps S22 to S24 is repeated for all client commands collected in step S21 in order. In these processes, first, the target client command and its command ID are converted into an XML document in which these pieces of information are included in the SOAP body and the SOAP header, respectively (S22), and a SOAP envelope that becomes a part related to the target command. Is generated (S23). Then, the “status” of the client command sheet describing the target client command is changed to “waiting for response” (S24). The “status” 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 are completed, the CPU 31 collects the contents of the “output parameter” of the server command sheet whose “state” is “processing completed” from the server command pool 42 as a command response to the server command to be transmitted. The contents of “command ID” are also collected as the command ID of the corresponding server command (S25). The “status” of “processing completed” indicates that the process corresponding to the server command has been generated by the server command execution result generation unit 44 and has not been notified to the HTTP server 12 yet. The 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 processes in steps S26 to S28 are repeated for all command responses collected in step S25 in order. 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 these pieces of information are included in the SOAP body and the SOAP header, respectively (S26). This is a process for generating a SOAP envelope (S27). These processes are the same as the processes in steps S22 and S23 except that the objects are different. Then, the “status” of the server command sheet in which the target command response is described is changed to “responded” (S28). The “status” “response completed” indicates that the HTTP server 12 has been notified of the command response.

そして、ここまでの処理が全て完了した後、CPU31は、ステップS23又はS27で生成した各パートをマージし、図11に示したようなマルチパートのHTTPリクエストを生成してHTTPサーバ12に送信する(S29)。
なお、ステップS24又はS28で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンド及びコマンド応答を再度送信の対象とすることができるので、システムの信頼性が向上する。
以上でHTTPリクエストの送信に関する処理を終了し、図17のステップS15以降に相当する処理に進む。
After all the processes so far are completed, the CPU 31 merges the parts generated in step S23 or S27, generates a multi-part HTTP request as shown in FIG. 11, and transmits 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 completed. In this way, even if a communication error occurs, the command and command response that were about to be transmitted can be sent again, so that the reliability of the system is improved.
This completes the processing related to the transmission of the HTTP request, and proceeds to the processing 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 step S15 and subsequent steps in FIG. The process 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 reception of 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 parts (S32).
Thereafter, the processes in steps S33 to S39 are repeated for each part obtained by the division in order.

この部分の処理においては、まず、対象のパートがサーバコマンドであるか否か判断する(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 there is a possibility that the HTTP response includes a server command and a response to the client command, it is determined which is the target part. This determination can be made based on whether or not a SOAPAction header exists in the target part, or based on the contents of the X-SOAP-Type header.

ステップS33でサーバコマンドでなければ、そのパートはクライアントコマンドに対する応答であるので、そのパートのXML文書を解析してクライアントコマンドシートに登録できる形式のデータに変換し(S34)、クライアントコマンドプール41からそのコマンド応答に対応するクライアントコマンドを探索し、そのクライアントコマンドについてのクライアントコマンドシートの「出力パラメータ」の項目にコマンド応答のデータを登録する(S35)。なお、コマンド応答には、「コマンドID」の情報として、クライアントコマンドの送信時に付したものと同じコマンドIDが付してあるものとし、クライアントコマンドの探索は、この情報をキーとして行うことができる。   If it is not a server command in step S33, the part is a response to the client command, so 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). A client command corresponding to the command response is searched, and command response data is registered in the item “output parameter” of the client command sheet for the client command (S35). Note that the command response is assumed to have the same command ID as that given at the time of transmission of the client command as the information of “command ID”, and the search for the client command 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, the notification destination registered in the “client command execution result notification destination” is notified that a response has been received (S37). By this notification, the application or the like that generated the client command can recognize that there is 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 this command is transmitted to the HTTP server 12, the HTTP server 12 receives a command response indicating that it has been correctly received. Will return. Upon receiving this command response, the HTTP client 11 searches for a client command based on the command ID included therein, and registers the command response in association with the found client command. . Then, it notifies the application that issued the abnormality notification that is registered as the execution result notification destination of the command that there was a response. If the application receives this notification and refers to the client command sheet, the application can acquire the execution result of the generated command from the “output parameter” item.
When the processing up to step S37 is completed, if there is a next part, the processing from step S33 is repeated for that part.

一方、ステップS33でサーバコマンドであれば、そのパートのXML文書を解析してサーバコマンドシートに登録できる形式のデータに変換し(S38)、そのサーバコマンドに対応するサーバコマンドシートを作成して、コマンドIDと共にサーバコマンドプールに登録する(S39)。ここで、サーバコマンドの内容はサーバコマンドシートの「メソッド名」及び「入力パラメータ」の項目に登録し、パートに記載されていたコマンドIDは「コマンドID」の項目に登録する。また、「サーバコマンドの通知先」の項目には、「メソッド名」に記憶させたメソッドを実行させるアプリケーション等への参照情報を、予め用意してあるメソッドとアプリケーション等との対応関係の情報を参照して登録する。「状態」の初期値は「未処理」であり、「出力パラメータ」の初期値はNULLである。   On the other hand, if it 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 contents of the server command are registered in the “method name” and “input parameter” items of the server command sheet, and the command ID described in the part is registered in the “command ID” item. In addition, in the item “notification destination of server command”, reference information to an application that executes a method stored in “method name”, information on a correspondence relationship between a prepared method and the application, etc. Refer to 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 process up to step S39 is completed, if there is a next part, the process from step S33 is repeated for that part.
When the processes of steps S33 to S39 are completed for all parts, the process shown in the flowchart of FIG. 19 is terminated.
By performing the processing as described above, the HTTP client 11 can collectively 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. . Further, the operation request from the HTTP server 12 and the 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回で済むので、マージして送信する場合と同様な効果を得ることができる。また、送信すべきデータのバッファに必要なメモリ容量を低減できるので、低コストの通信装置で大きなデータを取り扱うことができる。
また、受信側でも、各パートに関する処理を、各パートを受信するたびに順次行うようにすることができる。このようにした場合に容量を低減できることは、送信側の場合と同様である。
In this example, all parts to be transmitted are generated and then merged for transmission, and all parts are received and then divided into each part for processing. There is no need to do this.
As for transmission, first, an HTTP header may be transmitted, and thereafter each time a part is generated, the part is sequentially transmitted, and data indicating that is transmitted when transmission of all parts is completed. 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, the same effect as when merging and transmitting can be obtained. In addition, since the memory capacity required for the buffer for 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 processes related to each part each time each part is received. In this case, the capacity can be reduced as in the case of the transmission side.

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

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

また、サーバコマンドの実行に関する処理としては、図19に示した処理とは独立に、図21に示す処理を実行することも考えられる。この処理においても、HTTPクライアント11のCPU31は、サーバコマンド実行結果生成手段44として機能する。
この場合、CPU31は適当なタイミングで図21のフローチャートに示す処理を開始する。
Further, as a process related to the execution of the server command, it may be considered that the process shown in FIG. 21 is executed independently of the process shown in FIG. Also in this process, 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 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 having a “status” of “waiting for processing” in the server command pool (SX1), and if not, the server command pool waits until such a server command sheet is added. To do. When such a server command sheet is found, one of them is set as a processing target, and the “status” of the server command sheet is changed to “processing” (SX2).
Thereafter, the processing of steps S41 to S43 similar to the case of FIG. 20 is performed to execute the server command described in the server command sheet to be processed, and when this is completed, the processing returns to step SX1 and the processing is repeated.

以上の処理は、複数のスレッド(例えば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 that is the processing target 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において実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
If the processing as described above is performed, the server command can be executed at an arbitrary timing. Therefore, even if there is a command that takes time to execute, the subsequent processing is not delayed. Then, in order from the end of execution, the result can be sent to the HTTP server 12 as a command response.
Above, description of the process regarding the transfer of each command and command response executed in the HTTP client 11 is completed.

次に、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 on the HTTP server 12 side will be described. As hardware, as described with reference to FIG. 7, the same hardware as the HTTP client 11 can be used. Accordingly, in the description of the HTTP server 12 below, the same reference numerals as those of the HTTP client 11 are used when referring to hardware components.
FIG. 22 is a functional block diagram showing a configuration of functions for performing processing related to commands and command responses among the 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 transmission unit 146 and the HTTP request reception 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 further detail.
First, the server command pool 141 corresponds to a second storage area provided in the HTTP server 12, and is a pool that registers 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 that registers a client command, a response to the command, and identification information of the command in association with each other. Further, it is assumed that the storage means provided with these pools correspond to the second and first storage means of the HTTP server 12, respectively.

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

ここで、図23にHTTPサーバ12のサーバコマンドシートにおけるデータ構造の例を示す。
この図に示すように、HTTPサーバ12のサーバコマンドシートには、このサーバコマンドシートに記載するコマンドがサーバコマンドであり、その送信先やコマンド応答の送信元がHTTPクライアント11である点で若干異なるが、図9に示したHTTPクライアント11のクライアントコマンドシートとほぼ同様なデータを記憶する領域を設けている。「サーバコマンド実行結果の通知先」については、このシートに記載しているコマンドがサーバコマンドであることに伴って項目の名称が異なるが、内容は図9の「クライアントコマンド実行結果の通知先」と同様なものである。
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 similar to the client command sheet of the HTTP client 11 shown in FIG. 9 is provided. As for “notification destination of server command execution result”, although the name of the item differs according to the fact that the command described in this sheet is a server command, the content is “notification destination of client command execution result” in FIG. Is the same.

図22の説明に戻ると、クライアントコマンド実行結果生成手段144は、応答生成手段に該当する。そして、クライアントコマンドプール142からクライアントコマンドを読み出して実行するアプリケーションである。そして、クライアントコマンドに対する応答を生成し、クライアントコマンドのコマンドIDと関連付けてクライアントコマンドプール142に登録する機能を有する。なお、HTTPクライアント11から受信したクライアントコマンドは、このコマンドを識別するID及びこのコマンドを管理するための管理情報と関連付けて、テーブル形式のクライアントコマンドシートとしてクライアントコマンドプール142に登録しておくようにしている。そして、クライアントコマンド実行結果生成手段144が生成したコマンド応答も、実行したクライアントコマンドについてのクライアントコマンドシートに登録する。   Returning to the description of FIG. 22, the client command execution result generating unit 144 corresponds to a response generating unit. The client command is an application that reads and executes a client command from the client command pool 142. Then, it has a function of generating a response to the client command and registering it 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 this command and management information for managing this command. ing. 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は、アプリケーションそのものではなく、クライアントコマンドの実行に必要なアプリケーションを呼び出してコマンドを実行させるモジュールであってもよい。
In addition, it is conceivable that the client command execution result generation unit 144 has 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. Furthermore, when the client command includes information on the execution priority for causing the HTTP server 12 to execute the processing with priority, it is possible to provide a function of preferentially reading and executing the information from the highest priority.
The client command execution result generating unit 144 may be a module that calls an application necessary for executing the 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 transmission source or the transmission destination of the command response is the HTTP client 11. However, an area for storing data similar to the server command sheet of the HTTP client 11 shown in FIG. 10 is provided. The “client command notification destination” has the same name as the “server command notification destination” in FIG. 10, although the item names differ depending on the fact that the command described in this sheet is a server command. 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 means 145 corresponds to the collecting means. Then, the command response generated by the client command execution result generating unit 144 and the command ID of the client command corresponding to this command response are read out from the client command pool 42, and the server command generated by the server command generating unit 143 and this It has a function of reading from the server command pool 141 in association with the command ID of the command and generating a transmission message therefrom.
Note that when the execution priority is specified in the command response or the server command, it is conceivable that the transmission message collection unit 145 reads the messages 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 transmits the HTTP response to the HTTP client 11. It has a function to transmit. At this time, any number of transmission messages may be included in one HTTP response, and a transmission message related to a command response and a transmission message related to a server command may be arbitrarily mixed.
Therefore, the HTTP response transmission unit 146 transmits all the transmission messages generated by the transmission message collection unit 145 in one HTTP response regardless of any of the transmission messages. However, an upper limit may be set for the number of transmission messages included in one HTTP response.

ところで、HTTPレスポンスの送信は、送信メッセージ収集手段145がサーバコマンドやコマンド応答等の読み出しを試みた場合には、読み出すデータがなく、結果的に送信すべきSOAPメッセージを生成しなかった場合にも行うものである。そして、この読み出しの試みは、HTTPクライアント11からのHTTPリクエストを受信した場合に行うものとする。
このようにするのは、上述のように、HTTPサーバ12からファイアウォール14を越えてHTTPクライアント11にHTTPリクエストを送信することができないためである。
By the way, the HTTP response is transmitted when the transmission message collecting means 145 attempts to read out a server command, a command response, etc., even when there is no data to be read and a SOAP message to be transmitted as a result is not generated. Is what you do. This 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 across the firewall 14 to the HTTP client 11 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. In the HTTP request, a client message and a received message including a command ID associated with the command are arbitrarily mixed with a received message including a response to the server command and a command ID associated with the command. Included.
Here, the received message is a message in which the above command, response, and command ID are described as a SOAP message.

受信メッセージ分配手段148は、分配手段に該当する。そして、HTTPリクエスト受信手段147が受信したHTTPリクエストに含まれるデータを、サーバコマンドプール141及びクライアントコマンドプール142に振り分けて登録する機能を有する。
具体的には、クライアントコマンド及びそのコマンドと関連付けられたコマンドIDとをクライアントコマンドプール142にクライアントコマンドシートを設けて登録すると共に、サーバコマンドに対する応答については、そのコマンドと関連付けられたコマンドIDをサーバコマンドプール141に記憶しているサーバコマンドシートのコマンドIDと照合して対応するサーバコマンドを特定し、そのサーバコマンドについての「出力パラメータ」として登録する。
The received message distribution unit 148 corresponds to a distribution unit. The HTTP request receiving unit 147 has a function of distributing and registering data included in the HTTP request received in 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 the client command pool 142 by providing a client command sheet, and for a response to the server command, the command ID associated with the command is stored in the server The corresponding server command is identified by comparing with the command ID of the server command sheet stored in the command pool 141, 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 and each received message included therein is extracted, and the data is converted into a format necessary for registration in the table. This conversion is a required conversion generated based on WSDL. This can be done 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 has been described with reference to FIG. 11 in the description of the function of the HTTP client 11, for example. Since the HTTP response transmitted by the HTTP server 12 is also transmitted to the HTTP client 11 and received by the HTTP client 11, it has been described with reference to FIG. 12, for example. The contents of the parts included in these are also as described with reference to FIGS.

次に、以上説明したような構成及び機能を有するHTTPサーバ12において実行する処理について、図25乃至図29のフローチャートを用いて説明する。これらのフローチャートに示す処理は、HTTPサーバ12のCPU31が所要の制御プログラムを実行することによって行うものである。   Next, processing executed in the HTTP server 12 having the configuration and functions described above will be described with reference to the flowcharts of 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 basic operations 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 process shown in the flowchart of FIG. 25.
First, the HTTP request is received (S111). Then, the HTTP body of the received HTTP request is divided into parts (S112). Here, the division into parts is to divide into elements divided by “MIME_boundary”, and here, all parts are divided.

そしてその後、分割して得た全てのパートを順に対象として、ステップS113乃至S115の処理を繰り返す。この処理においては、まず対象のパートがクライアントコマンドを記載したパートか否か判断する(S113)。そして、クライアントコマンドであればクライアントコマンド登録処理を行う(S114)。また、クライアントコマンドでないときは、サーバコマンドに対する応答が記載されたパートであるので、応答通知処理を行う(S115)。   Thereafter, the processes in steps S113 to S115 are repeated for all the parts obtained by the division in order. In this process, it is first determined whether or not the target part is a part describing a client command (S113). If it is a client command, a client command registration process is performed (S114). If the command is not a client command, a response notification process is performed because the response to the server command is described (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 the 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 server command collection processing (S116). This process is a process of collecting server commands to be transmitted from the server command pool 41 to the HTTP client 11, and includes a process of generating a part by a SOAP envelope from the collected data.
Next, the client command execution result collection process, which is a response to the client command, is collected (S117). This process is a process of collecting command responses to be transmitted from the client command pool to the HTTP client 11, and also includes a process of generating a part by a SOAP envelope 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 to generate an HTTP response including all the parts (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 is terminated.
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 using the flowchart shown in more detail one by one.
FIG. 26 is a flowchart showing in more detail the processing of steps S111 to S115 in FIG.
In this process, the CPU 31 of the HTTP server 12 first receives an HTTP request transmitted from an HTTP client (S121). When this is received, the HTTP body is analyzed and divided into parts (S122).
Thereafter, the processes in steps S123 to S129 are repeated for each part obtained by the division in order.

この部分の処理においては、まず、対象のパートがクライアントコマンドであるか否か判断する(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 there is a possibility that the HTTP request includes a client command and a response to the server command, it is determined which is the target part. This determination can be made based on whether or not a SOAPAction header exists in the target part, or based on the contents of the X-SOAP-Type header.

ステップS123でクライアントコマンドでなければ、そのパートはサーバコマンドに対する応答のパートであるので、そのパートのXML文書を解析してサーバコマンドシートに登録できる形式のデータに変換し(S124)、サーバコマンドプール141からそのコマンド応答に対応するサーバコマンドを探索し、そのサーバコマンドについてのサーバコマンドシートの「出力パラメータ」の項目にコマンド応答のデータを登録する(S125)。なお、コマンド応答には、「コマンドID」の情報として、サーバコマンドの送信時に付したものと同じコマンドIDが付してあるものとし、サーバコマンドの探索は、この情報をキーとして行うことができる。   If it is not a client command in step S123, the part is a response part to the server command, so 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). The server command corresponding to the command response is searched from 141, and the command response data is registered in the “output parameter” item of the server command sheet for the server command (S125). The command response is assumed to have 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, it notifies the notification destination registered in “notification destination of server command execution result” that there is a response (S127). By this notification, the application or the like that generated the server command can recognize that there is 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 the sensor value of the temperature sensor of the HTTP client 11, when this command is transmitted to the HTTP client 11, the HTTP client 11 requests A command response including the sensor value is returned. Upon receiving this command response, the HTTP server 12 searches for a server command based on the command ID included therein, 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 command execution result notification destination is notified of the response. If the application receives this notification and refers to the server command sheet, the application can acquire the execution result of the generated command from the “output parameter” item.
When the processing up to step S127 is completed, if there is a next part, the processing from step S123 is repeated for that part.

一方、ステップ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 contents of the client command are registered in the “method name” and “input parameter” items of the client command sheet, and the command ID described in the part is registered in the “command ID” item. In addition, in the item “client command notification destination”, reference information to an application that executes a method stored in “method name”, information on a correspondence relationship between a prepared method and the application, etc. Refer to 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, if there is a next part, the processing from step S123 is repeated for that part.
When the processing of steps S123 to S129 is completed for all parts, the processing shown in the flowchart of FIG.
This completes the processing related to the reception of the HTTP request, and proceeds to 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 step S116 and subsequent steps 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 sends the contents of the “method name” and “input parameter” of the server command sheet whose “state” is “unsent” from the server command pool 141 to be transmitted. Collected as a command, the contents of “command ID” are also collected as the command ID of the command (S131). In the HTTP server 12, the “state” of “unsent” indicates that the command has not yet been notified to the HTTP client 11 after the command is generated by the server command generation unit 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に通知済であることを示すものである。   Thereafter, the processes in steps S132 to S134 are repeated for all the server commands collected in step S131 in order. In these processes, first, the target server command and its command ID are converted into an XML document in which these pieces of information are included in the SOAP body and the SOAP header, respectively (S132), and a SOAP envelope which becomes a part related to the target command. 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 “status” 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 all of these are completed, the CPU 31 collects the contents of the “output parameter” of the client command sheet whose “state” is “processing completed” from the client command pool 142 as a command response to the client command to be transmitted. The contents of “command ID” are also collected as the command ID of the corresponding client command (S135). In the HTTP server 12, the “status” 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, the 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 processes in steps S136 to S138 are repeated with all command responses collected in step S135 as targets. In these processes, first, the target command response and the command ID collected together with the response are converted into XML documents in which these pieces of information are included in the SOAP body and the SOAP header (S136). This is a process for generating a SOAP envelope (S137). These processes are the same as the processes in steps S132 and S133 except that the objects are different. Then, the “status” of the client command sheet that describes the target command response is changed to “response completed” (S138). The “status” of “response completed” indicates that the command response has been notified to the HTTP client 11 here.

そして、ここまでの処理が全て完了した後、CPU31は、ステップS133又はS137で生成した各パートをマージし、図12に示したようなマルチパートのHTTPレスポンスを生成してHTTPクライアント11に送信する。
なお、ステップS134又はS138で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンド及びコマンド応答を再度送信の対象とすることができるので、システムの信頼性が向上する。
After all the processes so far 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 it 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 completed. In this way, even if a communication error occurs, the command and command response that were about to be transmitted can be sent again, so that the reliability of the system is improved.

なお、ここでは送信すべきパートを全て生成してからマージして送信を行うようにし、また全てのパートを受信してからこれを各パートに分割して処理を行うように説明したが、このようにする必要はない。各パートを生成するたびに順次送信するようにしたり、各パートを受信するたびに順次各パートに関する処理を行うようにしてもよいことは、HTTPクライアント11の場合と同様である。   In this example, all parts to be transmitted are generated and then merged for transmission, and all parts are received and then divided into each part for processing. There is no need to do so. As in the case of the HTTP client 11, it is possible to sequentially transmit each time each part is generated, or to sequentially perform processing relating to each part each time each part is received.

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

そして、この処理においては、まず登録したクライアントコマンドについてのクライアントコマンドシートの「クライアントコマンドの通知先」の情報に基づいてアプリケーション等を呼び出し、「メソッド名」や「入力パラメータ」のデータを渡してクライアントコマンドに関する処理を実行させる(S141)。なお、クライアントコマンドに関する処理は、このフローチャートには示していないが、CPU31が別途実行することになる。   In this process, first, an application is called based on the “client command notification destination” information in the client command sheet for the registered client command, and the “method name” and “input parameter” data is passed to the client command sheet. Processing related to the command is executed (S141). The processing related to the client command is not shown in this flowchart, but is executed separately 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 “status” of the client command sheet is changed to “processing completed” to indicate that the processing is completed. (S143), the process returns to the original process of FIG.
By performing the above processing, the client command can be executed, and the result can be sent to the HTTP client 11 as a command response.

また、クライアントコマンドの実行に関する処理としては、図27に示した処理とは独立に、図29に示す処理を実行することも考えられる。この処理においても、HTTPサーバ12のCPU31は、クライアントコマンド実行結果生成手段144として機能する。
この場合、CPU31は適当なタイミングで図29のフローチャートに示す処理を開始する。
In addition, as processing related to the execution of the client command, it is conceivable to execute the processing shown in FIG. 29 independently of the processing shown in FIG. Also in this process, 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 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), and if not, wait until such a client command sheet is added. To do. When such a client command sheet is found, one of the client command sheets is set as a processing target, and the “status” of the client command sheet is changed to “processing” (SY2).
Thereafter, the same processing of steps S141 to S143 as in the case of FIG. 28 is performed to execute the client command described in the client command sheet to be processed. When this is completed, the processing returns to step SY1 and the processing is repeated.
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において実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
If the processing as described above is performed, the client command can be executed at an arbitrary timing. Therefore, even if there is a command that takes time to execute, the subsequent processing is not delayed. Then, in order from the end of execution, the result can be sent to the HTTP client 11 as a command response.
Above, description of the process regarding the transfer of each command and command response executed in the HTTP server 12 is completed.

HTTPクライアント11とHTTPサーバ12とに以上説明してきたような各機能を設け、各処理を行わせることにより、送信元から通信相手に送信すべき動作要求と、通信相手から受信した動作要求に対する動作応答とを、一括して通信相手に送信することができるので、動作要求の送信と動作応答の送信とについて別々にネゴシエーションを行って通信のコネクションを確立する必要がなく、通信のオーバーヘッドを低減して通信効率を高めることができる。   The HTTP client 11 and the HTTP server 12 are provided with each function as described above, and by performing each process, 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. Responses can be sent to the communication partner in a batch, so there is no need to negotiate separately for transmission of operation requests and transmission of operation responses to establish communication connections, reducing communication overhead. Communication efficiency.

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

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

この場合において、上記の一方の装置から通信相手に定期的に通信要求を送信するようにすれば、ファイアウォールの外側から内側に向けての情報の送信が長時間に亘って停滞してしまう事態を防止できる。
また、クライアントコマンドプールやサーバコマンドプールを設け、各アプリケーション等が生成した動作要求や動作応答をこれらのプールに蓄積しておくようにすることにより、動作要求や動作応答の生成を、通信相手に対する送信タイミングを考慮せずに行うことができる。従って、アプリケーション等が行う処理を簡略化することができ、設計や開発が容易になる。
In this case, if the communication request is periodically transmitted from the one device to the communication partner, the information transmission from the outside to the inside of the firewall is stagnated for a long time. Can be prevented.
In addition, by creating a client command pool or server command pool and storing operation requests and response generated by each application in these pools, the generation of operation requests and response can be made to the communication partner. This can be done 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, by providing a collection means for reading out an operation request or an operation response to be transmitted to a communication partner from the pool, information to be transmitted can be transmitted without omission when performing communication.
Also, by providing distribution means for separating received operation requests and responses and storing them in an appropriate pool, the received information is stored in the pool, so that the operations related to the received operation requests are executed. In addition, 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 associated with the identification information when the operation request is stored and transmitted, and an operation corresponding to the operation response is also stored and transmitted. If it is performed in association with the identification information of the request, even when a plurality of operation requests and responses are included in one message (here, an HTTP message), the correspondence between the operation request and the operation response via the identification information. Can be easily recognized.
In addition, if priority is given to operation requests, and execution is performed in order from the highest, or responses are transmitted, urgent operations are preferentially executed and responses are also preferentially returned. Can do.

〔SMTPを採用する場合の参考例:図30乃至図35〕
次に、通信プロトコルにSMTPを採用する場合の参考例について説明する。この参考例は、上述のHTTPを採用する場合の実施例と共通点が多いので、共通点については説明を省略するか簡単にし、相違点を中心に説明する。
まず、図30に、SMTPを採用する場合の参考例を適用する通信システムの構成例を示す。
[Reference example when adopting SMTP: FIGS. 30 to 35]
Next, a reference example when adopting SMTP as a communication protocol will be described. This reference example has much in common with the above-described embodiment in which HTTP is adopted, so the description of the common points will be omitted or simplified, and the differences will be mainly described.
First, FIG. 30 shows a configuration example of a communication system to which a reference example in the case of adopting 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の通信装置に該当する。   In this communication system, as shown in FIG. 30, LAN_A connecting communication apparatus A and mail server A ′, and LAN_B connecting communication apparatus B and mail server B ′ are respectively connected to firewall A and firewall B. It is connected to the Internet 13 through the network. In addition, 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 through 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に情報を送信する場合、図30に破線で示したように、通信装置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 electronic mail. For example, when information is transmitted 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. Send to '. Then, the e-mail is transferred to the mail server A ′ that is directly accessed by the communication device A through the mail servers B ′, B, and A sequentially. Although not shown in the figure, usually, transfer is 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 indicated by the alternate long and short dash line, the communication device A periodically accesses the mail server A ′, so that an electronic mail addressed to the communication device A can be received. Information transfer is completed. Information transfer from the communication device A to the communication device B can be performed in the reverse procedure, and the communication device A and the communication device B are symmetrical with respect to the information transfer. However, providing the mail servers A ′ and B ′ is not essential, and 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 transmitting mail may be different.

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

また、通信装置A及び通信装置Bも、図1に示した第1の通信装置及び第2の通信装置の場合と同様に、互いの制御管理を行うためのアプリケーションプログラムを実装している。そして、RPCにより、互いの実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。   Further, similarly to the first communication device and the second communication device shown in FIG. 1, the communication device A and the communication device B also have an application program for performing mutual control management. Then, by RPC, it is possible to transmit an “operation request” that is a request for processing for a method of an application program to be installed, and to acquire an “operation response” that is a result of the requested processing. Yes.

図31に、これらの動作要求と動作応答の関係を示すが、動作要求のレベルでは、通信装置Aと通信装置Bとの関係は、既に説明したHTTPクライアント11とHTTPサーバ12との関係と同様に、対称なものである。しかし、SMTPの場合には、通信のレベルでも通信装置Aと通信装置Bとが対称な関係にあることが、HTTPの場合と異なる。   FIG. 31 shows the relationship between these operation requests and operation responses. 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. It is symmetrical. 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. An 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 first electronic mail and the reply are completely independent, and there is no relationship between the communication request and the communication response as in the case of HTTP.
Accordingly, communication may be performed first from either communication device, and it is not necessary to send e-mails alternately. Here, e-mail is first sent from communication device A to communication device B. An example in the case of sending and sending and receiving a total of three e-mails alternately is shown.

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

なお、動作要求及び動作応答に対する応答をそれぞれ任意の数ずつ(0でもよい)1通の電子メールに記載することができる。そして、1通の電子メールに記載した内容は、1つのメッセージであり、当然論理的に一括して転送する。そして、このようにすることにより、必要な情報を転送するための電子メールの数を減らし、オーバーヘッドを低減して通信の効率化を図っている。
また、コマンドを受信した後最初に送信する電子メールにコマンド応答を記載しなくてもよいことは、図6を用いて説明したHTTPの場合と同様である。
Note that an arbitrary number (or 0) 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, and naturally it is logically transferred collectively. In this way, the number of e-mails for transferring necessary information is reduced, overhead is reduced, and communication efficiency is improved.
Similarly to the HTTP described with reference to FIG. 6, the command response need not be described in the first e-mail sent after receiving the command.

次に、通信装置A及び通信装置Bにおける、コマンドやコマンド応答を結合し、また分離する処理を行うための機能構成及びその処理の手順について説明する。ハードウェア構成については、HTTPを用いる実施例の説明において図7に示したHTTPクライアント11の場合と同様なものを使用することができる。   Next, a functional configuration for performing a process of combining and separating commands and command responses in the communication apparatus A and the communication apparatus B and a procedure of the process will be described. As for the hardware configuration, the same 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 functions for performing processing related to commands and command responses among the functions of the communication apparatus A.
33, the communication device A side command pool 51, the communication device B side command pool 52, the communication device A side command generation means 53, and the communication device B side command execution result generation means 54 are respectively shown in FIG. This function corresponds to the client command pool 41, the server command pool 42, the client command generation means 43, and the server command execution result generation means 44, and the names are changed due to different names of the devices.

また、送信メッセージ収集手段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 having the same names shown in FIG. However, it differs from the example shown in FIG. 8 in that the format of data for transmission and reception 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 transmission unit 56 and the mail reception unit 57 correspond to the transmission unit and the reception unit, respectively. However, the HTTP request transmission unit 46 and the HTTP response reception unit illustrated in FIG. 47 is different.

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

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

しかし、ヘッダ部分はHTTPリクエストの場合とは異なり、電子メールの送信元アドレスを示すFrom、宛先アドレスを示すTo、表題を示すSubject等の情報が記載されている。
通信装置Bから通信装置Aに送信する電子メールについては、ヘッダのうちFromの内容とToの内容を入れ替えたものになる。
また、これらの電子メールに記載されるSOAPエンベロープの内容は、HTTPリクエストやHTTPレスポンスの場合と同様なものである。ただし、各パートのエンティティヘッダの部分は、データのエンコード方式が異なるためHTTPの場合とは一部が異なる。
However, unlike 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 replacing the contents of From and the contents of To in the header.
Further, the contents of the SOAP envelope described in these electronic mails are the same as those in the case of the HTTP request or the HTTP response. However, the part of the entity header of each part is partially different from that of HTTP because the data encoding method is different.

次に、以上説明したような構成及び機能を有する通信装置Aにおいて実行する処理について、図35及び図36のフローチャートを用いて説明する。これらのフローチャートに示す処理は、通信装置AのCPUが所要の制御プログラムを実行することによって行うものである。   Next, processing executed in the communication apparatus A having the configuration and functions described above will be described with reference to the flowcharts of FIGS. The processing shown in these flowcharts is performed by the CPU of the communication apparatus 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 processing at the time of message transmission.
The CPU of the communication apparatus A starts the process shown in the flowchart of FIG. 35 when the transmission message collection unit 45 tries to read out the communication apparatus A side command, command response, and the like.
First, the communication device A side command collection processing is performed (S51). This process is a process of collecting communication apparatus A side commands to be transmitted from the communication apparatus A side command pool 51 to the communication apparatus B, 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, the communication device B side command execution result collection process, which is a response to the communication device B side command, is collected (S52). This process is a process of collecting command responses to be transmitted from the communication apparatus B-side command pool 52 to the communication apparatus B, and also includes a process of generating a SOAP envelope part from the collected data.
Thereafter, the parts generated in the processes of steps S51 and S52 are merged into one to generate an e-mail including all the parts (S53), and the e-mail is transmitted to the communication device B (S54). The process is terminated.

以上の処理において、ステップ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 transmission 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 the transmission and reception of an e-mail. Therefore, the processing ends here, and when an electronic mail is received, the processing 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 processing at the time of message reception.
The CPU of the communication device A periodically accesses the mail server A ′, and when there is a new e-mail addressed to the communication device A, it starts the process shown in the flowchart of FIG.
In this process, first, a new email is received (S61). Then, the body (text) of the received e-mail is divided into parts (S62). Here, the division into parts 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)。   Thereafter, the processes in steps S63 to S65 are repeated for all parts in order. In this process, first, it is determined whether or not the target part is a part describing a communication device B side command (S63). And if it is a communication apparatus B side command, a communication apparatus B side command registration process will be performed (S64). If the command is not the communication device B side command, the response notification process is performed because the response is a part describing the response to the communication device A side command (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 the parts, the process shown in the flowchart of FIG. 36 ends.
In the above processing, the CPU 31 functions as the mail receiving means 57 in step S61, and functions as the received message distribution means 48 in steps S62 to S65.
These processes correspond to the processes in steps S15 to S19 shown in FIG.

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

以上説明してきたように、この発明は、SMTPのように、情報の送信と返信とが必ずしも対応しないプロトコルを使用して通信を行う場合にも適用できる。そして、この場合にも、送信元から通信相手に送信すべき動作要求と、通信相手から受信した動作要求に対する動作応答とを、一括して通信相手に送信することができるので、動作要求の送信と動作応答の送信とについて別々の単位で転送を行う必要がなく、通信のオーバーヘッドを低減して通信効率を高めることができる。
また、通信に電子メールを用いれば、ファイアウォールの内側へも容易に情報を転送することができる。
As described above, the present invention can also be applied to a case where communication is performed using a protocol that does not necessarily correspond to transmission and return of information, such as SMTP. 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 in a lump. And the transmission of the operation response need not be transferred in separate units, and communication overhead can be reduced and communication efficiency can be increased.
If e-mail is used for communication, information can be easily transferred to the inside of the firewall.

〔実施例及び参考例の変形例:図37〕
次に、上述した実施例及び参考例の変形例について説明する。
まず、上述した実施例及び参考例では、説明を簡単にするために2つの通信装置からなる通信システムを例としてこの発明について説明したが、この発明は、さらに多くの通信装置からなる通信システムやこのような通信システムを構成する通信装置に適用することも当然可能である。
例えば、HTTPを採用する場合の実施例は、図37に示すような通信システムにも適用することができる。
[Modification of Example and Reference Example: FIG. 37]
Next, modified examples of the above-described embodiment and reference example will be described.
First, in the above-described embodiments and reference examples, the present invention has been described by taking a communication system including two communication devices as an example in order to simplify the description. However, the present invention is not limited to communication systems including more communication devices. Of course, it is also possible to apply to the communication apparatus which comprises such a communication system.
For example, the embodiment in the case of adopting HTTP can be applied to a communication system as shown in FIG.

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

また、この遠隔管理システムにおいては、管理装置102と被管理装置100との間の通信を仲介する通信装置である仲介装置101を設けており、管理装置102と被管理装置100とはこの仲介装置101を介して通信を行う。
そして、仲介装置101及び被管理装置100は、その利用環境に応じて多様な階層構造を成す。例えば、図37に示す設置環境Aでは、管理装置102とHTTPによるコネクションを確立できる仲介装置101aが、被管理装置100a及び100bを従える単純な階層構造になっているが、設置環境Bでは、4台の被管理装置100を設置するため、1台の仲介装置101を設置しただけでは負荷が大きくなる。
In this remote management system, an intermediary device 101 that is a communication device that mediates communication between the management device 102 and the managed device 100 is provided, and the management device 102 and the managed device 100 are connected to this intermediary device. Communication is performed via 101.
The intermediary device 101 and the managed device 100 have various hierarchical structures depending on the usage environment. For example, in the installation environment A shown in FIG. 37, the intermediary 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 only one managed device 100 is installed, the load increases only by installing one intermediary device 101.

そのため、管理装置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 an HTTP connection with the management device 102 follows not only the managed devices 100c and 100d, but also another mediation device 101c, and this mediation device 101c further follows the managed devices 100e and 100f. A hierarchical structure is formed. In this case, the information issued from the management device 102 for remotely managing the managed devices 100e and 100f is sent via the mediation device 101b and the mediation device 101c, which is a lower node thereof, to the managed device 100e or 100f. Will be reached. Note that a firewall 14 is installed in each installation environment in consideration of security.

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

また、3つ以上のノード間でコマンドやコマンド応答の送受信を行う場合、コマンドの発信元と宛先とを把握できるように、これらの情報もコマンドやコマンド応答のメッセージに含め、またコマンドシートにも記載して管理するようにするとよい。
また、メールサーバを設ければ、SMTPを採用する場合の参考例も、このような通信システムに適用することができる。
In addition, when sending and receiving commands and command responses between three or more nodes, this information is also included in the command and command response messages so that the source and destination of the commands can be identified. It is better to manage it by describing it.
In addition, if a mail server is provided, a reference example in the case of adopting SMTP can be applied to such a communication system.

さらに、この発明には、上記以外の変形を適用することも可能である。例えば、クライアントコマンドプール41及びサーバコマンドプール42に登録するクライアントコマンドシート及びサーバコマンドシートを、XMLドキュメントとして記載するようにしてもよい。「入力パラメータ」をデシリアライズする前のXMLドキュメントとして保存したり、「出力パラメータ」をシリアライズした後のXMLドキュメントとして保存したりしてもよい。
また、送受信するコマンドやコマンド応答の情報量に制限を設けても構わない。特に、受信するコマンドの情報量を制限するようにすると、受信側がメモリ容量の限られた装置である場合にメモリの使用量を抑えることができる。
Furthermore, 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 XML documents. The “input parameter” may be saved as an XML document before deserialization, or the “output parameter” may be saved as an XML document after serialization.
Further, there may be a limit on the information amount of commands and command responses to be transmitted / received. In particular, if the amount of information of commands to be received is limited, the amount of memory used can be suppressed when the receiving side is a device with a limited memory capacity.

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

また、上述した実施例及び参考例において、SOAP標準のプロトコルだけでなく、SOAPとMIMEマルチパートを組み合わせた独自のプロトコルをもこれに加えて採用することにより、HTTPリクエスト、或いはHTTPレスポンスに含まれるSOAPエンベロープを全く独立したものとして扱うこととするが、SOAPの関連仕様として定義されたSOAPアタッチメントによって、HTTPレスポンスに含まれる第1パートのSOAPエンベロープに、第2パート以降のSOAPエンベロープへのリンクを埋め込んでこれらを関連付けて引き渡す構成にしてもよい。SMTPを用いる電子メールの場合にも同様である。   In addition, in the above-described embodiment and reference example, not only the SOAP standard protocol but also a unique protocol combining SOAP and MIME multipart is included in the HTTP request or HTTP response. The SOAP envelope will be treated as completely independent, but with the SOAP attachment defined as the SOAP related specification, the SOAP envelope of the first part included in the HTTP response is linked to the SOAP envelope of the second and subsequent parts. You may make it the structure which embeds and links | relates and delivers these. The same applies to the case of electronic mail using SMTP.

更に、SOAP等の上位プロトコルの下位に位置するデータ通信のプロトコルとして、ここでは実施例としてHTTPを採用した例について説明したが、この下位プロトコルについても、FTP(File Transfer Protocol)等の他のプロトコルを採用してもよい。
さらにまた、通信システムの構成についても、以上説明したものに限られることはない。
Furthermore, as an example of adopting HTTP as an embodiment as a data communication protocol positioned below an upper protocol such as SOAP, the example has been described. However, 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のような装置として機能させるためのプログラムであり、このようなプログラムをコンピュータに実行させることにより、上述したような効果を得ることができる。   The program according to the present invention causes a computer to function as an apparatus such as the HTTP client 11, the HTTP server 12, or the communication apparatuses A and B, which are communication apparatuses that can communicate with other communication apparatuses as communication partners. 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 HDD provided in the computer from the beginning, but a non-volatile recording such as a CD-ROM or flexible disk, SRAM, EEPROM, memory card or the like as a recording medium. It can also be recorded on a medium (memory) and provided. Each procedure described above can be executed by installing a program recorded in the memory in a computer and causing the CPU to execute the program, or causing the CPU to read and execute the program from the memory.
Furthermore, it is also possible to download and execute an external device that is connected to a network and includes a recording medium that records the program, or an external device that stores the program in the storage unit.

以上説明してきたように、通信クライアント、通信サーバ、通信システム又は通信方法を用いれば、通信要求とそれに対する通信応答とを送受信する複数の通信装置が互いに動作要求及び受信した動作要求に対する動作応答を送受信する通信システムを構成する場合において、通信の効率を上げることができる。
従って、この発明を、このような通信システムに適用することにより、通信の負荷が小さい通信システムを構成することができる。
As described above, when a communication client, a communication server, a communication system, or a communication method is used, a plurality of communication apparatuses that transmit and receive a communication request and a communication response to the communication request send an operation request to each other and an operation response to the received operation request. In the case of configuring a communication system for transmission and reception, communication efficiency can be increased.
Therefore, by applying the present invention to such a communication system, a communication system with a small communication load can be configured.

この発明の通信システムの構成例を示す図である。It is a figure which shows the structural example of the communication system of this 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を採用する場合の通信システムの構成例を示す図である。It is a figure which shows the structural example of the communication system in the case of employ | adopting HTTP 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に示した通信システムにおける通信シーケンスの例を示す図である。It is a figure which shows the example of the communication sequence in the communication system shown in FIG. その別の例を示す図である。It is a figure which shows the other 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クライアントの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the function for performing the process regarding a command and a command response among the functions of the HTTP client shown in FIG. 図8に示したクライアントコマンドプールに記憶させるクライアントコマンドシートにおけるデータ構造の例を示す図である。It is a figure which shows the example of the data structure in the client command sheet memorize | stored in the client command pool shown in FIG. 図8に示したサーバコマンドプールに記憶させるサーバコマンドシートにおけるデータ構造の例を示す図である。It is a figure which shows the example of the data structure in the server command sheet memorize | stored in the server command pool shown in FIG.

図3に示したHTTPクライアントがHTTPサーバに送信するHTTPリクエストの例を示す図である。It is a figure which shows the example of the HTTP request which the HTTP client shown in FIG. 3 transmits to an HTTP server. 図3に示したHTTPクライアントがHTTPサーバから受信するHTTPレスポンスの例を示す図である。It is a figure which shows the example of the HTTP response which the HTTP client shown in FIG. 3 receives from an HTTP server. クライアントコマンドを記載したパートの例を示す図である。It is a figure which shows the example of the part which described the client command. クライアントコマンドに対する応答を記載したパートの例を示す図である。It is a figure which shows the example of the part which described the response with respect to a client command. サーバコマンドを記載したパートの例を示す図である。It is a figure which shows the example of the part which described the server command. サーバコマンドに対する応答を記載したパートの例を示す図である。It is a figure which shows the example of the part which described the response with respect to a server command. 図3に示したHTTPクライアントにおける、メッセージの収集及び分配処理の基本動作を示すフローチャートである。4 is a flowchart showing basic operations of message collection and distribution processing in the HTTP client shown in FIG. 3. 図17のステップS11乃至S14の部分の処理をより詳細に示すフローチャートである。It is a flowchart which shows the process of the part of FIG.17 S11 thru | or S14 in detail. 図17のステップS15以降の部分の処理をより詳細に示すフローチャートである。It is a flowchart which shows the process of the part after FIG.17 S15 in 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サーバの機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the function for performing the process regarding a command and a command response among the functions of the HTTP server shown in FIG. 図22に示したサーバコマンドプールに記憶させるサーバコマンドシートにおけるデータ構造の例を示す図である。It is a figure which shows the example of the data structure in the server command sheet memorize | stored in the server command pool shown in FIG. 図22に示したクライアントコマンドプールに記憶させるクライアントコマンドシートにおけるデータ構造の例を示す図である。It is a figure which shows the example of the data structure in the client command sheet memorize | stored in the client command pool shown in FIG. 図3に示したHTTPサーバにおける、メッセージの収集及び分配処理の基本動作を示すフローチャートである。4 is a flowchart showing basic operations of message collection and distribution processing in the HTTP server shown in FIG. 3. 図25のステップS111乃至S115の部分の処理をより詳細に示すフローチャートである。It is a flowchart which shows the process of the part of FIG.25 S111 thru | or S115 in detail. 図25のステップS116以降の部分の処理をより詳細に示すフローチャートである。It is a flowchart which shows the process of the part after step S116 of FIG. 25 in detail. 図3に示したHTTPサーバにおける、クライアントコマンドの実行に関する処理の一例を示すフローチャートである。4 is a flowchart showing an example of processing related to execution of a client command in the HTTP server shown in FIG. 3. その別の例を示すフローチャートである。It is a flowchart which shows the other example. 通信プロトコルとしてSMTPを採用する場合の参考例の通信システムの構成例を示す図である。It is a figure which shows the structural example of the communication system of the reference example in the case of employ | adopting SMTP as a communication protocol.

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

符号の説明Explanation of symbols

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 means 44: Server command execution result generation means 45, 145: Transmission message collection means 46: HTTP request transmission means 47: HTTP response reception means 48, 148: Received message distribution means 51: Communication apparatus A side command pool 52: Communication apparatus B side command pool 53: Communication apparatus A side command generation means 54: Communication apparatus B side command execution result generation means 56: Mail transmission means 57: Mail Receiving means 100: Managed apparatus 101: Mediating apparatus 102: Management apparatus 143: Server command generating means 144: Client command execution result generating means 146: HTTP response transmitting means 147: HTTP request receiving means

Claims (21)

通信サーバと通信を行う通信クライアントにおいて、In a communication client that communicates with a communication server,
前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1の記憶手段と、First storage means for storing a server request received from the communication server, which is a request to perform a predetermined operation, and an operation response which is a response to the server request;
前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2の記憶手段と、Second storage means for storing a client request which is a request to perform a predetermined operation on the communication server;
前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手段と、Status storage means for storing status information indicating whether the server request and the progress status of the operation relating to each of the client requests are in an unprocessed, in-process, or processed state;
前記第1の記憶手段から、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2の記憶手段から、前記進捗状況が未処理である前記クライアント要求を取得する収集手段と、An operation response related to the server request whose progress status has been processed is acquired from the first storage means, and the client request whose progress status is unprocessed is acquired from the second storage means. Collecting means;
前記収集手段が取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信する送信手段とを備えることを特徴とする通信クライアント。A communication client comprising: a transmission unit configured to transmit a communication request including the operation response acquired by the collection unit and the client request to the communication server.
請求項1に記載の通信クライアントであって、The communication client according to claim 1,
前記第1の記憶手段から前記進捗状況が未処理である前記サーバ要求を検索し、該サーバ要求の内容に応じて定まる適当なモジュールに該サーバ要求に係る動作を実行させると共に、該サーバ要求についての前記状態情報を処理中に変更する要求処理手段を備えることを特徴とする通信クライアント。Retrieving the server request whose progress status is unprocessed from the first storage means, causing an appropriate module determined according to the content of the server request to execute an operation related to the server request, and A communication client comprising request processing means for changing the status information during processing.
請求項2に記載の通信クライアントであって、The communication client according to claim 2,
複数の前記要求処理手段が、複数のスレッドで同時に動作することを特徴とする通信クライアント。A communication client, wherein the plurality of request processing means operate simultaneously in a plurality of threads.
請求項1乃至3のいずれか一項に記載の通信クライアントであって、The communication client according to any one of claims 1 to 3,
前記送信手段は、複数の前記動作応答と複数の前記クライアント要求とを含む通信要求を送信する手段であることを特徴とする通信クライアント。The communication client is characterized in that the transmission means is means for transmitting a communication request including a plurality of the operation responses and a plurality of the client requests.
請求項1乃至4のいずれか一項に記載の通信クライアントであって、The communication client according to any one of claims 1 to 4,
前記送信手段が、前記収集手段による前記動作応答及び前記クライアント要求の取得有無に関わらず、定期的に通信要求を前記通信サーバに送信することを特徴とする通信クライアント。The communication client, wherein the transmission unit periodically transmits a communication request to the communication server regardless of whether the operation response and the client request are acquired by the collection unit.
請求項5に記載の通信クライアントであって、The communication client according to claim 5,
前記通信サーバから前記サーバ要求を受けた場合、該サーバ要求に対する動作応答を、前記送信手段が次回以降の前記定期的な通信要求に含めて送信することを特徴とする通信クライアント。When receiving the server request from the communication server, the communication client transmits an operation response to the server request included in the periodic communication request after the next time.
通信クライアントと通信を行う通信サーバにおいて、In a communication server that communicates with a communication client,
前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1の記憶手段と、First storage means for storing a client request received from the communication client as a request to perform a predetermined operation and an operation response as a response to the client request;
前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2の記憶手段と、Second storage means for storing a server request which is a request to perform a predetermined operation on the communication client;
前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手段と、Status storage means for storing status information indicating which status is unprocessed, being processed, or processed for the progress status of the operation relating to each of the client request and the server request;
前記第1の記憶手段から、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2の記憶手段から、前記進捗状況が未処理である前記サーバ要求を取得する収集手段と、An operation response related to the client request whose progress status has been processed is acquired from the first storage means, and the server request whose progress status is not processed is acquired from the second storage means. Collecting means;
前記通信クライアントから受けた通信要求に対して、前記収集手段が取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信する送信手段とを備えることを特徴とする通信サーバ。A communication server comprising: a transmission unit configured to transmit a communication response including the operation response acquired by the collection unit and the server request to the communication client in response to a communication request received from the communication client.
請求項7に記載の通信サーバであって、The communication server according to claim 7,
前記第1の記憶手段から前記進捗状況が未処理である前記クライアント要求を検索し、該クライアント要求の内容に応じて定まる適当なモジュールに該クライアント要求に係る動作を実行させると共に、該クライアント要求についての前記状態情報を処理中に変更する要求処理手段を備えることを特徴とする通信サーバ。The client request whose progress status is unprocessed is searched from the first storage means, and an appropriate module determined according to the content of the client request is caused to execute an operation related to the client request. A communication server comprising request processing means for changing the status information during processing.
請求項8に記載の通信サーバであって、The communication server according to claim 8,
複数の前記要求処理手段が、複数のスレッドで同時に動作することを特徴とする通信サーバ。A communication server, wherein the plurality of request processing means operate simultaneously in a plurality of threads.
請求項7乃至9のいずれか一項に記載の通信サーバであって、The communication server according to any one of claims 7 to 9,
前記送信手段は、複数の前記動作応答と複数の前記サーバ要求とを含む通信応答を送信する手段であることを特徴とする通信サーバ。The communication server is a means for transmitting a communication response including a plurality of the operation responses and a plurality of the server requests.
通信クライアントと通信サーバとを備える通信システムにおいて、In a communication system comprising a communication client and a communication server,
前記通信クライアントが、The communication client is
前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1のクライアント側記憶手段と、First client-side storage means for storing a server request received from the communication server, which is a request to perform a predetermined operation, and an operation response which is a response to the server request;
前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2のクライアント側記憶手段と、Second client-side storage means for storing a client request that is a request to perform a predetermined operation on the communication server;
前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶するクライアント側状態記憶手段と、Client-side state storage means for storing state information indicating whether the server request and the progress of the operation relating to each of the client requests are in an unprocessed, in-process, or processed state;
前記第1のクライアント側記憶手段から、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2のクライアント側記憶手段から、前記進捗状況が未処理である前記クライアント要求を取得するクライアント側収集手段と、The client from which the progress status has been processed is acquired from the first client-side storage means, and the progress status is unprocessed from the second client-side storage means. A client-side collection means to obtain the request;
前記クライアント側収集手段が取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信するクライアント側送信手段とを備え、Client-side transmission means for transmitting a communication request including the operation response acquired by the client-side collection means and the client request to the communication server;
前記通信サーバが、The communication server is
前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1のサーバ側記憶手段と、First server-side storage means for storing a client request received from the communication client, which is a request to perform a predetermined operation, and an operation response which is a response to the client request;
前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2のサーバ側記憶手段と、Second server-side storage means for storing a server request that is a request to perform a predetermined operation for the communication client;
前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶するサーバ側状態記憶手段と、A server-side state storage unit that stores state information indicating which state is unprocessed, being processed, or processed with respect to the progress of the operation according to each of the client request and the server request;
前記第1のサーバ側記憶手段から、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2のサーバ側記憶手段から、前記進捗状況が未処理である前記サーバ要求を取得するサーバ側収集手段と、The server from which the progress status has been processed is acquired from the first server-side storage means, and the progress status is unprocessed from the second server-side storage means. A server-side collection means for obtaining a request;
前記通信クライアントから受けた通信要求に対して、前記サーバ側収集手段が取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信するサーバ側送信手段とを備えることを特徴とする通信システム。Server-side transmission means for transmitting a communication response including the operation response acquired by the server-side collection means and the server request to the communication client in response to a communication request received from the communication client. Communication system.
通信サーバと通信を行う通信クライアントに実行させる通信方法であって、A communication method to be executed by a communication client that communicates with a communication server,
前記通信サーバから受けた、所定の動作を行う依頼であるサーバ要求と、該サーバ要求に対する応答である動作応答とを記憶する第1の記憶手順と、A first storage procedure for storing a server request received from the communication server as a request to perform a predetermined operation and an operation response as a response to the server request;
前記通信サーバに対する所定の動作を行う依頼であるクライアント要求を記憶する第2の記憶手順と、A second storage procedure for storing a client request that is a request to perform a predetermined operation on the communication server;
前記サーバ要求と前記クライアント要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手順と、A status storage procedure for storing status information indicating which status is unprocessed, being processed, or processed for the progress status of the operation related to each of the server request and the client request;
前記第1の記憶手順で記憶した、前記進捗状況が処理済である前記サーバ要求に係る動作応答を取得すると共に、前記第2の記憶手順で記憶した、前記進捗状況が未処理である前記クライアント要求を取得する収集手順と、The client that has acquired the operation response related to the server request that has been processed in the first storage procedure and that has been processed, and that has been processed in the second storage procedure and that has not yet been processed. A collection procedure to retrieve the request;
前記収集手順で取得した前記動作応答と前記クライアント要求とを含む通信要求を前記通信サーバに送信する送信手順とを有することを特徴とする通信方法。A communication method, comprising: a transmission procedure for transmitting a communication request including the operation response acquired in the collection procedure and the client request to the communication server.
請求項12に記載の通信方法であって、The communication method according to claim 12, comprising:
前記第1の記憶手順で記憶したサーバ要求から前記進捗状況が未処理であるサーバ要求を検索し、該サーバ要求の内容に応じて定まる適当なモジュールに該サーバ要求に係る動作を実行させると共に、該サーバ要求について記憶している前記状態情報を処理中に変更する要求処理手順を有することを特徴とする通信方法。The server request stored in the first storage procedure is searched for a server request in which the progress status is not processed, and an appropriate module determined according to the content of the server request performs an operation related to the server request. A communication method comprising: a request processing procedure for changing the status information stored for the server request during processing.
請求項13に記載の通信方法であって、The communication method according to claim 13, comprising:
前記要求処理手順の処理を複数のスレッドで同時に複数実行することを特徴とする通信方法。A communication method, wherein a plurality of processes of the request processing procedure are simultaneously executed by a plurality of threads.
請求項12乃至14のいずれか一項に記載の通信方法であって、The communication method according to any one of claims 12 to 14,
前記送信手順は、複数の前記動作応答と複数の前記クライアント要求とを含む通信要求を送信する手順であることを特徴とする通信方法。The communication method is characterized in that the transmission procedure is a procedure of transmitting a communication request including a plurality of the operation responses and a plurality of the client requests.
請求項12乃至15のいずれか一項に記載の通信方法であって、The communication method according to any one of claims 12 to 15,
前記送信手順において、前記収集手順における前記動作応答及び前記クライアント要求の取得有無に関わらず、定期的に通信要求を前記通信サーバに送信することを特徴とする通信方法。In the transmission procedure, a communication method periodically transmits a communication request to the communication server regardless of whether or not the operation response and the client request are acquired in the collection procedure.
請求項16に記載の通信方法であって、The communication method according to claim 16, comprising:
前記通信サーバから前記サーバ要求を受けた場合、該サーバ要求に対する動作応答を、前記送信手順で次回以降の前記定期的な通信要求に含めて送信することを特徴とする通信方法。When the server request is received from the communication server, an operation response to the server request is included in the periodic communication request from the next time in the transmission procedure and transmitted.
通信クライアントと通信を行う通信サーバに実行させる通信方法であって、A communication method executed by a communication server that communicates with a communication client,
前記通信クライアントから受けた、所定の動作を行う依頼であるクライアント要求と、該クライアント要求に対する応答である動作応答とを記憶する第1の記憶手順と、A first storage procedure for storing a client request received from the communication client as a request to perform a predetermined operation, and an operation response as a response to the client request;
前記通信クライアントに対する所定の動作を行う依頼であるサーバ要求を記憶する第2の記憶手順と、A second storage procedure for storing a server request which is a request to perform a predetermined operation on the communication client;
前記クライアント要求と前記サーバ要求の各々に係る動作の進捗状況について、未処理、処理中、および処理済のうちいずれの状態であるかを示す状態情報を記憶する状態記憶手順と、A status storage procedure for storing status information indicating whether the status of operations related to each of the client request and the server request is unprocessed, being processed, or processed;
前記第1の記憶手順で記憶した、前記進捗状況が処理済である前記クライアント要求に係る動作応答を取得すると共に、前記第2の記憶手順で記憶した、前記進捗状況が未処理である前記サーバ要求を取得する収集手順と、The server that has acquired the operation response related to the client request that has been processed in the first storage procedure and that has been processed, and that has been processed in the second storage procedure and that has not yet been processed. A collection procedure to retrieve the request;
前記通信クライアントから受けた通信要求に対して、前記収集手順で取得した前記動作応答と前記サーバ要求とを含む通信応答を前記通信クライアントに送信する送信手順とを有することを特徴とする通信方法。A communication method comprising: a transmission procedure for transmitting a communication response including the operation response acquired in the collection procedure and the server request to the communication client in response to a communication request received from the communication client.
請求項18に記載の通信方法であって、The communication method according to claim 18, wherein
前記第1の記憶手順で記憶したクライアント要求から前記進捗状況が未処理であるクライアント要求を検索し、該クライアント要求の内容に応じて定まる適当なモジュールに該クライアント要求に係る動作を実行させると共に、該クライアント要求についての前記状態情報を処理中に変更する要求処理手順を有することを特徴とする通信方法。The client request stored in the first storage procedure is searched for a client request whose progress status is not processed, and an appropriate module determined according to the content of the client request executes an operation related to the client request. A communication method comprising a request processing procedure for changing the status information of the client request during processing.
請求項19に記載の通信方法であって、The communication method according to claim 19, wherein
前記要求処理手順の処理を複数のスレッドで同時に複数実行することを特徴とする通信方法。A communication method, wherein a plurality of processes of the request processing procedure are simultaneously executed by a plurality of threads.
請求項18乃至20のいずれか一項に記載の通信方法であって、A communication method according to any one of claims 18 to 20, comprising:
前記送信手順は、複数の前記動作応答と複数の前記サーバ要求とを含む通信応答を送信する手順であることを特徴とする通信方法。The communication method is characterized in that the transmission procedure is a procedure of transmitting a communication response including a plurality of the operation responses and a plurality of the server requests.
JP2003305517A 2002-09-19 2003-08-28 Communication client, communication server, communication system, and communication method Expired - Lifetime JP4198562B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003305517A JP4198562B2 (en) 2002-09-19 2003-08-28 Communication client, communication server, communication system, and communication method
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
JP2003305517A JP4198562B2 (en) 2002-09-19 2003-08-28 Communication client, communication server, communication system, and communication method

Publications (2)

Publication Number Publication Date
JP2004139567A JP2004139567A (en) 2004-05-13
JP4198562B2 true JP4198562B2 (en) 2008-12-17

Family

ID=32475193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003305517A Expired - Lifetime JP4198562B2 (en) 2002-09-19 2003-08-28 Communication client, communication server, communication system, and communication method

Country Status (1)

Country Link
JP (1) JP4198562B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012005588A (en) * 2010-06-23 2012-01-12 Tomohiko Deguchi Server device and program

Also Published As

Publication number Publication date
JP2004139567A (en) 2004-05-13

Similar Documents

Publication Publication Date Title
EP1638290B1 (en) System, method and intermediary server for transmitting operational requests and responses between apparatuses
US7620700B2 (en) Communication system implementing a plurality of communication apparatuses as communication client and communication server for exchanging operation requests and operation responses
JP4704105B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
US7254601B2 (en) Method and apparatus for managing intelligent assets in a distributed environment
EP1638289B1 (en) Transfer device, system and method for mediating communications between first and second communication devices
US20080123668A1 (en) Systems for dynamic inter-operability of nodes in service grids
JP2004334896A (en) Framework having plug-and-play function and its reconstruction method
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
US20100220352A1 (en) Image forming apparatus, image forming system, and information processing method
JP4382006B2 (en) Mediation apparatus, communication system, communication method, program, and recording medium
JP2005322222A (en) Communication function adding method, program, storage medium and communication apparatus
JP4030943B2 (en) Image processing apparatus, image processing system, control method for image processing apparatus, program, and recording medium
JP2008191773A (en) Network-adaptable equipment and function provision method
US8688858B2 (en) Image processing device, device management system, and image processing method
JP4160480B2 (en) Mediation device, communication system, mediation device control method, program, and recording medium
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
JP2004139565A (en) Communication method
JP2004140803A (en) Communication client, method of controlling communication client, program, and recording medium therefor
JP2004140804A (en) Communication server, method of controlling communication server, program, and record medium
JP2004139566A (en) Communication equipment, communication system, method for controlling communication equipment, program and recording medium
JP2005259105A (en) Mediating device, communication system, control method of mediating device, program, and recording medium
Slominski et al. Xevents/xmessages: Application events and messaging framework for grid
JP2003015891A (en) Network system, method for communicating among server, client and object, method for registering profile object, program, and storage 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 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080501

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080930

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081001

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111010

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4198562

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111010

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121010

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131010

Year of fee payment: 5

EXPY Cancellation because of completion of term