JP4382006B2 - Mediation apparatus, communication system, communication method, program, and recording medium - Google Patents
Mediation apparatus, communication system, communication method, program, and recording medium Download PDFInfo
- Publication number
- JP4382006B2 JP4382006B2 JP2005105313A JP2005105313A JP4382006B2 JP 4382006 B2 JP4382006 B2 JP 4382006B2 JP 2005105313 A JP2005105313 A JP 2005105313A JP 2005105313 A JP2005105313 A JP 2005105313A JP 4382006 B2 JP4382006 B2 JP 4382006B2
- Authority
- JP
- Japan
- Prior art keywords
- response
- command
- server
- operation request
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
この発明は、サーバと複数のクライアントとの間の通信を仲介する仲介装置、このような仲介装置と上記サーバと上記複数のクライアントとを備える通信システム、このような仲介装置を用いた通信方法、コンピュータをこのような仲介装置として機能させるためのプログラム、およびこのようなプログラムを記録したコンピュータ読み取り可能な記録媒体に関する。 The present invention relates to an intermediary device that mediates communication between a server and a plurality of clients, a communication system including such an intermediary device, the server, and the plurality of clients, a communication method using such an intermediary device, The present invention relates to a program for causing a computer to function as such an intermediary device, and a computer-readable recording medium on which such a program is recorded.
従来から、通信装置をネットワークを介して接続した通信システムにおいて、通信装置同士で互いにメッセージを交換させることにより、通信相手の装置に対して通知や要求を行わせることが行われている。そして、このようなシステムにおいて、ある装置から別の装置に動作要求としてコマンドを送信して動作を実行させ、送信相手から動作の実行結果を動作応答として返信させることも行われている。 2. Description of the Related Art Conventionally, in a communication system in which communication devices are connected via a network, 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.
このような技術は、例えば特許文献1に開示されており、この文献には、リモートプロセッサがローカルプロセッサに対して実行されるべきコマンドを指示するメッセージを送信し、そのコマンドに対する応答を受信することが記載されている。
また、この文献には、ローカルプロセッサがファイアウォールの内側に配置されている場合において、ローカルプロセッサからファイアウォールの外側のリモートプロセッサに通信要求を送信し、リモートプロセッサがこの通信要求に対する応答としてローカルプロセッサに対してコマンドを送信するようにすることにより、ファイアウォールの外側から内側に向けてコマンドを送信できるようにする技術も開示されている。
Also, in this document, when a local processor is arranged inside a firewall, a communication request is transmitted from the local processor to a remote processor outside the firewall, and the remote processor sends a 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.
また、このような動作要求に関する技術は、通信装置に接続された装置の動作を遠隔制御するシステムにも適用することができる。特許文献2には、ブラインド及び照明を操作する機能を有する遠隔被操作装置に、ユーザからの操作を受け付ける機能を有する遠隔操作装置からコマンドを送信してブラインド及び照明を操作させる遠隔操作システムにこのような技術を適用した例が記載されている。ただし、この文献には、コマンドに対する応答を送信する点は示されていない。
ところで、クライアントがサーバに何らかの動作を要求する場合には、クライアントがサーバに対して動作要求としてコマンドを送信し、サーバから動作応答としてそのコマンドに対する応答を受信するようにすることが行われている。
しかし、このような処理を採用した場合、サーバにおいてコマンドに係る処理の実行に時間を要する場合に、処理が終了するまで何の応答も返さないとすると、クライアント側ではサーバがコマンドを正常に受信したか否かを判断できない。そして、一定期間応答がなかった場合には、コマンドをタイムアウトさせてエラー処理を行ってしまうことが一般的である。
By the way, when a client requests some operation from the server, the client transmits a command as an operation request to the server and receives a response to the command as an operation response from the server. .
However, when such a process is adopted, if it takes time to execute the process related to the command in the server, and if no response is returned until the process is completed, the server receives the command normally on the client side. Cannot determine whether or not When there is no response for a certain period of time, it is common to perform error processing by timing out the command.
そこで、コマンドのタイムアウトを防止するため、サーバの機能として、クライアントからのコマンドを受信した場合に直ちにその旨を示す受信通知を返し、その後、処理の終了後に改めて実行結果をクライアントに送信する機能を設ける方式を採ることが考えられる。しかし、通信にHTTP(Hyper Text Transfer Protocol)のようなプロトコルを採用する場合、クライアントがファイアウォールの内側にあると、通常はサーバからクライアントに対して通信を要求することはできない。従って、実行結果をクライアントに送信するためには、クライアントにサーバに対する通信を要求させ、その通信要求に対する応答に実行結果を記載してクライアントに返すことになる。 Therefore, in order to prevent command timeout, the server function is to return a reception notification indicating that a command from the client is received immediately, and then send the execution result to the client again after the processing is completed. It is conceivable to adopt a method of providing. However, when a protocol such as HTTP (Hyper Text Transfer Protocol) is adopted for communication, if the client is inside the firewall, the server cannot normally request communication from the client. Therefore, in order to transmit the execution result to the client, the client is requested to communicate with the server, and the execution result is described in a response to the communication request and returned to the client.
このため、クライアントから見ると、コマンドの送信後、実行結果を取得するためには定期的にサーバに通信を要求してコネクションを確立する必要があり、また速やかに実行結果を取得したければ、それだけ頻繁にサーバに通信を要求する必要があることになる。従って、単純に動作要求を送信した際に応答としてその実行結果を受信するといった方式に比べ、通信要求の回数が増し、全体として通信トラフィックや処理負荷が増大することになるという問題があった。そして、クライアントの台数が多い場合には、この実行結果取得のための通信要求による通信トラフィックは無視できない量になる。 For this reason, from the perspective of the client, it is necessary to periodically establish a connection by requesting communication with the server in order to obtain the execution result after sending the command. It is necessary to request communication from the server as frequently. Accordingly, there is a problem that the number of communication requests increases and communication traffic and processing load increase as a whole, compared with a method of simply receiving an execution result as a response when an operation request is transmitted. When the number of clients is large, the communication traffic due to the communication request for obtaining the execution result is an amount that cannot be ignored.
また現状では、ネットワークを介した通信をダイヤルアップ接続で行う環境もまだ多く残っており、このような環境においては通信要求の回数増加が特に問題となる。このような環境では、コネクションの確立に数十秒単位の時間を要することもあり、またコネクションを確立する毎に料金を課金されるので、コネクションを確立する回数が増加するとコストアップにつながるためである。 At present, there are still many environments in which communication via a network is performed by dial-up connection. In such an environment, an increase in the number of communication requests is 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 when a client provided inside a firewall transmits an operation request to a server outside the firewall and receives an operation response to the operation request, the server requests the operation request. An object of the present invention is to make it possible to avoid time-out of an operation request while suppressing communication traffic necessary for transferring an operation response from the server to the client even when the corresponding processing requires time.
上記の目的を達成するため、この発明の仲介装置は、サーバと、複数のクライアントとの間の通信を仲介する仲介装置において、上記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、上記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、上記各クライアントからの動作要求を受信して上記第1の記憶手段に記憶させる第1の受信手段と、上記第1の記憶手段から、上記サーバに送信すべき動作要求を読み出し、上記第2の記憶手段から、上記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を上記サーバに送信する第1の送信手段と、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、上記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて上記第1の記憶手段に記憶させると共に、上記第1の受信手段が受信した動作要求を、上記第2の記憶手段に記憶させる分配手段と、上記第1の記憶手段から、上記クライアントに送信すべき動作応答を読み出し、上記クライアントに送信する第2の送信手段と、上記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて上記第2の記憶手段に記憶させる処理手段とを設けたものである。 In order to achieve the above object, an intermediary device of the present invention stores an operation request from the client and an operation response to the operation request in the intermediary device that mediates communication between a server and a plurality of clients. First storage means, second storage means for storing an operation request from the server and an operation response to the operation request, and receiving an operation request from each client and storing it in the first storage means Read out the operation request to be transmitted to the server from the first receiving means and the first storage means, read out the operation response in a state that can be transmitted to the server from the second storage means, when a first transmission means for transmitting the operation request and the operation response to the server, the first transmission means has access to the server, at the server, sent to the far When there anything that could be transmittable state in the operation response and operation request from the server to any of the operation request comprises a second receiving means for receiving the operation response and operation request, the The operation response received by the first receiving unit is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first receiving unit is stored in the second storage unit. The second storing means for reading out the operation response to be sent to the client from the distributing means for storing in the first storing means and the operation response stored in the second storing means. Processing means is provided for executing processing according to the request, obtaining an operation response to the operation request, and storing it in the second storage means in association with the operation request .
このような仲介装置において、上記第2の受信手段を、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段とするとよい。
さらに、上記第1の送信手段を、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまで、上記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に上記サーバにアクセスする手段とするとよい。
In such a mediation device, the second receiving means, when the first transmission means has access to the server, at the server, operating response and from the server to any of the operation request sent so far When there are a plurality of operation requests that can be transmitted, a plurality of operation responses and operation requests may be received collectively.
Furthermore, the first transmission means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, whether the operation request and the operation response to be transmitted to said server regardless, or equal to means for accessing periodically said server.
さらに、上記第1の送信手段に、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で上記サーバにアクセスする手段を設けるとよい。
また、上記の各仲介装置において、上記クライアントから動作要求を受信した場合に、そのクライアントに対して受信通知を送信する受信通知手段を設けるとよい。
Furthermore, after transmitting an operation request to the server to the first transmission means, until receiving an operation response to all the operation requests transmitted to the server, the server transmits to the server at intervals shorter than other periods. Means for accessing may be provided .
Further, in each of the mediation devices described above, when an operation request is received from the client, a reception notification means for transmitting a reception notification to the client may be provided.
また、この発明の通信システムは、サーバと、複数のクライアントと、前記サーバと前記複数のクライアントの間の通信を仲介する仲介装置とを備えた通信システムにおいて、上記仲介装置に、上記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、上記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、上記各クライアントからの動作要求を受信して上記第1の記憶手段に記憶させる第1の受信手段と、上記第1の記憶手段から、上記サーバに送信すべき動作要求を読み出し、上記第2の記憶手段から、上記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を上記サーバに送信する第1の送信手段と、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、上記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて上記第1の記憶手段に記憶させると共に、上記第1の記憶手段から、上記クライアントに送信すべき動作応答を読み出し、上記クライアントに送信する第2の送信手段と、上記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて上記第2の記憶手段に記憶させる処理手段とを設け、上記各クライアントに、上記動作要求を上記仲介装置に送信する送信手段と、その送信した動作要求に対する動作応答を上記仲介装置から受信する受信手段とを設け、上記サーバに、上記仲介装置から送信されてきた動作要求とその動作要求に対する動作応答とを記憶する第3の記憶手段と、上記仲介装置に送信する動作要求とその動作要求に対する動作応答とを記憶する第4の記憶手段と、上記仲介装置から動作要求及び動作応答を受信する第3の受信手段と、上記第3の受信手段が受信した動作要求を上記第3の記憶手段に記憶させると共に、上記第3の受信手段が受信した動作応答を、対応する動作要求と対応付けて第4の記憶手段に記憶させる分配手段と、上記第3の記憶手段が記憶している動作要求に係る動作を実行して動作応答を生成し、その動作要求と対応付けて上記第3の記憶手段に記憶させる手段と、上記仲介装置に送信する動作要求を生成して上記第4の記憶手段に記憶させる手段と、上記仲介装置からアクセスされた場合に、上記第3の記憶手段から、その仲介装置から受信したいずれかの動作要求に対する動作応答であって送信可能な状態のものを読み出し、上記第4の記憶手段から、その仲介装置に送信できる状態の動作要求を読み出し、それらの動作要求及び動作応答をその仲介装置に送信する第3の送信手段とを設けたものである。 According to another aspect of the present invention, there is provided a communication system including a server, a plurality of clients, and an intermediary device that mediates communication between the server and the plurality of clients . First storage means for storing an operation request and an operation response to the operation request, second storage means for storing an operation request from the server and an operation response to the operation request, and an operation from each client The first receiving means for receiving the request and storing it in the first storage means, and the operation request to be transmitted to the server are read from the first storage means, and the server is read from the second storage means. The first transmission means for reading out the operation response in a state that can be transmitted to the server and transmitting the operation request and the operation response to the server, and the first transmission means When accessing the server, at the server, operating response and when there is anything that could be transmittable state of the operation request from the server, the operational response to either operation request sent so far And the second receiving means for receiving the operation request and the operation response received by the first receiving means are stored in the first storage means in association with the corresponding operation request, and the first storage The operation response to be transmitted to the client is read from the means, the second transmission means for transmitting to the client, and the processing according to the operation request stored in the second storage means is executed, and the operation request is executed. get the operation responses to, in association with the operation request provided and processing means to be stored in said second storage means, to each client, said the operation request And transmitting means for transmitting to the through apparatus, an operation response to the transmitted operation request provided receiving means for receiving from the intermediary device, to the server, the operation for the transmitted getting operation requests and operation requests from the intermediary device A third storage means for storing a response; a fourth storage means for storing an operation request to be transmitted to the intermediary apparatus and an operation response to the operation request; and receiving the operation request and the operation response from the intermediary apparatus. The third receiving unit and the operation request received by the third receiving unit are stored in the third storage unit, and the operation response received by the third receiving unit is associated with the corresponding operation request. A distribution unit that stores the fourth storage unit and an operation request associated with the operation request stored in the third storage unit to generate an operation response and associate the operation request with the third operation unit. Means for storing in the storage means, means for generating an operation request to be transmitted to the intermediary device and storing it in the fourth storage means, and when accessed from the intermediary device, from the third storage means The operation response to any operation request received from the intermediary device is read out and transmitted, and the operation request in a state that can be transmitted to the intermediary device is read out from the fourth storage means. And a third transmitting means for transmitting the operation request and the operation response to the mediating apparatus .
このような通信システムにおいて、上記仲介装置の受信手段を、第2の受信手段を、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段とし、上記サーバの送信手段を、上記仲介装置からアクセスされた場合に、その仲介装置から受信した動作要求に対する動作応答及びその仲介装置に送信する動作要求が複数送信可能な状態であれば、それらの動作応答及び動作要求をその仲介装置に複数一括して送信する手段とするとよい。
さらに、上記仲介装置において、第1の送信手段に、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまで、上記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に上記サーバにアクセスする手段を設けるとよい。
In such a communication system, when the mediation device receives the reception means, the second reception means, and the first transmission means when the first transmission means accesses the server, any one of the operation requests transmitted so far in the server. When there are a plurality of operational responses and operational requests from the server that are in a transmittable state, the plurality of operational responses and operational requests are collectively received, and the server transmitting means Are accessed from the intermediary device , if the operation response to the operation request received from the intermediary device and a plurality of operation requests to be transmitted to the intermediary device can be transmitted , the operation response and the operation request are transmitted . It is preferable to use a means for transmitting a plurality of batches to the mediating apparatus.
Further, in the mediating apparatus, the first transmitting means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, the operation requests and to be transmitted to said server Regardless of whether or not there is an operation response, means for periodically accessing the server may be provided.
さらに、上記仲介装置の上記第1の送信手段に、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で上記サーバにアクセスする手段を設けるとよい。
また、上記の各通信システムにおいて、上記仲介装置に、上記クライアントから動作要求を受信した場合に、そのクライアントに対して受信通知を送信する受信通知手段を設け、上記各クライアントに、その受信通知を受信する手段を設けるとよい。
Furthermore, after transmitting an operation request to the server to the first transmission means of the intermediary device, until an operation response to all the operation requests transmitted to the server is received, the interval is shorter than other periods. It is preferable to provide means for accessing the server.
In each of the communication systems, when the operation request is received from the client, the intermediary device is provided with a reception notification means for transmitting a reception notification to the client, and the reception notification is sent to each of the clients. Means for receiving may be provided.
また、この発明の通信方法は、サーバと複数のクライアントとの間の通信を、仲介装置によって仲介して行う通信方法において、上記仲介装置に、上記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段を用意する手順と、上記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段を用意する手順と、上記各クライアントからの動作要求を受信して上記第1の記憶手段に記憶させる第1の受信手順と、上記第1の記憶手段から、上記サーバに送信すべき動作要求を読み出し、上記第2の記憶手段から、上記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を上記サーバに送信する第1の送信手順と、上記第1の送信手順で上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手順と、上記第1の受信手順で受信した動作応答を、対応する動作要求と対応付けて上記第1の記憶手段に記憶させると共に、上記第1の受信手段が受信した動作要求を、上記第2の記憶手段に記憶させる分配手順と、上記第1の記憶手段から、上記クライアントに送信すべき動作応答を読み出し、上記クライアントに送信する第2の送信手順と、上記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて上記第2の記憶手段に記憶させる処理手順とを実行させるようにしたものである。 Further, the communication method of the present invention is a communication method in which communication between a server and a plurality of clients is mediated by an intermediary device , wherein the operation request from the client and an operation response to the operation request are sent to the intermediary device . A procedure for preparing first storage means for storing data, a procedure for preparing second storage means for storing an operation request from the server and an operation response to the operation request, and an operation request from each client. Is received and stored in the first storage means, and the operation request to be transmitted to the server is read from the first storage means, and the second storage means is sent to the server. The operation response in a state in which transmission is possible is read, and the operation request and the operation response are transmitted to the server. The server transmits the operation response and the operation response to the server in the first transmission procedure. When the scan, at the server, operating response and when there is anything that could be transmittable state of the operation request from the server, the operation response and operation to any of the operation request sent so far a second receiving step of receiving the request, the operation response received in said first receiving procedure, causes stored in the corresponding above in association with the operation request to the first storage means, the said first receiving means A distribution procedure for storing the received operation request in the second storage means, a second transmission procedure for reading an operation response to be transmitted to the client from the first storage means, and transmitting the response to the client; A process according to the operation request stored in the second storage means is executed to obtain an operation response to the operation request, and is associated with the operation request in the second storage means. It is obtained so as to execute a processing procedure for憶.
このような通信方法において、上記仲介装置に実行させる上記第2の受信手順を、上記第1の送信手順で上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手順とするとよい。
さらに、上記第1の送信手順が、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまで、上記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に上記サーバにアクセスする手順を設けるとよい。
In such a communication method, when the second reception procedure to be executed by the intermediary device is accessed by the first transmission procedure , the server responds to any operation request transmitted so far. If there are a plurality of operation responses and operation requests from the server that are ready for transmission, the procedure may be a procedure for receiving a plurality of these operation responses and operation requests at once.
Moreover, the presence or absence of said first transmission procedure, after sending the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, the operation requests and the operation responses to be transmitted to said server Regardless, it is advisable to provide a procedure for periodically accessing the server.
さらに、上記第1の送信手順に、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で上記サーバにアクセスする手順を設けるとよい。
また、上記の各通信方法において、上記仲介装置に、さらに、上記クライアントから動作要求を受信した場合に、そのクライアントに対して受信通知を送信する受信通知手順を実行させるようにするとよい。
Further, after transmitting an operation request to the server in the first transmission procedure, until an operation response to all the operation requests transmitted to the server is received, the server is sent to the server at intervals shorter than other periods. A procedure for access may be provided .
Further, in each of the communication methods described above, when the mediation device further receives an operation request from the client, a reception notification procedure for transmitting a reception notification to the client may be executed.
また、この発明のプログラムは、サーバと複数のクライアントとの間の通信を仲介する仲介装置を制御するコンピュータを、上記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、上記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、上記各クライアントからの動作要求を受信して上記第1の記憶手段に記憶させる第1の受信手段と、上記第1の記憶手段から、上記サーバに送信すべき動作要求を読み出し、上記第2の記憶手段から、上記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を上記サーバに送信する第1の送信手段と、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、上記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて上記第1の記憶手段に記憶させると共に、上記第1の受信手段が受信した動作要求を、上記第2の記憶手段に記憶させる分配手段と、上記第1の記憶手段から、上記クライアントに送信すべき動作応答を読み出し、上記クライアントに送信する第2の送信手段と、上記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて上記第2の記憶手段に記憶させる処理手段として機能させるためのプログラムである。 According to another aspect of the present invention, there is provided a program that controls a computer that controls an intermediary device that mediates communication between a server and a plurality of clients, and that stores an operation request from the client and an operation response to the operation request. Means, a second storage means for storing an operation request from the server and an operation response to the operation request, and a first storage for receiving the operation request from each client and storing it in the first storage means. The operation request to be transmitted to the server is read from the reception unit and the first storage unit, and the operation response in a state that can be transmitted to the server is read from the second storage unit. when a first transmission means for transmitting a response to the server, the first transmission means has access to the server, at the server, and sends the far If there is anything that could be transmittable state in the operation response and operation request from the server to any of the operation request, second receiving means for receiving the operation response and the operation request, said first The operation response received by one receiving unit is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first receiving unit is stored in the second storage unit. A distribution means for storing, an operation request to be transmitted to the client from the first storage means, a second transmission means for transmitting to the client, and an operation request stored in the second storage means executes processing in accordance with the acquired operation response to the operation request, program for functioning as a processing means for storing in the second storage means in association with the operation request It is.
このようなプログラムにおいて、第2の受信手段を、上記第1の送信手段が上記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び上記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段とするとよい。
さらに、上記第1の送信手段を、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまで、上記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に上記サーバにアクセスする手段とするとよい。
In such a program, when the first transmission means accesses the server, the server receives an operation response to any of the operation requests transmitted so far and the operation from the server. In the case where there are a plurality of requests that can be transmitted , it is preferable that the plurality of operation responses and operation requests are collectively received.
Furthermore, the first transmission means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, whether the operation request and the operation response to be transmitted to said server Regardless, it may be a means for periodically accessing the server.
さらに、上記第1の送信手段が、上記サーバに動作要求を送信した後、そのサーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で上記サーバにアクセスする手段を設けるとよい。
また、上記の各プログラムにおいて、上記コンピュータを、上記クライアントから動作要求を受信した場合に、そのクライアントに対して受信通知を送信する受信通知手段として機能させるためのプログラムを更に含めるとよい。
Furthermore, the first transmission means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, to the server at intervals shorter than the other period Means for accessing may be provided .
Each of the above programs may further include a program for causing the computer to function as reception notification means for transmitting a reception notification to the client when an operation request is received from the client.
また、この発明の記録媒体は、上記のいずれかのプログラムを記録したコンピュータ読み取り可能な記録媒体である。 The recording medium of the present invention is a computer-readable recording medium on which any one of the above programs is recorded.
以上のようなこの発明の仲介装置、通信システム、又は通信方法によれば、ファイアウォールの内側に設けられるクライアントがファイアウォールの外側にあるサーバに動作要求を送信してその動作要求に対する動作応答を受信する場合において、サーバにおいて動作要求に対応する処理に時間を要する場合でも、サーバからクライアントへの動作応答の転送のために必要な通信トラフィックを抑えながら、動作要求をタイムアウトさせずに済ませられるようにすることができる。
また、この発明のプログラムによれば、コンピュータを上記の仲介装置として機能させてその特徴を実現し、同様な効果を得ることができる。この発明の記録媒体によれば、上記のプログラムを記憶していないコンピュータにそのプログラムを読み出させて実行させ、上記の効果を得ることができる。
According to the mediating apparatus, communication system, or communication method of the present invention as described above, a client provided inside the firewall transmits an operation request to a server outside the firewall and receives an operation response to the operation request. In some cases, even if the server takes time to process the operation request, the operation request is not timed out while suppressing the communication traffic necessary for transferring the operation response from the server to the client. be able to.
Further, according to the program of the present invention, a computer can be made to function as the mediation device described above to realize its characteristics, and similar effects can be obtained. According to the recording medium of the present invention, the above effect can be obtained by causing a computer not storing the above program to read and execute the program.
以下、この発明を実施するための最良の形態について、図面を参照して説明する。
〔実施形態:図1,図2〕
まず、この発明の仲介装置及びその仲介装置を用いて構成した通信システムの第1の実施形態について説明する。図1は、その通信システムの構成を示すブロック図である。
図1に示すように、この通信システムは、第1の通信装置である管理装置102と、第2の通信装置である複数の被管理装置10と、これらの間の通信を仲介する仲介装置101及び被管理仲介装置101を備える。そして、このうち仲介装置101,被管理仲介装置110及び被管理装置10をユーザ側の設置環境に配置し、これらと管理装置102とがインターネット103を介して通信可能な構成としている。そして、管理装置102が各被管理装置10と通信を行って各被管理装置10を集中的に遠隔管理する遠隔管理システムを構成している。
The best mode for carrying out the present invention will be described below with reference to the drawings.
[Embodiment: FIGS. 1 and 2]
First, a first embodiment of an intermediary device of the present invention and a communication system configured using the mediation device will be described. FIG. 1 is a block diagram showing the configuration of the communication system.
As shown in FIG. 1, this communication system includes a
なお、被管理装置10としては、種々の電子装置に通信機能を設けた通信装置が考えられ、例えば、プリンタ,FAX装置,デジタル複写機,スキャナ装置,デジタル複合機等の画像処理装置や、ネットワーク家電,自動販売機,医療機器,電源装置,空調システム,ガス・水道・電気等の計量システム,自動車,航空機等に通信機能を持たせた通信装置が考えられる。
ところで、この通信システムにおいて、各設置環境内の仲介装置101と被管理装置10および被管理仲介装置110は、互いにLAN(ローカルエリアネットワーク)によって接続し、これを介して通信可能としている。そして、セキュリティ面を考慮し、ファイアウォール104を介してLANをインターネット103に接続している。
The managed
By the way, in this communication system, the
ここで、ファイアウォール104は、通常は外部からの通信要求を遮断するよう設定されているため、管理装置102は、HTTP(Hyper Text Transfer Protocol)リクエストのような通信要求を送信するだけではファイアウォール104の内側の被管理装置10に情報を送信することができない。従って、管理装置102と被管理装置10とが情報を授受するためには、特殊なプロトコルを採用する必要があるが、各被管理装置10をこのプロトコルに対応させるためには、手間やコストがかかる。そこで、被管理装置10には一般的な通信プロトコルを採用してLAN内での(ファイアウォールを挟まない)通信のみに対応させる一方、上記の特殊なプロトコルに対応した仲介装置101を設け、管理装置102と被管理装置10の間の通信を仲介させることにより、特殊なプロトコルに対応していない被管理装置10と管理装置102との間での情報の授受を可能としている。
また、仲介装置101に通信を仲介させることにより、被管理装置10が個々に管理装置102と通信を行う場合に比べて、通信トラフィックを低減できるようにしている。
Here, since the
Further, by causing the
なお、仲介装置101と被管理装置10との接続は、LANに限らず、RS−485規格等に準拠したシリアル接続や、SCSI(Small Computer System Interface)規格等に準拠したパラレル接続等によって行ってもよい。例えばRS−485規格の場合には、仲介装置101に直列に5台までの被管理装置10を接続することができる。
また、これらの仲介装置101、被管理装置10及び被管理仲介装置110は、その利用環境に応じて多様な階層構造を成す。
Note that the connection between the
In addition, the
例えば、図1に示す設置環境Aでは、管理装置102とHTTPによる直接的なコネクションを確立できる仲介装置101aが、被管理装置10a及び10bを従える単純な階層構造になっているが、同図に示す設置環境Bでは、4台の被管理装置10を設置するため、1台の仲介装置101を設置しただけでは負荷が大きくなる。そのため、管理装置102とHTTPによる直接的なコネクションを確立できる仲介装置101bが、被管理装置10c及び10dだけでなく、他の仲介装置として被管理仲介装置110を従え、この被管理仲介装置110が被管理装置10e及び10fを更に従えるという階層構造を形成している。この場合、被管理装置10e及び10fを遠隔管理するために管理装置102から発せられた情報は、仲介装置101bとその下位のノードである被管理仲介装置110とを経由して、被管理装置10e又は10fに到達することになる。
For example, in the installation environment A shown in FIG. 1, the
また、このような通信システムにおいて、仲介装置101は、これに接続された被管理装置10の制御管理のためのアプリケーションプログラムを実装している。管理装置102は、各仲介装置101の制御管理、更にはこの仲介装置101を介した被管理装置10及び被管理仲介装置110の制御管理を行うためのアプリケーションプログラムを実装している。そして、被管理装置10も含め、この遠隔管理システムにおけるこれら各ノードは、RPC(remote procedure call)により、相互の実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。
In such a communication system, the
即ち、管理装置102は、被管理装置10や仲介装置101への動作要求(以下、管理装置側動作要求という)を生成してこれを被管理装置10や仲介装置101へ引き渡し、この動作要求に対する動作応答を取得できる一方で、被管理装置10は、仲介装置101や管理装置102への動作要求(以下、被管理装置側要求という)を生成してこれを仲介装置101や管理装置102へ引き渡し、この動作要求に対する動作応答を取得できるようになっている。また、仲介装置101も、被管理装置10や管理装置102への動作要求(以下、仲介装置側要求という)を生成してこれを被管理装置10や管理装置102へ引き渡し、この動作要求に対する動作応答を取得できるようになっている。
That is, the
なお、ここではメソッドを、入力と出力の形式を規定した論理的な関数として定義するものとする。そしてこの場合、動作要求はこの関数を呼び出す関数呼び出し(Procedure Call)となり、動作応答はその関数呼び出しによって呼び出された関数の実行結果となる。動作要求による要求の内容には、意味のある実行結果を伴わない通知も含まれる。 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. The content of the request by the operation request includes a notification without a meaningful execution result.
図2に、これらの動作要求と動作応答の関係の一部を示す。なお、この図においてはファイアウォール104の存在は考慮していない。
図2(A)は、被管理装置10で管理装置102に対する動作要求が発生したケースである。このケースでは、被管理装置10が被管理装置側動作要求aを生成し、これを仲介装置101を経由して受け取った管理装置102がこの動作要求に対する動作応答aを返すというモデルになる。また、図に示す仲介装置101が複数であるケースも想定できる(例えば被管理装置が図1に示した被管理装置10e又は10fの場合)。なお、被管理装置側動作要求aは、管理装置102に送信される動作要求であるから、管理装置「宛て」の動作要求と言うことができる。
FIG. 2 shows a part of the relationship between these operation requests and operation responses. In this figure, the presence of the
FIG. 2A shows a case where an operation request for the
また、図2(A)では、動作応答aだけでなく遅延通知a′を返信するケースも表記している。これは管理装置102が、接続してきた仲介装置101から被管理装置側動作要求aを受け取って、これとの接続中にその動作要求に対する応答を返せないと判断したときには、応答が遅延する旨を通知して一旦接続状態を切断し、後の接続の際に上記動作要求に対する応答を改めて引き渡す構成とすることが考えられるためである。なお、このシステムにおいては、被管理装置10に遅延通知を処理する機能を設けなくてよいようにするため、遅延通知は被管理装置10に転送せずに仲介装置101で管理しておき、仲介装置101が管理装置102から応答aを受信した時点で被管理装置10にその応答を転送するようにしている。また、被管理装置10に遅延通知を処理する機能を設けるのであれば、被管理装置10に遅延通知をするように転送してもよい。
FIG. 2A also shows a case where not only the operation response a but also a delay notification a ′ is returned. This means that when the
図2(B)は、被管理装置10で仲介装置101に対する動作要求が発生したケースである。このケースでは、被管理装置10が、例えば、被管理装置側動作要求bを生成し、これを受け取った仲介装置101が、その動作要求に対する動作応答bを返すというモデルになる。なお、図2(B)のケースでは、遅延通知は返さない。
FIG. 2B shows a case where an operation request for the
図2(C)は、仲介装置101で、管理装置102に対する動作要求が発生したケースである。このケースでは、仲介装置101が仲介装置側動作要求cを生成し、これを受け取った管理装置102が、その動作要求に対する動作応答cを返すというモデルになる。この(C)のケースでも、(A)の場合と同様、管理装置102は、応答を即座に返せない時は遅延通知c′を返すようにすることが考えられる。
FIG. 2C shows a case where an operation request for the
図2(D)は、仲介装置101で被管理装置10に対する動作要求が発生したケースである。このケースでは、仲介装置101が仲介装置側動作要求dを生成し、これを受け取った被管理装置10が、その動作要求に対する動作応答dを返すというモデルになる。なお、ここで被管理装置10が使用している一般的な通信プロトコルは、遅延通知を返す機能を有していないので、被管理装置10は遅延通知は返さない。
なお、管理装置102からの仲介装置101や被管理装置10宛ての動作要求についても、上記の場合と同様に動作要求を受け取った装置がその動作要求に対して応答を返す。しかし、この実施形態は、ファイアウォール104の内側の被管理装置10や仲介装置101の側からファイアウォール104の外側の管理装置102の側への動作要求及びその動作要求に対する応答の転送の方式に特徴を有するため、管理装置102側からの動作要求については、ここでは図示を省略する。
FIG. 2D shows a case where an operation request for the managed
As for the operation request from the
また、ここではRPCによる引数並びに戻り値の受け渡しのプロトコルとしてSOAP(Simple Object Access Protocol)を採用し、上記の動作要求や動作応答は、ここではSOAPメッセージとして記載するようにしている。
そして、実際に動作要求や動作応答を転送するための通信プロトコルとしては、システムの構成に合わせて適当なものを採用することができ、例えばHTTP(HyperText Transfer Protocol)やSMTP(Simple Mail Transfer Protocol)を採用することができるが、ここでは、通信プロトコルにHTTPを採用する場合について説明する。
Here, SOAP (Simple Object Access Protocol) is adopted as a protocol for passing arguments and return values by RPC, and the operation request and response described above are described here as SOAP messages.
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). Here, a case where HTTP is adopted as a communication protocol will be described.
〔第1の実施例:図3乃至図41〕
ここで、図1に示した通信システムのより具体的な実施例として、サーバである管理装置によってそれぞれクライアントである複数の画像処理装置の遠隔管理を行い、これらの装置間の通信をこの発明の仲介装置によって仲介する遠隔管理システムについて説明する。図3は、その遠隔管理システムの構成の一例を示す概念図であるが、被管理装置10を画像処理装置100に変更した点が図1と相違するのみであるので、システムの全体構成についての説明は省略する。
画像処理装置100は、コピー、ファクシミリ、スキャナ等の機能及び外部装置と通信を行う機能を備えたデジタル複合機であり、それらの機能に係るサービスを提供するためのアプリケーションプログラムを実装しているものである。
[First Embodiment: FIGS. 3 to 41]
Here, as a more specific embodiment of the communication system shown in FIG. 1, a management apparatus that is a server remotely manages a plurality of image processing apparatuses that are clients, and communication between these apparatuses is performed according to the present invention. A remote management system that mediates by an intermediary device will be described. FIG. 3 is a conceptual diagram showing an example of the configuration of the remote management system. However, the only difference from FIG. 1 is that the managed
The
また、図1に示した通信システムの場合と同様に、仲介装置101は、これに接続された画像処理装置100の制御管理のためのアプリケーションプログラムを実装している。管理装置102は、各仲介装置101の制御管理、更にはこの仲介装置101を介した画像処理装置100及び被管理仲介装置110の制御管理を行うためのアプリケーションプログラムを実装している。そして、RPC(remote procedure call)により、相互の実装するアプリケーションプログラムのメソッドに対する処理の依頼である「動作要求」を送信し、この依頼された処理の結果である「動作応答」を取得することができるようになっている。
As in the case of the communication system shown in FIG. 1, the
図4に、これらの動作要求と動作応答の関係を示す。なお、この図においてもファイアウォール104の存在は考慮していない。
図4(A)は、画像処理装置100で管理装置102に対する動作要求が発生したケースである。このケースでは、画像処理装置100が画像処理装置側動作要求a(以下、「画像機器コマンド」とも呼ぶ)を生成し、これを仲介装置101を経由して受け取った管理装置102がこのコマンドに対する動作応答a(以下、「コマンド応答」あるいは単に「応答」とも呼ぶ)を返すというモデルになる。また、図に示す仲介装置101が複数であるケースも想定できる。なお、応答を即座に返せないときに遅延通知a′を返信するようにしてもよいことは、図2(A)のケースと同様である。
FIG. 4 shows the relationship between these operation requests and operation responses. In this figure, the presence of the
FIG. 4A shows a case where an operation request for the
図4(B)は、画像処理装置100で仲介装置101に対する動作要求が発生したケースである。このケースでは、画像処理装置100が、例えば、画像処理装置側動作要求(画像機器コマンド)bを生成し、これを受け取った仲介装置101が、その動作要求に対する動作応答bを返すというモデルになる。仲介装置101が遅延通知は返さないことは、図2(B)のケースと同様である。
FIG. 4B shows a case where an operation request for the
図4(C)は、仲介装置101で、管理装置102に対する動作要求が発生したケースである。このケースでは、仲介装置101が仲介装置側動作要求c(以下、「仲介装置コマンド」とも呼ぶ)を生成し、これを受け取った管理装置102が、その動作要求に対する動作応答cを返すというモデルになる。なお、応答を即座に返せないときに遅延通知c′を返信するようにしてもよいことは、図2(A)のケースと同様である。
FIG. 4C shows a case where an operation request for the
図4(D)は、仲介装置101で画像処理装置100に対する動作要求が発生したケースである。このケースでは、仲介装置101が仲介装置側動作要求(仲介装置コマンド)dを生成し、これを受け取った画像処理装置100が、その動作要求に対する動作応答dを返すというモデルになる。なお、画像処理装置100が遅延通知は返さないことは、図2(D)のケースと同様である。
以下、このようなコマンド及びコマンド応答を転送する際の通信シーケンスについて説明する。
FIG. 4D shows a case where an operation request for the
Hereinafter, a communication sequence when transferring such a command and command response will be described.
まず、図5に画像処理装置と仲介装置との間の通信シーケンスの例を示す。
この図に示すように、画像処理装置100と仲介装置101とは、通信要求であるHTTPリクエストと、その通信要求に対する通信応答であるHTTPレスポンスとを、互いに送受信することによって通信を行っている。そして、画像処理装置100と仲介装置101との間にはファイアウォールがないため、画像処理装置100と仲介装置101のどちらがHTTPリクエストを送信しても(通信サーバとして機能しても)通信を行うことができる。例えば、画像処理装置100が送信したHTTPリクエストXに対して仲介装置101がHTTPレスポンスXを返すこともできるし、仲介装置101が送信したHTTPリクエストWに対して画像処理装置100がHTTPレスポンスWを返すこともできるという具合である。
First, FIG. 5 shows an example of a communication sequence between the image processing apparatus and the mediation apparatus.
As shown in this figure, the
そして、画像処理装置100は、仲介装置101あるいは管理装置102に対するコマンドを、HTTPリクエストに記載して仲介装置101に送信する(HTTPリクエストX,Y)。そして、仲介装置101は、受信したコマンドが自身に対するものであれば、コマンドに応じた処理を行い、コマンド受信時のHTTPリクエストに対するHTTPレスポンスに応答を記載して画像処理装置100に送信する(HTTPレスポンスX)。
Then, the
また、仲介装置101は、受信したコマンドが管理装置102に対するものであれば、コマンドを管理装置102に転送し、管理装置102から応答を受信して、その応答を画像処理装置100に送信する。ただし、この場合には管理装置102においてコマンドに応じた処理に時間がかかったり、ただちに応答を取得できなかったりする場合がある。そして、このような場合にも応答をコマンド受信時のHTTPリクエストに対するHTTPレスポンスに記載して送信するとすると、画像処理装置100においてHTTPリクエストがタイムアウトしてしまい、結果としてコマンドに対する応答を受信できなくなってしまう場合がある。
If the received command is for the
そこで、ここでは、図5(b)に示すようなシーケンスを採用し、仲介装置101は、管理装置102に対するコマンド(自身で処理せずに転送するコマンド)を受信した場合には、コマンド受信時のHTTPリクエストに対するHTTPレスポンスに受付通知を記載して画像処理装置100に送信するようにしている(HTTPレスポンスY)。そして、管理装置102からコマンドに対する応答を受信した時点で、その応答の内容を通知する結果通知をHTTPリクエストに記載して画像処理装置100に送信するようにしている(HTTPリクエストZ)。また、画像処理装置100は、このHTTPリクエストに対応するHTTPレスポンスに、結果通知の受信通知を記載して仲介装置101に返すようにしている。
Therefore, here, a sequence as shown in FIG. 5B is adopted, and when the
このようにすることにより、画像機器コマンドに対する応答を受信通知という形で速やかに返すことが可能になり、画像処理装置100におけるHTTPリクエストのタイムアウトを防止することができる。
なお、仲介装置101から画像処理装置100に対する結果通知は、図5(c)に示すようなシーケンスで転送される仲介装置101から画像処理装置100に対するコマンドの1種として構成することができる。
また、画像処理装置100から仲介装置101に対する画像機器コマンドについても、上述の受付通知及び結果通知を用いるようにしてもよい。
By doing so, it becomes possible to quickly return a response to the image device command in the form of a reception notification, and an HTTP request timeout in the
The result notification from the
Further, the above-described reception notification and result notification may be used for the image device command from the
次に、図6に仲介装置と管理装置との間の通信シーケンスの例を示す。
仲介装置101と管理装置102との間には、ファイアウォール104があるため、この図に示すように、通信は常に、仲介装置101から通信要求としてHTTPリクエストを管理装置102に送信し、管理装置102からこの通信要求に対する通信応答としてHTTPレスポンスを仲介装置101に返すという手順で行われる。例えば仲介装置101が送信したHTTPリクエストMに対して管理装置102がHTTPレスポンスMを返し、同じくHTTPリクエストNに対してHTTPレスポンスNを返すという具合である。
Next, FIG. 6 shows an example of a communication sequence between the mediation device and the management device.
Since there is a
仲介装置101は、画像処理装置100から受信した画像機器コマンドのうち、自身で処理せず転送するコマンドを、HTTPリクエストに記載して管理装置102に転送するようにしている(HTTPリクエストM,N)。
一方、管理装置102は、受信したコマンドに対する応答がすぐに生成できる場合には、図6(a)に示すように、コマンド受信時のHTTPリクエストに対するHTTPレスポンスに応答を記載して仲介装置101に送信するようにしてもよい(HTTPレスポンスM)。
しかし、処理に時間がかかることがある場合には、仲介装置101においてHTTPリクエストがタイムアウトしてしまう場合があるので、(b)に示すように、コマンド受信時のHTTPリクエストに対するHTTPレスポンスに受付通知を記載して仲介装置101に送信するようにしている(HTTPレスポンスN)。
The
On the other hand, if the response to the received command can be generated immediately, the
However, if the processing may take time, the HTTP request may time out in the
そしてこの場合、仲介装置101は定期的に結果問い合わせのコマンドを記載したHTTPリクエストを管理装置102に送信するようにしている(HTTPリクエストO,P)。そして、管理装置102は、受信したコマンドに対する処理が完了していなければ、結果問い合わせに対する応答として未完了通知を、対応するHTTPレスポンスに記載して仲介装置101に送信する(HTTPレスポンスO)。また、処理が完了していれば、処理が完了したコマンドに対する応答を、結果問い合わせに対する応答として、結果問い合わせが記載されていたHTTPリクエストに対応するHTTPレスポンスに記載して仲介装置101に送信する(HTTPレスポンスP)。
なお、管理装置102が遅延通知を送信する場合には、上記受付通知あるいは未完了通知に代えて遅延通知を記載してもよい。
In this case, the
When the
また、図7に、仲介装置と管理装置との間の別の通信シーケンスの例を示す。
この図に示すように、仲介装置101は、送信したコマンドに対する応答を管理装置102から受信する前に、他のコマンド(初めのコマンドとは別の画像処理装置が生成したものでもよい)を管理装置102に送信することができる(HTTPリクエストQ,R)。そして、管理装置102は、このそれぞれに対して受付通知を返す(HTTPレスポンスQ,R)。
しかし、このような場合、管理装置102は、仲介装置101からの結果問い合わせに対し、必ずしも先に受信したコマンドに対する応答を先に返すわけではなく、結果問い合わせがあった時点で応答が返信可能になっているもののいずれかを返すようにしている。この結果、図7に示したように、後から受信した画像機器コマンドCに対する応答を、画像機器コマンドBに対する応答よりも先に返すようになることもある。
なお、結果問い合わせがあった時点で返信可能な応答が複数あった場合には、先に受信したコマンドに対する応答を先に返信するようにするとよい。
FIG. 7 shows an example of another communication sequence between the mediation device and the management device.
As shown in this figure, the
However, in such a case, the
When there are a plurality of responses that can be returned at the time when the result inquiry is made, a response to the previously received command may be returned first.
以上のような通信シーケンスを採用することにより、管理装置102が仲介装置101から受信したコマンドの実行結果をすぐに用意できない場合でも、仲介装置101に対してコマンドに対する応答を転送することができる。
また、このようにして管理装置102からコマンドの実行結果を受信するためには、管理装置102に対して定期的に通信要求を行う(ここでは結果問い合わせコマンドを記載したHTTPリクエストの送信が該当する)必要がある。しかし、仲介装置101がこの定期的な通信要求を取りまとめて行うことができるので、複数の画像処理装置100がばらばらに行う場合に比べて通信要求の回数を低減し、管理装置102から仲介装置101への動作応答の転送のために必要な通信トラフィックを抑えられるようにすることができる。また、画像処理装置100には、このような定期的な通信要求を行う機能を設ける必要がないので、画像処理装置100の構成を単純化でき、設計や開発のコストを低減することができる。
By adopting the communication sequence as described above, even when the
Further, in order to receive the command execution result from the
次に、図8乃至図10を用いて、図3に示した管理装置、画像処理装置、仲介装置のハードウェア構成について説明する。
まず、図8のブロック図に管理装置のハードウェア構成の概略を示す。
この管理装置102は、モデム121,通信端末122,外部接続I/F123,操作者端末124,データベース125,制御装置126等からなる。
モデム121は、公衆回線を介して機器利用者側(例えば画像処理装置を利用しているユーザ先)の仲介装置101との通信を司るものであり、送受信するデータを変復調する。このモデム121と通信端末122により通信手段としての機能を果たす。
Next, the hardware configuration of the management apparatus, the image processing apparatus, and the mediation apparatus illustrated in FIG. 3 will be described with reference to FIGS.
First, an outline of the hardware configuration of the management apparatus is shown in the block diagram of FIG.
The
The
通信端末122は、公衆回線を介してラインアダプタや仲介装置101とのデータの送受信を行う。
外部接続I/F123は、インターネット103を介して機器利用者側の仲介装置101とのデータの送受信及びセキュリティ管理を行う。この外部接続I/F123も、通信手段としての機能を果たす。また、セキュリティ管理のためのプロキシサーバ等を設けてもよい。
The
The external connection I /
操作者端末124は、管理センタのオペレータが操作する端末であり、各種データの入力をオペレータによるキーボード等の入力装置上の操作により受け付けたり、オペレータに通知すべき情報を表示部に表示したりする。入力されるデータとしては、例えば、各機器利用者側の仲介装置101が管理装置102へ通信する際に使用するIPアドレスや発呼先電話番号等の顧客情報がある。
データベース125は、図示しないデータベースサーバのハードディスク装置等の記憶装置に存在し、画像処理装置100のIPアドレスや電話番号、それらの装置から受信した異常情報等のデータ、操作者端末124から入力されたデータ等の各種データを記憶する。
The
The
制御装置126は、図示しないCPU,ROM,RAM等からなるマイクロコンピュータを備えており、管理装置102全体を統括的に制御する。そのCPUが、ROM等に記憶している制御プログラムを必要に応じて実行すると共に、モデム121,通信端末122,外部接続I/F123,操作者端末124またはデータベース125を利用することにより、各種の機能を実現することができる。
なお、管理装置102の構成はこれに限られることはなく、例えば1台のPCを用いて構成することもできる。
The
The configuration of the
次に、図9に画像処理装置のハードウェア構成を示す。
画像処理装置100はここでは、プリンタ、ファクシミリ(FAX)装置、デジタル複写機、スキャナ装置、文書管理装置等の機能を備えたデジタル複合機として構成しており、図9に示すように、CPU201,ASIC(Application Specific Integrated Circuit)202,SDRAM203,フラッシュメモリ(不揮発性メモリ)204,NRS用メモリ205,PHY(物理メディアインタフェース)206,NVRAM(不揮発性メモリ)207,操作部209,HDD(ハードディスクドライブ)210,モデム211,PI(パーソナルインタフェース)212,FCU(ファックスコントロールユニット)213,USB(Universal Serial Bus)214,IEEE(Institute of Electrical and Electronic Engineers)1394_215,エンジンインタフェース(I/F)216,およびエンジン部217を備えている。これらの構成が、画像読み取り、画像形成、画情報送信等の画像処理を行うためのハードウェア資源である。
Next, FIG. 9 shows a hardware configuration of the image processing apparatus.
Here, the
CPU201は、ASIC202を介してデータ処理(各機能の制御)を行う演算処理手段である。
ASIC202は、CPUインターフェース,SDRAMインターフェース,ローカルバスインタフェース,PCIインタフェース,MAC(Media Access Controller)、HDDインタフェースなどからなる多機能デバイスボードであり、CPU201の制御対象となるデバイスの共有化を図り、アーキテクチャの面からアプリ(アプリケーションソフト)や共通システムサービスの開発の高効率化を支援するものである。
また、このASIC202には各エンジン部の操作命令等を受け付けるオペレーションパネル等による操作部209が直接的に接続されると共に、PHY206も直接的に接続される。また、FCU213やUSB214,IEEE1394_215及びエンジンI/F216がPCIバス218を介して接続され、必要に応じてモデム211やPI212等が直接接続される。
The
The
Further, the
そして、上記のCPU201は、このASIC202を介してフラッシュメモリ204やHDD210等の記憶手段から必要な制御プログラムを読み出し、SDRAM203等に展開して実行することにより、情報の処理を行う処理手段として機能することができる。
SDRAM203は、OSを含む各種プログラムを記憶するプログラムメモリや、CPU201がデータ処理を行う際に使用するワークメモリ等として使用するメインメモリである。なお、このSDRAM203の代わりに、DRAMやSRAMを使用してもよい。
The
The
フラッシュメモリ204は、例えば、画像処理装置100を起動させるブートローダ(ブートプログラム)やOSのファイルであるOSイメージ及び後述する種々のプログラムを記憶するプログラムメモリ、種々の固定パラメータを記憶する固定パラメータメモリ等として使用する不揮発性メモリ(記憶手段)であり、電源がオフになっても記憶内容を保持するようになっている。なお、このフラッシュメモリ204の代わりに、RAMと電池を利用したバックアップ回路を集積した不揮発性RAMや、EEPROM等の他の不揮発性メモリを使用してもよい。
The
NRS用メモリ205は、後述するNRSアプリを記憶する不揮発性メモリであり、オプションでNRS機能を追加することができる。
PHY206は、LANを介して外部装置と通信を行うためのインタフェースである。
NVRAM207は、例えば、この画像処理装置100の識別情報である機種機番を記憶する機種機番メモリ、操作部209による操作上の初期値を記憶するメモリ、各アプリ(APL)の初期値を記憶するメモリ、各カウンタ情報(課金カウンタのデータ)を記憶するメモリ、自身や通信相手の設定状況、ネットワークアドレス情報、プロトコル等の機種情報を記憶するメモリ等として使用する不揮発性メモリ(記憶手段)であり、電源がオフになっても記憶内容を保持するようになっている。なお、このNVRAM207として、RAMと電池を利用したバックアップ回路を集積した不揮発性RAMや、EEPROM,フラッシュメモリ等の不揮発性メモリを使用することができる。
The
The
The
操作部209は、操作表示手段(操作手段および表示手段)である。
HDD210は、電源のオン・オフに関係なくデータを記憶保存する記憶手段(記録媒体)である。このHDD210に、上述したフラッシュメモリ204内のプログラムやそれ以外のデータ、あるいはNVRAM207内のデータを記憶しておくこともできる。また、定期的に収集、更新、送信等の処理を行う対象となるデータも、このHDD210に記憶させておくとよい。
モデム211は、変復調手段であり、管理装置102へ公衆回線経由でデータを送信する場合、そのデータを公衆回線に流せる形に変調する。また、管理装置102から送られてくる変調されたデータを受信した場合、そのデータを復調する。
The
The
The
PI212は、RS485規格に準拠したインタフェースを備え、図示しないラインアダプタを介して公衆回線に接続している。
FCU213は、FAX装置又はモデム機能(FAX通信機能)を有するデジタル複写機やデジタル複合機等の画像処理装置および管理装置102等の外部装置との通信を公衆回線経由で制御する。
USB214及びIEEE1394_215はそれぞれ、周辺機器と通信を行うための、USB規格及びIEEE1394規格のインタフェースである。
エンジンI/F216は、エンジン部217をPCIバスに接続するためのインタフェースである。
エンジン部217は、公知のスキャナエンジン及びプロッタエンジン等からなる画像読み取り/形成用のエンジンや、プロッタエンジンによって画像を形成した用紙に、ソート、穴開け、ステープル処理等の後処理を行う後処理ユニット等が該当する。
The
The
The engine I /
The
このような画像処理装置100において、電源投入(電源オン)時には、CPU201は、ASIC202経由でフラッシュメモリ204内のブートローダを起動させ、そのブートローダに従い、フラッシュメモリ204内のOSイメージを読み出し、それをSDRAM203にロードして使用可能なOSに展開する。そして、OSの展開が完了すると、そのOSを起動させる。その後、必要に応じてフラッシュメモリ204内のアプリ等のプログラムあるいはNRS用メモリ205内のNRSアプリを読み出し、それをSDRAM203にロードして展開し、起動させることにより、各種機能を実現することができる。
In such an
次に、図10に仲介装置のハードウェア構成を示す。
仲介装置101は、図10に示すように、CPU52,SDRAM53,フラッシュメモリ54(不揮発性メモリ),RTC(内部時計であるリアルタイムクロック回路)55,Op−Port(操作部接続ポート)56,PHY57,モデム58,HDD制御部59,拡張I/F60,RS232I/F(インタフェース)61,RS485I/F62,HDD63等を備えている。
Next, FIG. 10 shows a hardware configuration of the mediation apparatus.
As shown in FIG. 10, the
そして、CPU52は、フラッシュメモリ54やHDD63等の記憶手段から必要な制御プログラムを読み出し、SDRAM53等に展開して実行することにより、仲介装置101全体を制御し、この発明による機能(記憶手段,収集手段,分配手段,個別送信手段,個別受信手段,一括送信手段,一括受信手段,その他の手段としての機能)を実現することができる。
SDRAM53は、OSを含む各種プログラムを記憶するプログラムメモリや、CPU52がデータ処理を行う際に使用するワークメモリ等として使用するメインメモリである。
Then, the
The
フラッシュメモリ54は、例えば、仲介装置101を起動させるブートローダ(ブートプログラム)やOSのファイルであるOSイメージ及び後述する種々のプログラムを記憶するプログラムメモリ、種々の固定パラメータを記憶する固定パラメータメモリ等として使用する不揮発性メモリ(記憶手段)であり、電源がオフになっても記憶内容を保持するようになっている。HDD63にも同様なデータを記憶させることができる。
RTC55は計時のための回路であり、Op−Port56は図示しない操作部における操作を検出する回路である。
また、PHY57,モデム58,RS485I/F62は、それぞれLAN,公衆回線,RS485規格のシリアル通信によって通信を行うためのインタフェースである。
拡張I/F60は、無線LANボードや拡張メモリ等の拡張ボードを接続するためのI/Fである。
The
The
The
The expansion I /
そして、この仲介装置101はPHY57を介してネットワーク上の画像処理装置100や被管理仲介装置110と接続され、またインターネット103に接続されている。また、画像処理装置100とは、RS232I/F61およびRS485I/F62を介しても接続可能である。なお、SDRAM53の代わりに、DRAMやSRAMを使用してもよい。また、フラッシュメモリ54の代わりに、EEPROM等の他の不揮発性メモリを使用してもよい。
The
次に、図11乃至図34を用いて、以上のようなハードウェア構成を有する管理装置102、画像処理装置100及び仲介装置101における、上述したような通信シーケンスを実現するための機能やその機能を実現するための処理について説明する。以下の説明においても、主として画像処理装置100あるいは仲介装置101から管理装置102に対してのコマンド及びそのコマンドに対するコマンド応答について説明し、管理装置102側からのコマンドについては、説明を省略するか簡単にする。
Next, with reference to FIG. 11 to FIG. 34, functions and functions for realizing the communication sequence as described above in the
まず、図11に、仲介装置101の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図を示す。図11に示す各機能は、CPU52が所要の制御プログラムを実行して仲介装置101の各部の動作を制御することにより実現されるものである。
また、図11に示す機能のうち、HTTPサーバ機能部41及びHTTPクライアント機能部45の機能は、CPU52及びPHY57によって実現されるものである。コマンド分配機能部42,アクションハンドラ群43,コマンド転送ハンドラ44の機能は、CPU52によって実現されるものである。
First, FIG. 11 shows a functional block diagram showing a configuration of functions for performing processing related to commands and command responses among the functions of the
Among the functions shown in FIG. 11, the functions of the HTTP
これらの機能についてさらに詳述する。
まず、HTTPサーバ機能部41は、HTTPリクエストを受信するHTTPリクエスト受信機能部41aとHTTPレスポンスを送信するHTTPレスポンス送信機能部41bとを備える。
そして、HTTPリクエスト受信機能部41aは、画像処理装置100が送信してくるHTTPリクエストを受信し、これをコマンド分配機能部42に渡す機能を有する(A1,A2)。また、HTTPレスポンス送信機能部41bは、コマンド分配機能部42から渡されるメッセージ、すなわち画像機器コマンドに対する応答や受付通知等に係るSOAPレスポンスを、HTTPレスポンスに記載し、受信したHTTPリクエストに対する応答として画像処理装置100に送信する機能も有する(A5,A6)。
These functions will be described in further detail.
First, the HTTP
The HTTP request
また、コマンド分配機能部42は、HTTPリクエスト受信機能部41aが受信したHTTPリクエスト中のSOAPリクエストに記載されているコマンドの種類あるいは分類を解析する機能を有する。そして、その結果に応じて、自身で処理すべきコマンドであればSOAPリクエストをアクションハンドラ群43の適当なアクションハンドラ43aに渡し、自身で処理すべきコマンドでなければ、管理装置102に転送するため、SOAPリクエストをコマンド転送ハンドラ44に渡す機能も有する(A3)。
The command
さらに、アクションハンドラ43aが返してくるコマンド実行結果や、コマンド転送ハンドラ44が管理装置102に転送すべきコマンドを受け取った場合に返してくる受信通知(A4)から、コマンドに対する応答や受信通知に係るSOAPレスポンスを生成し、HTTPレスポンス送信機能部41bに渡してこれを画像処理装置100に送信させる機能も有する。また、アクションハンドラ43aが生成した仲介装置コマンドを、画像処理装置100や管理装置102に転送させるためにコマンド転送ハンドラ44に渡す機能も有する。
また、ここでは図示していないが、SOAPリクエスト以外のメッセージが記載されたHTTPリクエストについても、その内容を解釈し、適当な処理手段に要求を伝えたり、HTTPレスポンス送信機能部41bに応答を返させたりする機能も有する。
Further, the command execution result returned by the
Although not shown here, the content of an HTTP request containing a message other than a SOAP request is also interpreted, and the request is transmitted to an appropriate processing means, or a response is returned to the HTTP response
また、アクションハンドラ群43は、複数のアクションハンドラ43a及びコマンド転送ハンドラ44を有する。そして、各アクションハンドラ43aは、概ねコマンドの種類に対応して用意されており、画像処理装置100から受信したコマンドに応じた処理を実行してその結果を返す機能や、画像処理装置100や管理装置102に対するコマンドを生成し、そのコマンドに対する応答を受け取ってその応答に応じた処理を行う機能を有する。前者の機能を有するアクションハンドラ43aは、ウェブサービスの機能を提供するためのハンドラであると言うことができる。また、コマンドや応答の送受信は、コマンド分配機能部42を介して行うようにしており、ここでは管理装置102側からのコマンドの取扱いについては図示を省略しているが、アクションハンドラ群43には、管理装置102からのコマンドに応じて処理を実行してその結果を返すアクションハンドラも含まれる。
The
コマンド転送ハンドラ44は、アクションハンドラ群43に属するハンドラのうち、コマンドの転送に係る機能を担う特殊なハンドラである。そして、コマンド分配機能部42から管理装置102に転送すべき画像機器コマンドを受け取ると、コマンド分配機能部42に受付通知を返した上で(A4)、その画像機器コマンドに係るSOAPリクエストを生成し、HTTPクライアント機能部45のHTTPリクエスト送信機能部45aに渡して管理装置102に送信させる機能を有する(B1)。また、HTTPレスポンス受信機能部45bから受け取る、管理装置102からの受信通知や未完了通知、あるいはコマンドに対する応答等に応じて、管理装置102に転送したコマンドの状態を管理し、転送したコマンドに対する応答が得られるまで定期的に結果問い合わせに係るSOAPリクエストを生成し、HTTPリクエスト送信機能部45aに渡して管理装置102に送信させる機能も有する。
The
さらに、管理装置102から画像機器コマンドに対する応答を(HTTPレスポンス受信機能部45bを介して)受信した場合に(B4)、結果通知に係るSOAPリクエストを生成し、HTTPクライアント機能部45のHTTPリクエスト送信機能部45aに渡して画像処理装置100に送信させる機能も有する(C1)。このとき送信先となるのは、もちろん応答と対応する画像機器コマンドの送信元の画像処理装置100である。また、画像処理装置100からの結果通知の受信通知に応じて、コマンドの状態を管理する機能も有する(C4)。
Furthermore, when a response to the image device command is received from the management apparatus 102 (via the HTTP response
さらにまた、ここでは詳細な図示は省略しているが、アクションハンドラ群43のアクションハンドラ43aが生成したコマンドについても、画像機器コマンドに準じて取り扱う機能を有する。すなわち、管理装置102に対するコマンドであれば、画像機器コマンドの場合と同様に管理装置102に転送し、応答はコマンド分配機能部42を介してアクションハンドラ43aに返す。また、画像処理装置100に対するコマンドであれば、結果通知の場合と同様に画像処理装置100に転送し、転送時のHTTPリクエストに対応するHTTPレスポンスに記載された応答を、コマンド分配機能部42を介してアクションハンドラ43aに返す。
Furthermore, although detailed illustration is omitted here, the command generated by the
また、HTTPクライアント機能部45は、HTTPリクエストを送信するHTTPリクエスト送信機能部45aとHTTPレスポンスを受信するHTTPレスポンス受信機能部45bとを備える。
そして、HTTPリクエスト送信機能部45aは、コマンド転送ハンドラ44から渡されるメッセージ、すなわち管理装置102や画像処理装置100に転送すべき各種SOAPリクエストを、HTTPリクエストに記載して管理装置102や画像処理装置100に送信する機能を有する(B2,C2)。また、HTTPレスポンス受信機能部45bは、管理装置102や画像処理装置100が送信してくるHTTPレスポンスを受信し、これをコマンド転送ハンドラ44に渡す機能を有する(B3,B4,C3,C4)。
The HTTP
Then, the HTTP request
次に、図12に、画像処理装置100の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図を示す。図12に示す各機能は、CPU201が所要の制御プログラムを実行して画像処理装置100の各部の動作を制御することにより実現されるものである。
また、図12に示す機能のうち、HTTPサーバ機能部241及びHTTPクライアント機能部245の機能は、CPU201及びPHY206によって実現されるものである。コマンド分配機能部242及びアクションハンドラ群243の機能は、CPU201によって実現されるものである。
Next, FIG. 12 is a functional block diagram illustrating a configuration of functions for performing processing relating to commands and command responses among the functions of the
Also, among the functions shown in FIG. 12, the functions of the HTTP
これらの機能についてさらに詳述する。
まず、HTTPサーバ機能部241は、HTTPリクエストを受信するHTTPリクエスト受信機能部241aとHTTPレスポンスを送信するHTTPレスポンス送信機能部241bとを備える。
そして、HTTPリクエスト受信機能部241aは、仲介装置101が送信してくるHTTPリクエストを受信し、これをコマンド分配機能部242に渡す機能を有する(E1,E2)。また、HTTPレスポンス送信機能部241bは、アクションハンドラ群の各アクションハンドラ243aから渡されるメッセージ、すなわち仲介装置101から受信した結果通知に対する受信通知等に係るSOAPレスポンスを、HTTPレスポンスに記載し、受信したHTTPリクエストに対する応答として仲介装置101に送信する機能を有する(E5,F5)。
These functions will be described in further detail.
First, the HTTP
The HTTP request
また、コマンド分配機能部242は、HTTPリクエスト受信機能部241aが受信したHTTPリクエスト中のSOAPリクエストや、HTTPクライアント機能部245のHTTPレスポンス受信機能部が受信したHTTPレスポンス中のSOAPレスポンスに記載されているコマンドやコマンド応答の種類あるいは分類を解析する機能を有する。そして、その結果に応じてSOAPリクエストやSOAPレスポンスをアクションハンドラ群243の適当なアクションハンドラ243aに渡す機能も有する(E3)。また、仲介装置101の場合と異なり、画像処理装置100には受信したコマンドを他の装置に転送する機能は設けていないので、自身で処理できないコマンドを受信した場合にはエラー処理を行うようにしており、そのための機能も有する。
The command
また、アクションハンドラ群243は、複数のアクションハンドラ243aを有する。そして、各アクションハンドラ243aは、概ねコマンドの種類に対応して用意されており、仲介装置101から受信したコマンドに応じた処理を実行してその結果を返す機能や、仲介装置101や管理装置102に対するコマンドを生成し、そのコマンドに対する応答を受け取ってその応答に応じた処理を行う機能を有する。前者の機能を有するアクションハンドラ243aは、ウェブサービスの機能を提供するためのハンドラであると言うことができる。また、コマンドや応答の受信は、コマンド分配機能部242を介して行うようにしている。さらに、ここでは管理装置102からのコマンドの取扱いについては図示を省略しているが、アクションハンドラ群243には、管理装置102からのコマンドに応じて処理を実行してその結果を返すアクションハンドラも含まれる。また、各アクションハンドラ243aは、仲介装置101に送信すべきコマンドやコマンド応答に係るSOAPメッセージを生成し、HTTPリクエスト送信機能部245aやHTTPレスポンス送信機能部241bに渡してこれを仲介装置101に送信させる機能も有する。
The
また、HTTPクライアント機能部245は、HTTPリクエストを送信するHTTPリクエスト送信機能部245aとHTTPレスポンスを受信するHTTPレスポンス受信機能部245bとを備える。
そして、HTTPリクエスト送信機能部245aは、各アクションハンドラ243aから渡されるメッセージ、すなわち仲介装置101に送信すべき各種SOAPリクエストを、HTTPリクエストに記載して仲介装置101に送信する機能を有する(F2)。また、HTTPレスポンス受信機能部245bは、管理装置102や画像処理装置100が送信してくるHTTPレスポンスを受信し、これをコマンド分配機能部242に渡す機能を有する(F3,F4)。
In addition, the HTTP
Then, the HTTP request
次に、図13に、管理装置102の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図を示す。図13に示す各機能は、制御装置126中のCPUが所要の制御プログラムを実行して管理装置102の各部の動作を制御することにより実現されるものである。
また、図13に示す機能のうち、HTTPサーバ機能部141の機能は、制御装置126内のCPU及び外部接続I/F123によって実現されるものである。コマンド分配機能部142及びアクションハンドラ群143の機能は、制御装置126内のCPUによって実現されるものである。コマンド実行結果記憶機能部146の機能は、制御装置126内のメモリによって実現されるものである。
Next, FIG. 13 is a functional block diagram illustrating a configuration of functions for performing processing related to commands and command responses among the functions of the
In addition, among the functions shown in FIG. 13, the function of the HTTP
これらの機能についてさらに詳述する。
まず、HTTPサーバ機能部141は、HTTPリクエストを受信するHTTPリクエスト受信機能部141aとHTTPレスポンスを送信するHTTPレスポンス送信機能部141bとを備える。
そして、HTTPリクエスト受信機能部141aは、仲介装置101が送信してくるHTTPリクエストを受信し、これをコマンド分配機能部142に渡す機能を有する(G1,G2)。また、HTTPレスポンス送信機能部141bは、コマンド分配機能部142から渡されるメッセージ、すなわち画像機器コマンドや仲介装置コマンドに対する受付通知や応答等に係るSOAPレスポンスを、HTTPレスポンスに記載し、受信したHTTPリクエストに対する応答として仲介装置101に送信する機能を有する(G5,G6)。
These functions will be described in further detail.
First, the HTTP
The HTTP request
また、コマンド分配機能部142は、HTTPリクエスト受信機能部141aが受信したHTTPリクエスト中のSOAPリクエストに記載されているコマンドの種類あるいは分類を解析する機能を有する。そして、その結果に応じてSOAPリクエストをアクションハンドラ群143の適当なアクションハンドラ143a又は結果問い合わせハンドラ144に渡す機能も有する(G3,H1)。また、画像処理装置100の場合と同様に自身で処理できないコマンドを受信した場合にはエラー処理を行う機能も有する。
The command
また、アクションハンドラ群143は、複数のアクションハンドラ143a及び結果問い合わせハンドラを有する。そして、各アクションハンドラ143aは、概ねコマンドの種類に対応して用意されており、仲介装置101から受信したコマンド(画像機器コマンドの場合も仲介装置コマンドの場合もある)に応じた処理を実行し、その結果をコマンド実行結果記憶機能部146に記憶させる機能を有する。また一方で、コマンドに対する受付通知に係るSOAPメッセージを生成し、これをコマンド分配機能部142に渡して仲介装置101に送信させる機能も有する。コマンドと応答の対応関係に注目すると、この受付通知がコマンドに対する直接の応答となり、アクションハンドラ243aは、応答として受付通知を返すウェブサービスの機能を提供するためのハンドラであると言うことができる。
The
また、コマンドや応答の受信は、コマンド分配機能部142を介して行うようにしている。そして、ここでは管理装置102が生成するコマンドの取扱いについては図示を省略しているが、アクションハンドラ群143には、仲介装置101や画像処理装置100に対するコマンドを生成し、またそのコマンドに対する応答に応じた処理を行う機能を有するアクションハンドラも含まれる。
The command and response are received through the command
結果問い合わせハンドラ144は、アクションハンドラ群143中の特殊なハンドラであり、仲介装置101からの結果問い合わせコマンドを受け取った場合に、コマンド実行結果記憶機能部146を検索する機能を有する(H2)。そして、仲介装置101に返すべき動作結果が記憶されていれば、これを取得してその動作結果を通知するSOAPレスポンスを生成し、コマンド分配機能部142に渡して仲介装置101に送信させる機能も有する(H3)。また、仲介装置101に返すべき動作結果がなかった場合に、その旨を通知するSOAPレスポンスを生成して同様に仲介装置101に返させる機能も有する。
このような結果問い合わせハンドラ144は、管理装置102が受け付けるコマンドに対応させて各コマンド毎に設けてもよいが、いくつかのコマンドをまとめたコマンド群毎に設けたり、1つだけ設けて全てのコマンドに対応した処理を行わせるようにしたりしてもよい。
The
Such a
また、コマンド実行結果記憶機能部146は、アクションハンドラ群143の結果問い合わせハンドラ144以外の各アクションハンドラ143aによるコマンドの実行結果を記憶する機能を有する。そして、この実行結果の記憶は、結果問い合わせハンドラ144による検索が可能な形式で行うようにしている。
以上のような各機能を仲介装置101,画像処理装置100,管理装置102に設けることにより、仲介装置101に、複数の画像処理装置100からの動作要求を受信して管理装置102に転送する転送手順と、管理装置102にアクセスした際、管理装置102において、それまでに転送したいずれかのコマンドに対する応答が送信可能な状態になっていた場合に、その応答を受信する受信手順と、その手順で応答を受信した場合に、その応答を、その応答と対応するコマンドの送信元に転送する第2の転送手順とを実行させることが可能になる。
Further, the command execution result
By providing each function as described above in the
次に、図14に、このような機能を有する仲介装置101が管理装置102や画像処理装置100に送信するHTTPリクエストの例を示す。仲介装置101が画像処理装置100から受信するHTTPリクエストも、基本的には同様な構成である。
このHTTPリクエストは、ボディ部としてSOAPリクエストを記載したものであり、ヘッダ部の「SOAPAction」ヘッダにより、このことを示している。また、「SOAPAction」ヘッダは、SOAPリクエストの内容を示すものであり、この例では、「http://www.…」というURI(Uniform Resource Identifier)によりリクエストの内容を示している。さらに、これ以外にHTTPの仕様で既定されている標準ヘッダを付加してもよい。
Next, FIG. 14 illustrates an example of an HTTP request transmitted from the
This HTTP request describes a SOAP request as a body part, and this is indicated by the “SOAPAction” header in the header part. 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. In addition to this, a standard header defined in the HTTP specification may be added.
また、図15に、仲介装置101が管理装置102や画像処理装置100から受信するHTTPレスポンスの例を示す。仲介装置101が画像処理装置100に送信するHTTPレスポンスも、基本的には同様な構成である。
このHTTPレスポンスは、ボディ部としてSOAPレスポンスを記載したものである。ただし、こちらには「SOAPAction」ヘッダに相当するヘッダは記載していない。SOAPリクエストを記載して送信したHTTPリクエストに対応するHTTPレスポンスには必ずSOAPレスポンスを記載するようにプロトコルを設計しておけば、特にヘッダに明示しなくても、HTTPレスポンスにSOAPレスポンスが記載されているか否かを容易に認識できるからである。また、HTTPレスポンスについても、図示したもの以外にHTTPの仕様で既定されている標準ヘッダを付加してもよい。
FIG. 15 shows an example of an HTTP response that the
This HTTP response describes a SOAP response as a body part. However, the header corresponding to the “SOAPAction” header is not described here. If the protocol is designed so that the SOAP response is always described in the HTTP response corresponding to the HTTP request transmitted by describing the SOAP request, the SOAP response is described in the HTTP response even if it is not clearly indicated in the header. This is because it can be easily recognized whether or not it is. Also, for the HTTP response, a standard header defined in the HTTP specification may be added in addition to the illustrated one.
仲介装置101、画像処理装置100及び管理装置102は、このような形式でSOAPリクエストを通信相手に送信して所定のメソッドに関する動作を要求し、通信相手がその動作の結果として返してくるSOAPレスポンスを受け取ってその結果に応じた処理を行うようにしている。
そして、以上説明したような各機能を効率よく実現するためには、各装置において用意するメソッドを、一定の規約に従って作成するようにするとよい。次に、この点について説明する。
The
In order to efficiently realize each function as described above, it is preferable to create a method prepared in each device according to a certain rule. Next, this point will be described.
まず、具体例として、画像処理装置100から管理装置102に対して用紙の注文を行えるようにするためのコマンドについて考える。この場合、コマンドの名称を「用紙注文」とし、引数(入力パラメータ)として「商品名」と「数量」を渡すとすると、各装置において例えば表1に示すような仕様のメソッドを用意するとよい。この表において、下線は、異なる種類(名称)のメソッドについても共通にしておくとよい部分を示す。
First, as a specific example, consider a command for allowing the
画像処理装置100から管理装置102にコマンドを送信する際には、まず仲介装置101にそのコマンドを送信する構成となっているので、まず、仲介装置101に、「用紙注文」のメソッドを用意する必要がある。この場合、フォーマットとしては入力パラメータとして「商品名」と「数量」を受け取ることができるようにする必要があるが、仲介装置101は入力パラメータの内容等を解析する必要はなく、応答として受付通知に相当するメッセージを返せばよい。ただし、受付番号等により、どの画像処理装置からどのようなコマンドを受信したか、また管理装置102からの応答受信や画像処理装置100への結果通知の有無等を管理しておく必要がある。
When transmitting a command from the
そして、コマンドが到達すべき管理装置102においても、「用紙注文」のメソッドを用意し、「商品名」と「数量」を入力パラメータとして受けとって、「結果」を出力パラメータ(応答)として返すようにするとよいことはもちろんである。なお、仲介装置101において、コマンドを管理装置102に転送する際にメソッドの名称や入力パラメータの構成を作り変えれば、仲介装置101が受け取るコマンドと管理装置102が受け取るコマンドで呼び出すメソッドの名称や入力パラメータが一致している必要はないのであるが、仲介装置101がコマンドをそのまま転送するようにした方が構成が単純で処理負荷も小さいので、ここではそのようにしている。
The
また、仲介装置101から管理装置102へ結果問い合わせを行うので、管理装置102には、この結果問い合わせに対応するためのメソッド(結果問い合わせハンドラ144に該当)を用意しておくようにしている。そして、このメソッドの名称を、例えばコマンドの名称+「結果問い合わせ」としておけば、管理装置102に転送したコマンドから結果問い合わせのコマンドを容易に生成することができる。また、結果問い合わせメソッドの出力パラメータとしては、「結果」の他、これがどのコマンドに対する結果かを示すため、コマンドの受付時に送信した「受付番号」等の識別情報も返すようにするとよい。「料金」については、用紙注文コマンドに特有の出力パラメータである。
Further, since a result inquiry is made from the
また、仲介装置101から画像処理装置100に結果通知を行うので、画像処理装置100には、この結果通知に対応するためのメソッドを用意しておくようにしている。そして、このメソッドの名称を、例えばコマンドの名称+「結果通知」としておけば、画像処理装置100から受信したコマンドから結果通知のコマンドを容易に生成することができる。また、結果通知メソッドの入力パラメータとしては、「結果」の他、管理装置102から受け取った「料金」も送信するようにしている。
In addition, since the result notification is performed from the
以上の各メソッドにおいて、「結果」の記載形式が表1に示したものに限られないことはもちろんであるが、表1に示したものと同じような内容を記載することが好ましい。また、名前空間については、自由に設定してよいが、1つのコマンド(ここでは「用紙注文」)から派生した他のコマンド(ここでは「用紙注文結果問い合わせ」や「用紙注文結果通知」)については、ある程度共通な名前空間とすることが好ましい。
そして、1つのコマンドを作成しようとする場合、各装置にそのコマンドに関連する処理を行う以上のような各メソッドを用意するようにすれば、相互の関連が認識しやすく、また各装置におけるコマンドの管理が容易な構成とすることができる。
In each of the above methods, the description format of “result” is not limited to that shown in Table 1, but it is preferable to describe the same contents as those shown in Table 1. Although the name space may be set freely, other commands derived from one command (here “paper order”) (here “paper order result inquiry” and “paper order result notification”) Are preferably shared namespaces to some extent.
And if you want to create one command, if you prepare each method as described above to perform processing related to that command in each device, it is easy to recognize the mutual relationship, and the command in each device It is possible to make the configuration easy to manage.
また、以上のような各メソッドが従うべき規約を示すと、表2のようになる。この表中において、下線部は、コマンドの種類に応じて定めるべき部分を示し、それ以外は、コマンドの種類によらず共通とすることが好ましい部分を示す。そして、「要求名」は表1に示した例では「用紙注文」に該当し、「要求のパラメータ」は「商品名」と「数量」に、「要求の結果」は「料金」に該当する。 Table 2 shows the conventions to be followed by each method as described above. In this table, the underlined portion indicates a portion that should be determined according to the type of command, and the other portions indicate portions that are preferably common regardless of the type of command. In the example shown in Table 1, “request name” corresponds to “paper order”, “request parameter” corresponds to “product name” and “quantity”, and “request result” corresponds to “charge”. .
次に、画像処理装置100が、画像機器コマンドとして表1を用いて説明した用紙注文コマンドを管理装置102に対して発した場合に各装置が送受信するSOAPメッセージの具体例を図16乃至図28に示す。
図16に示すのは、画像処理装置100から仲介装置101に送信する用紙注文コマンドに係るSOAPリクエストの例である。
Next, specific examples of SOAP messages transmitted and received by each device when the
FIG. 16 shows an example of a SOAP request related to a paper order command transmitted from the
この例においては、ルートタグである「Envelope」タグの属性として、名前空間の宣言を行っており、ここでは、SOAPで標準として定義されている名前空間の他に、「http://www.example.com/header」及び「http://www.example.com/sales/server」のURIで特定される名前空間の宣言を行っている。従って、「n」の名前空間接頭辞が付されたXMLタグについては「http://www.example.com/header」のURIで特定される名前空間に属するタグであることがわかり、「ns」の名前空間接頭辞が付されたXMLタグについては「http://www.example.com/sales/server」のURIで特定される名前空間に属するタグであることがわかる。 In this example, a namespace is declared as an attribute of an “Envelope” tag that is a root tag. Here, in addition to the namespace defined as a standard in SOAP, “http: // www. The namespaces specified by the URIs “example.com/header” and “http://www.example.com/sales/server” are 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.example.com/header”. It can be seen that the XML tag with the namespace prefix “” belongs to the namespace specified by the URI “http://www.example.com/sales/server”.
またSOAPヘッダには、「コマンドID」のXMLタグの内容として、この用紙注文コマンドのIDである「DB12345」が記載されている。このIDは、コマンドの発行者である画像処理装置100が付したものである。
さらに、「送信元」タグの内容として、このコマンドの送信元を示す情報である「仲介装置ID」及び「画像処理装置ID」の情報が記載されている。このうち、「画像処理装置ID」は、この画像機器コマンドを生成した画像処理装置のIDであり、「仲介装置ID」は、この画像機器コマンドが仲介装置101に転送されてくるまでに経由した仲介装置のIDである。「仲介装置ID」が複数記載される場合もあるが、画像処理装置100から直接転送されてきた場合には、「仲介装置ID」タグの内容は空である。
In the SOAP header, “DB12345” that is the ID of this paper order command is described as the contents of the XML tag of “command ID”. This ID is assigned by the
Furthermore, information of “mediation device ID” and “image processing device ID”, which is information indicating the transmission source of this command, is described as the content of the “transmission source” tag. Among these, the “image processing apparatus ID” is the ID of the image processing apparatus that generated the image device command, and the “mediation device ID” has passed through until the image device command is transferred to the
なお、この遠隔管理システムにおいては、コマンドの宛先は特に明示せず、SOAPリクエストを受信した装置が自ら処理できるコマンドであれば処理し、そうでなければ他の装置に転送したりエラー処理を行ったりするようにしている。従って、ここでは宛先は特に記載していないが、記載するようにしてもよい。
また、SOAPボディには、送信先の装置に実行させるメソッドを指定する情報として、「用紙注文」タグが記載され、その下位のタグ「商品名」や「数量」の要素として、メソッドに引数として引き渡すパラメータが記載されている。ここでは注文内容が記載されている。
In this remote management system, the destination of the command is not specified. If the command that can be processed by the device that received the SOAP request is processed, the command is processed. Otherwise, the command is transferred to another device or error processing is performed. I try to do it. Accordingly, the destination is not specifically described here, but may be described.
Also, in the SOAP body, a “paper order” tag is described as information for specifying a method to be executed by the transmission destination device, and the tag “product name” and “quantity” subordinate elements thereof are used as arguments to the method. The parameters to be delivered are described. Here, the order details are listed.
図17に示すのは、仲介装置101から画像処理装置100に送信する、用紙注文コマンドの受付通知に係るSOAPレスポンスの例である。
この例においても、名前空間の宣言は図16に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、対応する用紙注文コマンドのIDである「DB12345」が記述されている。
FIG. 17 shows an example of a SOAP response related to a paper order command reception notification transmitted from the
Also in this example, the namespace declaration is the same as in the example shown in FIG. In the SOAP header, “DB12345” that is the ID of the corresponding paper order command is described as the content of the XML tag of “command ID”.
さらに、「宛先」タグの内容として、「仲介装置リスト」タグや「画像処理装置リスト」タグの下位に、このコマンド応答の宛先を示す情報である「仲介装置ID」及び「画像処理装置ID」の情報を記載している。このうち、「画像処理装置ID」は、このコマンド応答の最終的な送信先となる画像処理装置のIDであり、「仲介装置ID」は、このコマンド応答が画像処理装置に転送される際に経由する仲介装置のIDである。「仲介装置ID」については、ここでは記載すべき情報がないことから記載していない。また、「仲介装置リスト」タグや「画像処理装置リスト」タグを設けず、図16の場合と同様に「宛先」タグの下位に直接「画像処理装置ID」や「仲介装置ID」のタグを設けるようにしてもよい。 Further, as the contents of the “destination” tag, “mediation device ID” and “image processing device ID”, which are information indicating the destination of this command response, are subordinate to the “mediation device list” tag and “image processing device list” tag. The information of is described. Among these, the “image processing apparatus ID” is an ID of the image processing apparatus that is the final transmission destination of the command response, and the “mediation apparatus ID” is used when the command response is transferred to the image processing apparatus. This is the ID of the intermediary device that passes through. “Intermediary device ID” is not described because there is no information to be described here. Also, the “mediating device list” tag and the “image processing device list” tag are not provided, and the tag “image processing device ID” or “mediation device ID” is directly placed below the “destination” tag as in the case of FIG. You may make it provide.
なお、この遠隔管理システムにおいては、コマンドの送信元の装置がコマンドに対する応答を受け取ることができれば、コマンドがどのような経路で転送されてどの装置において処理されたかを認識する必要はないので、ここでは送信元は特に記載していないが、記載するようにしてもよい。
SOAPボディには、用紙注文コマンドに対する応答であることを示すための「用紙注文Response」タグが設けられ、その下位のタグに、応答の内容が記載される。ここでは、用紙注文コマンドを正常に受け付けた旨の情報として「受付完了」が記載されている。
In this remote management system, if the device that sent the command can receive a response to the command, there is no need to recognize what route the command was transferred to and processed by which device. However, the transmission source is not particularly described, but may be described.
The SOAP body is provided with a “paper order Response” tag for indicating that it is a response to a paper order command, and the content of the response is described in a lower tag. Here, “acceptance complete” is described as information indicating that the paper order command has been normally accepted.
図18に示すのは、仲介装置101から管理装置102に送信(転送)する、用紙注文コマンドに係るSOAPリクエストの例である。
この例においても、図16の場合と同様に、「Envelope」タグの属性として、名前空間の宣言を行っている。
SOAPヘッダには、「コマンドID」として、この用紙注文コマンドのIDが記載されているが、このコマンドは、仲介装置101が生成したものであるので、このIDは、仲介装置101が付したものである。また、「送信元」タグの内容として、このコマンドの送信元を示す情報である「仲介装置ID」及び「画像処理装置ID」の情報を記載している。ここでは、このコマンドは画像処理装置100が生成して仲介装置101が転送するものであるから、これら双方の装置のIDを記載している。また、SOAPボディには、図16の場合と同様な情報が記載されている。
FIG. 18 shows an example of a SOAP request related to a paper order command transmitted (transferred) from the
Also in this example, as in the case of FIG. 16, the namespace is declared as the attribute of the “Envelope” tag.
In the SOAP header, the ID of this paper order command is described as “command ID”. Since this command is generated by the
図19に示すのは、管理装置102から仲介装置101に送信する、用紙注文コマンドの受付通知に係るSOAPレスポンスの例である。
この例においても、名前空間の宣言は図16に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、対応する用紙注文コマンドのIDを記載している。このIDは、直接の返信先となる仲介装置101が付したIDである。
また、「宛先」タグの内容として、このコマンド応答の宛先を示す情報である「仲介装置ID」及び「画像処理装置ID」の情報を記載している。
FIG. 19 shows an example of a SOAP response related to a paper order command acceptance notification transmitted from the
Also in this example, the namespace declaration is the same as in the example shown in FIG. In the SOAP header, the ID of the corresponding paper order command is described as the content of the XML tag of “command ID”. This ID is an ID assigned by the
Further, as the contents of the “destination” tag, information on “mediation apparatus ID” and “image processing apparatus ID”, which is information indicating the destination of this command response, is described.
SOAPボディには、用紙注文コマンドに対する応答であることを示すための「用紙注文Response」タグが設けられ、その下位のタグに、応答の内容が記載される。ここでは、用紙注文コマンドを正常に受け付けた旨の情報として、管理装置102が付した受付番号を記載している。
これを受け取った仲介装置101は、コマンドIDと受付番号とを対応させて管理しておき、後で受付番号と共に処理結果を取得した場合に、それがどのコマンドに対する処理結果かを把握できるようにしておく。
The SOAP body is provided with a “paper order Response” tag for indicating that it is a response to a paper order command, and the content of the response is described in a lower tag. Here, the reception number given by the
Upon receiving this, the
図20には、用紙注文コマンドの受付通知に係る、図19とは異なるSOAPレスポンスの例を示す。
この例は、管理装置102において用紙注文コマンドを正常に受け付けられなかった場合の例であり、ここでは、「結果」タグの内容として、指定した商品名の商品が存在しなかったことを示す「商品名エラー」を記載してる。
「Envelope」タグの属性や、SOAPヘッダの内容は、図19の場合と同様である。
FIG. 20 shows an example of a SOAP response different from FIG. 19 relating to the notification of acceptance of the paper order command.
This example is an example when the paper order command is not normally received in the
The attributes of the “Envelope” tag and the contents of the SOAP header are the same as in FIG.
図21に示すのは、仲介装置101から管理装置102に送信する、用紙注文結果問い合わせコマンドに係るSOAPリクエストの例である。
この例においても、図16の場合と同様に、「Envelope」タグの属性として、名前空間の宣言を行っている。
SOAPヘッダには、「コマンドID」として、この用紙注文結果問い合わせコマンドのIDが記載されている。このコマンドは、仲介装置101が生成するものであるから、このIDも、仲介装置101が付したものである。
FIG. 21 shows an example of a SOAP request related to a paper order result inquiry command transmitted from the
Also in this example, as in the case of FIG. 16, the namespace is declared as the attribute of the “Envelope” tag.
In the SOAP header, the ID of this paper order result inquiry command is described as “command ID”. Since this command is generated by the
また、「送信元」タグの内容として、このコマンドの送信元を示す情報である「仲介装置ID」の情報を記載している。このコマンドは画像処理装置100からのコマンドを転送するものではないので、「画像処理装置ID」の情報は記載しない。
また、SOAPボディには、このSOAPリクエストが用紙注文結果問い合わせコマンドに係るものであることを示すため、同名のタグを設けているが、引数は必要ないので、その内容は空である。
Further, as the content of the “transmission source” tag, information of “mediation device ID” which is information indicating the transmission source of this command is described. Since this command does not transfer a command from the
The SOAP body is provided with a tag of the same name to indicate that this SOAP request is related to the paper order result inquiry command, but no argument is required, so the content is empty.
図22に示すのは、管理装置102から仲介装置101に送信する、用紙注文結果問い合わせコマンドに対する応答に係るSOAPレスポンスの例である。
この例においても、名前空間の宣言は図16に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、対応する用紙注文結果問い合わせコマンドのIDを記載している。このIDは、仲介装置101が付したIDである。
また、「宛先」タグの内容として、このコマンド応答の宛先を示す情報である「仲介装置ID」の情報を記載している。他のSOAPレスポンスと書式を共通化するため、「画像処理装置リスト」タグも設けているが、ここに記載すべき情報はないので、このタグは設けなくてもよい。
FIG. 22 shows an example of a SOAP response related to a response to the paper order result inquiry command transmitted from the
Also in this example, the namespace declaration is the same as in the example shown in FIG. In the SOAP header, the ID of the corresponding paper order result inquiry command is described as the content of the XML tag of “command ID”. This ID is an ID assigned by the
Further, as the contents of the “destination” tag, information of “mediation apparatus ID” which is information indicating the destination of this command response is described. In order to share the format with other SOAP responses, an “image processing apparatus list” tag is also provided. However, since there is no information to be described here, this tag may not be provided.
SOAPボディには、用紙注文結果問い合わせコマンドに対する応答であることを示すための「用紙注文Response」タグを設け、その下位のタグに、応答の内容を記載している。ここでは、処理が完了した用紙注文結果問い合わせコマンドがない旨の情報として、「処理中」を記載している。 The SOAP body is provided with a “paper order Response” tag for indicating that it is a response to the paper order result inquiry command, and the content of the response is described in a lower tag. Here, “processing” is described as information indicating that there is no paper order result inquiry command that has been processed.
図23には、用紙注文結果問い合わせコマンドに対する応答に係る、図22とは異なるSOAPレスポンスの例を示す。
この例は、管理装置102において、正常に処理が完了した用紙注文コマンドがあった場合の例であり、ここでは、「結果」タグの内容として、処理が完了したコマンドの受付番号及び、用紙注文コマンドの出力パラメータである料金を記載している。
「Envelope」タグの属性やSOAPヘッダの内容は、図19の場合と同様である。ただし、管理装置102側で受付番号と対応するコマンドの送信元の情報を把握できるのであれば、仲介装置101だけでなく、その送信元までの転送経路の情報を「宛先」タグに記載するようにしてもよい。
FIG. 23 shows an example of a SOAP response different from FIG. 22 relating to the response to the paper order result inquiry command.
This example is an example in the case where there is a paper order command that has been successfully processed in the
The attributes of the “Envelope” tag and the contents of the SOAP header are the same as in FIG. However, if the information on the transmission source of the command corresponding to the reception number can be grasped on the
図24には、用紙注文結果問い合わせコマンドに対する応答に係る、さらに別のSOAPレスポンスの例を示す。
この例は、管理装置102において、処理が完了したものの結果がエラーである用紙注文コマンドがあった場合の例であり、ここでは、「結果」タグの内容として、処理が完了したコマンドの受付番号及び、注文に係る用紙の在庫がなく、注文を受け付けられなかった旨を示す「在庫なし」を記載している。
「Envelope」タグの属性やSOAPヘッダの内容は、図23の場合と同様である。
FIG. 24 shows another example of the SOAP response related to the response to the paper order result inquiry command.
This example is an example in the case where there is a paper order command whose processing is completed but the result is an error in the
The attributes of the “Envelope” tag and the contents of the SOAP header are the same as in FIG.
図25に示すのは、仲介装置101から画像処理装置100に送信する、用紙注文結果通知コマンドに係るSOAPリクエストの例である。
この例においても、「Envelope」タグの属性として名前空間の宣言を行っているが、「nc」の名前空間接頭辞について「http://www.example.com/sales/client」のURIで特定される名前空間の宣言を行っている点が、図16等の場合と異なる。
また、SOAPヘッダには、「コマンドID」として、この用紙注文結果通知コマンドのIDが記載されている。このコマンドは、仲介装置101が生成するものであるから、このIDも、仲介装置101が付したものである。
FIG. 25 shows an example of a SOAP request related to a paper order result notification command transmitted from the
In this example, the namespace is declared as an attribute of the “Envelope” tag, but the namespace prefix of “nc” is specified by the URI of “http://www.example.com/sales/client” This is different from the case of FIG. 16 or the like.
In the SOAP header, the ID of this paper order result notification command is described as “command ID”. Since this command is generated by the
また、「宛先」タグの内容として、このコマンドの宛先を示す情報である「画像処理装置ID」の情報を記載している。ここでは、結果通知は直接画像処理装置100に送信するので、「仲介装置ID」の情報は記載していないが、他の被管理仲介装置110をかいして画像処理装置100に送信するのであれば、送信を仲介させる「仲介装置ID」の情報も記載する。これらの情報は、初めに用紙注文コマンドを受信した際に、コマンドIDと対応して送信元の情報を記憶しておき、その情報を参照して記載するようにすることができる。
また、SOAPボディには、このSOAPリクエストが用紙注文結果通知コマンドに係るものであることを示すため、同名のタグを設け、その下位に、コマンドの実行結果を示す情報を記載している。その内容は、用紙注文結果問い合わせコマンドに対する応答として受け取った実行結果から、「受付番号」を除いたものとするとよい。図25には、処理が正常に完了し、用紙の料金が1000円である場合の例を示している。
Further, as the contents of the “destination” tag, information on “image processing apparatus ID” which is information indicating the destination of this command is described. Here, since the result notification is directly transmitted to the
Further, in order to indicate that this SOAP request relates to the paper order result notification command, the SOAP body is provided with a tag of the same name, and information indicating the execution result of the command is described below the tag. The content may be obtained by excluding the “reception number” from the execution result received as a response to the paper order result inquiry command. FIG. 25 shows an example in which the processing is completed normally and the sheet fee is 1000 yen.
なお、画像処理装置100が、コマンドの送信後、そのコマンドに対する応答を受信するまでは次のコマンドを送信しないようにする場合には、特にID等によって管理しなくても、画像処理装置100が送信したコマンドとそのコマンドに対する結果通知とを容易に対応付けることができる。
しかし、応答を受信する前に次のコマンドを送信できるような構成とすることも可能であり、この場合には、仲介装置101側で、結果通知コマンドの「コマンドID」として、対応する画像機器コマンドに画像処理装置100が付していたIDを使用するようにする等して、画像処理装置100が画像機器コマンドと結果通知との対応関係を認識できるようにすればよい。
When the
However, it is also possible to configure so that the next command can be transmitted before receiving the response. In this case, the corresponding image device is set as the “command ID” of the result notification command on the
図26には、用紙注文結果通知コマンドに係るSOAPリクエストの図25とは別の例を示す。
この例は、管理装置102において、用紙注文コマンドが正常に受け付けられなかった場合の例であり、ここでは、「結果」タグの内容として、用紙注文コマンドに対する応答に記載されていた「商品名エラー」を記載してる。
「Envelope」タグの属性やSOAPヘッダの内容は、図25の場合と同様である。
FIG. 26 shows another example of the SOAP request related to the paper order result notification command, which is different from FIG.
This example is an example when the paper order command is not normally received in the
The attributes of the “Envelope” tag and the contents of the SOAP header are the same as in FIG.
図27には、用紙注文結果通知コマンドに係るSOAPリクエストのさらに別の例を示す。
この例は、管理装置102において、用紙注文コマンドの処理は完了したものの結果がエラーであった場合の例であり、ここでは、「結果」タグの内容として、図24に示したような用紙注文結果問い合わせコマンドの実行結果から「受付番号」を除いた、「在庫なし」を記載している。
FIG. 27 shows still another example of the SOAP request related to the paper order result notification command.
In this example, the processing of the paper order command is completed in the
図28には、用紙注文結果通知コマンドに対する応答に係るSOAPレスポンスの例を示す。
この例においても、名前空間の宣言は図25に示した例と同様である。そして、SOAPヘッダには、「コマンドID」のXMLタグの内容として、応答を生成した用紙注文結果通知コマンドのIDを記載している。このIDは、直接の返信先となる仲介装置101が付したIDである。
また、「宛先」タグの内容として、このコマンド応答の宛先を示す情報である「仲介装置ID」及び「画像処理装置ID」の情報を記載している。
FIG. 28 shows an example of a SOAP response related to a response to the paper order result notification command.
Also in this example, the namespace declaration is the same as the example shown in FIG. In the SOAP header, the ID of the paper order result notification command that generated the response is described as the content of the XML tag of “command ID”. This ID is an ID assigned by the
Further, as the contents of the “destination” tag, information on “mediation apparatus ID” and “image processing apparatus ID”, which is information indicating the destination of this command response, is described.
SOAPボディには、用紙注文結果通知コマンドに対する応答であることを示すための「用紙注文結果通知Response」タグが設けられ、その下位のタグに、応答の内容を記載している。ここでは、用紙注文結果通知コマンドにより用紙注文コマンドの実行結果を正常に受信した旨の情報として、「結果受信完了」を記載している。 The SOAP body is provided with a “paper order result notification response” tag for indicating that it is a response to the paper order result notification command, and the content of the response is described in a lower tag. Here, “result reception completion” is described as information indicating that the execution result of the paper order command has been normally received by the paper order result notification command.
次に、図29に、仲介装置101において以上説明してきたような画像機器コマンドの転送に係る機能を実現するために行う処理のうち、HTTPサーバ機能部41に通信要求があった場合に実行する処理のフローチャートを示す。
この処理は、仲介装置101をHTTPサーバとして機能させるためのHTTPサーバスレッドの処理であり、CPU52が図11に示した各部として機能して実行するものである。そして、CPU52は、HTTPサーバ機能部41に通信要求があった場合にこのスレッドを作成し、図29のフローチャートに示す処理を開始する。
Next, in FIG. 29, among the processes performed to realize the function related to the transfer of the image device command as described above in the mediating
This process is an HTTP server thread process for causing the
そして、まずステップS1で、CPU52はHTTPリクエスト受信機能部41aとしての機能により、画像処理装置100から画像機器コマンドに係るSOAPリクエスト(例えば図16に示したもの)を記載したHTTPリクエストを受信する。
次のステップS2では、SOAPリクエスト中に記載されているコマンドに係る名前空間URI及びメソッド名を抽出し、ステップS3でこれらをもとにハンドラテーブルを参照し、そのコマンドを実行させるハンドラを検索する。
なお、コマンドに係る名前空間URIとメソッド名は、SOAPボディを示す「Body」要素の子要素の属する名前空間と要素のローカル名であり、「Body」要素の子要素のタグに記載されている。例えば図16に示したSOAPリクエストの例では、図30に示す通り「ns:用紙注文」である。そして、符号aで示す名前空間接頭辞から、「Envelope」タグの属性における名前空間URIの定義を参照すると、コマンドに係る名前空間URIは「http://www.example.com/sales/server」であることがわかる。また、「:」の後側の符号bで示した部分は、そのままメソッド名である。
First, in step S1, the
In the next step S2, the name space URI and the method name related to the command described in the SOAP request are extracted, and in step S3, the handler table is referenced based on these to search for a handler that executes the command. .
The namespace URI and the method name related to the command are the namespace and the local name of the element to which the child element of the “Body” element indicating the SOAP body belongs, and are described in the child element tag of the “Body” element. . For example, in the example of the SOAP request shown in FIG. 16, it is “ns: paper order” as shown in FIG. When the definition of the namespace URI in the attribute of the “Envelope” tag is referenced from the namespace prefix indicated by the symbol a, the namespace URI related to the command is “http://www.example.com/sales/server”. It can be seen that it is. Further, the part indicated by the symbol b after “:” is the method name as it is.
また、ハンドラテーブルは、ステップS2で抽出される名前空間URI及びメソッド名と、それらで規定されるコマンドに係る処理を実行させるための仲介装置101中のアクションハンドラとの対応関係を記載したテーブルであり、仲介装置101が不揮発メモリに保持している。
そして、具体例としては、図31に示すようなものとすることが考えられ、ここでは、仲介装置101自身の情報の取得を要求する「仲介装置情報取得」コマンドは仲介装置情報取得ハンドラに実行させるものであり、時刻合わせのために仲介装置101の設定時刻を取得を要求する「現在時刻取得」コマンドは現在時刻取得ハンドラに実行させることが記載されている。もちろん、他のコマンドについても同様に記載することができる。
The handler table is a table that describes the correspondence between the name space URI and method name extracted in step S2 and the action handler in the
As a specific example, it can be considered as shown in FIG. 31, and here, a “mediation device information acquisition” command for requesting acquisition of information of the
なお、このハンドラテーブルには、仲介装置101が自ら実行するコマンドのみが記載されており、ここに記載されていないコマンドは、他の装置に転送して実行させるため、コマンド転送ハンドラ44に取り扱わせるようにしている。ただし、転送するものも含めて受信し得るコマンドを全てハンドラテーブルに記載しておき、ハンドラテーブルに記載されていないコマンドを受信した場合にエラー処理を行うようにすることも考えられる。
Note that this handler table describes only commands that the
図29の説明に戻る。
ステップS3での検索が終了すると、処理はS4に進み、受信したコマンドに関する処理を行わせるべきアクションハンドラが発見されたか否か判断する。ここまでのステップS2乃至S4の処理は、コマンド分配機能部42としての機能による処理である。
そして、ステップS4でアクションハンドラが発見されていた場合には、ステップS5に進み、発見されたアクションハンドラにコマンドを渡してそのコマンドに係る処理を実行させ、その結果を受け取って、ステップS6でそのコマンドに対する応答のSOAPレスポンスを記載したHTTPレスポンスを画像処理装置100に送信して処理を終了する。これらのステップS5及びS6の処理は、通常のウェブサービスの提供に係る処理であり、コマンド分配機能部42及びHTTPレスポンス送信機能部41bとして機能によるものである。
Returning to the description of FIG.
When the search in step S3 is completed, the process proceeds to S4, and it is determined whether or not an action handler to be processed for the received command has been found. The processing of steps S2 to S4 so far is processing by the function as the command
If an action handler has been found in step S4, the process proceeds to step S5, a command is passed to the found action handler to execute processing related to the command, and the result is received. In step S6, the action handler is found. An HTTP response describing a SOAP response as a response to the command is transmitted to the
一方、ステップS4でアクションハンドラが発見されなかった場合には、コマンド転送ハンドラ44としての機能により、ステップS7乃至S9の処理を行う。すなわち、ステップS7で受信したSOAPリクエストを保存し、ステップS8でコマンドの受付通知に係るSOAPレスポンス(例えば図17に示したもの)を記載したHTTPレスポンスを画像処理装置100に送信する。そして、ステップS9で受信したコマンドを管理装置101に転送するための転送スレッドを起動して処理を終了する。
以上の処理により、仲介装置101は、画像処理装置100からのコマンドを受け付け、それが自身で処理するコマンドであれば処理を行って応答を返し、自身で処理しない(できない)コマンドであれば受付通知を返した上で管理装置101への転送を準備することができる。また、以上の処理において、ステップS8が受信通知手順の処理であり、この処理において、CPU52が受信通知手段として機能する。
On the other hand, if no action handler is found in step S4, the processing of steps S7 to S9 is performed by the function as the
Through the above processing, the
次に、図32に、仲介装置101が受信した画像機器コマンドを管理装置102へ転送する機能を実現するために実行する転送スレッドの処理のフローチャートを示す。この処理は、CPU52が図11に示した各部、主としてコマンド転送ハンドラ44として機能して実行するものである。そして、CPU52は、図29のステップS9において起動が指示された場合にこのスレッドを作成し、図32のフローチャートに示す処理を開始する。
この処理においては、まずステップS11で、画像機器コマンドに係る未送信のSOAPリクエストを読み出す。そして、ステップS12で、取得したSOAPリクエストに、仲介装置101がコマンドを管理するためのコマンドIDと、自身の仲介装置IDとを記載して転送用SOAPリクエスト(例えば図18に示したもの)を生成する。
Next, FIG. 32 shows a flowchart of processing of a transfer thread executed to realize a function of transferring an image device command received by the
In this process, first, in step S11, an untransmitted SOAP request related to the image device command is read. In step S12, a transfer SOAP request (for example, the one shown in FIG. 18) is described in the acquired SOAP request by describing the command ID for the
そしてその後、ステップS13で、HTTPリクエスト送信機能部45aとしての機能により、ステップS12で生成したSOAPリクエストを記載したHTTPリクエストを管理装置102に送信する。
そして、次のステップS14で、管理装置102からのHTTPレスポンスを待ち、これを受信すると、そこに記載されているSOAPレスポンスの内容を記憶する。このSOAPレスポンスは、管理装置102に転送したコマンドに対する受付通知のはずである。
Thereafter, in step S13, an HTTP request describing the SOAP request generated in step S12 is transmitted to the
In the next step S14, an HTTP response from the
そして、ステップS15でそのSOAPレスポンスが、コマンドを正常に受け付けた旨のもの(例えば図19に示したもの)であるか否か判断する。ここでは、管理装置102がコマンドを正常に受け付けた場合には、「結果」要素として受付IDを記載して返してくるため、例えば「結果」要素の値が数値であるか否かによってこの判断を行うことができる。このような判断手法を採れば、SOAPレスポンスの内容を詳細に解析しなくてもステップS15の判断を行うことができるので、処理を簡略化することができる。
そして、ステップS15でYESであれば、ステップS16以下に進み、図33に示すような結果問い合わせスレッドが存在しているか否か判断し、なければステップS17で結果問い合わせスレッドを起動して処理を終了する。あればそのまま処理を終了する。なお、コマンドによって異なる結果問い合わせスレッドを用いるようにしている場合には、ステップS13で送信したコマンドと対応する結果問い合わせスレッドが存在していなければ、対応する結果問い合わせスレッドを起動する。
In step S15, it is determined whether or not the SOAP response indicates that the command has been normally received (for example, one shown in FIG. 19). Here, when the
If “YES” in the step S15, the process proceeds to the step S16 and the subsequent steps, and it is determined whether or not a result inquiry thread as shown in FIG. 33 exists. If not, the result inquiry thread is activated in the step S17 and the process is ended. To do. If there is, the process is terminated. In the case where different result inquiry threads are used depending on commands, if there is no result inquiry thread corresponding to the command transmitted in step S13, the corresponding result inquiry thread is activated.
一方、ステップS15でNOであれば、ステップS18に進み、転送した画像機器コマンドが受付エラーとなった旨の結果通知に係るSOAPリクエスト(例えば図26に示したもの)を生成し、ステップS19で、HTTPリクエスト送信機能部45aとしての機能により、そのSOAPリクエストを記載したHTTPリクエストを、転送した画像機器コマンドの送信元の画像処理装置100に送信する。
On the other hand, if “NO” in the step S15, the process proceeds to a step S18 to generate a SOAP request (for example, one shown in FIG. 26) related to the result notification that the transferred image device command has become a reception error, and in a step S19. The HTTP request
そして、ステップS20で画像処理装置100からのHTTPレスポンスの受信を待ち、これを受信すると、そこに記載されているSOAPレスポンスの内容を記憶する。このSOAPレスポンスは、画像処理装置100に送信した結果通知に対する受信通知(例えば図28に示したもの)のはずである。そして、以上で処理を終了する。
ステップS20で処理を終了した場合には、管理装置102に転送した画像機器コマンドに係る処理は完結しているので、画像処理装置100からの受信通知に基づいてその点を把握できれば、転送した画像機器コマンドや結果通知等の情報は、その時点で破棄してしまってよい。もちろん、エラー情報を抽出して管理する等してもよい。
In step S20, the reception of an HTTP response from the
When the processing is completed in step S20, the processing related to the image device command transferred to the
以上の処理により、画像処理装置100から受信した画像機器コマンドを、管理装置102に転送することができる。また、HTTPサーバスレッドの処理とこの転送スレッドの処理が、転送手順の処理であり、この処理において、CPU52が転送手段として機能する。この転送の過程において、仲介装置101は、画像処理装置100から受信したコマンドに係るSOAPメッセージのSOAPボディをそのまま転送するのみであり、コマンド名以外の部分についてSOAPボディの内容を解析する必要はない。
Through the above processing, the image device command received from the
次に、図33に、仲介装置101が管理装置102へ転送したコマンドに実行結果を取得する機能を実現するために実行する結果問い合わせスレッドの処理のフローチャートを示す。この処理は、CPU52が図11に示した各部、主としてコマンド転送ハンドラ44として機能して実行するものである。そして、CPU52は、図32のステップS17において起動が指示された場合にこのスレッドを作成し、図33のフローチャートに示す処理を開始する。
この処理においては、まずステップS31で所定時間待機する。その後、ステップS32で結果問い合わせのSOAPリクエスト(例えば図21に示したもの)を生成し、HTTPリクエスト送信機能部45aとしての機能により、ステップS33でそのSOAPリクエストを記載したHTTPリクエストを管理装置102に送信する。
Next, FIG. 33 shows a flowchart of processing of a result inquiry thread executed to realize a function for acquiring an execution result in a command transferred from the
In this process, first, a predetermined time is waited in step S31. Thereafter, a SOAP request (for example, the one shown in FIG. 21) for inquiring the result is generated in step S32, and the HTTP request describing the SOAP request in step S33 is sent to the
そして、次のステップS34で、管理装置102からのHTTPレスポンスを待ち、これを受信すると、そこに記載されているSOAPレスポンスの内容を記憶する。このSOAPレスポンスの内容は、結果問い合わせに対する管理装置102からの応答のはずである。また、管理装置102には、結果問い合わせを行った時点で、それまでに転送したいずれかのコマンドに対する応答が送信可能な状態になっていた場合に、その応答を結果問い合わせに対する応答として返させるようにしており、このステップS34の処理は、受信手順の処理に該当する。またこの処理において、CPU52は受信手段として機能する。
In the next step S34, an HTTP response from the
そして、ステップS35で、そのSOAPレスポンスが、コマンドの処理が完了していない旨の応答(例えば図22に示したもの)であるか否か判断する。ここでは、管理装置102において処理が完了しているコマンドがなかった場合には、管理装置102は「結果」要素として「処理中」を記載して返してくるため、例えば「結果」要素の値が「処理中」であるか否かによってこの判断を行うことができる。また、このような内容であっても、SOAPレスポンスは動作応答に該当する。
そして、処理が完了していない旨の応答であった場合には、ステップS31に戻って処理を繰り返し、所定時間後に再度結果問い合わせのSOAPリクエストを管理装置102に送信する。すなわち、定期的に管理装置102にアクセスし、コマンドに対する応答の取得を試みる。
In step S35, it is determined whether or not the SOAP response is a response (for example, one shown in FIG. 22) that the command processing is not completed. Here, when there is no command for which processing has been completed in the
If the response indicates that the process has not been completed, the process returns to step S31 to repeat the process, and again transmits a SOAP request for a result inquiry to the
一方、ステップS35が処理が完了していない旨の応答でなかった場合(処理が完了した旨の応答であった場合)には、ステップS36で、処理が正常に完了した旨の応答(例えば図23に示したもの)であったか否か判断する。ここでは、管理装置102において制御に処理が完了した応答を返してくる場合には、管理装置102は「結果」要素として「処理完了」を記載して返してくるため、例えば「結果」要素の値が「処理完了」であるか否かによってこの判断を行うことができる。このような判断手法を採れば、SOAPレスポンスの内容を詳細に解析しなくてもステップS15の判断を行うことができるので、処理を簡略化することができる。ステップS35についても同様である。
On the other hand, if step S35 is not a response indicating that the process has not been completed (if the response indicates that the process has been completed), in step S36, a response indicating that the process has been normally completed (for example, FIG. 23). Here, when the
そして、ステップS36でYESであった場合には、ステップS37に進んで、処理が完了した画像機器コマンドについて、処理が完了した旨及びその処理結果を通知する結果通知のSOAPリクエスト(例えば図25に示したもの)を生成する。そしてステップS38で、HTTPリクエスト送信機能部45aとしての機能により、そのSOAPリクエストを記載したHTTPリクエストを、処理が完了した画像機器コマンドの送信元の画像処理装置100に送信する。
そして、ステップS39で画像処理装置100からのHTTPレスポンスの受信を待ち、これを受信すると、そこに記載されているSOAPレスポンスの内容を記憶する。このSOAPレスポンスは、画像処理装置100に送信した結果通知に対する受信通知(例えば図28に示したもの)のはずである。
If YES in step S 36, the process proceeds to step
In step S39, it waits for reception of an HTTP response from the
そして、ステップS43で応答を受信していない画像機器コマンドがあるか否か判断し、あればステップS31に戻って処理を繰り返す。すなわち、管理装置102に転送した全ての画像機器コマンドに対する応答を受信するまで、定期的に管理装置102にアクセスし、コマンドに対する応答の取得を試みる。そして、ステップS43で応答を受信していない画像機器コマンドがなければ、処理を終了する。
また、ステップS36でNOであった場合には、受信したSOAPレスポンスは、処理が正常に完了していない旨の応答(例えば図20に示したもの)であるが、このような内容であっても、SOAPレスポンスは動作応答に該当する。
そして、この場合、ステップS40に進んで、処理が完了した画像機器コマンドについて、処理が完了したがエラーであった旨及びその処理結果を通知する結果通知のSOAPリクエスト(例えば図27に示したもの)を生成する。そしてステップS41及びS42で、ステップS38及びS39の場合と同様に画像処理装置100との間で結果通知と受信通知のSOAPメッセージを授受して処理を終了する。
In step S43, it is determined whether there is an image device command that has not received a response. If there is an image device command, the process returns to step S31 to repeat the process. That is, the
If the answer is NO in step S36, the received SOAP response is a response (for example, the one shown in FIG. 20) indicating that the process has not been completed normally. Also, the SOAP response corresponds to an operation response.
In this case, the process proceeds to step S40, and for the image device command that has been processed, a SOAP request (for example, the one shown in FIG. ) Is generated. In steps S41 and S42, as in the case of steps S38 and S39, a result notification and a reception notification SOAP message are exchanged with the
なお、ステップS39又はステップS42の処理が終了すると、管理装置102に転送した画像機器コマンドに係る処理は完結したことになるので、画像処理装置100からの受信通知に基づいてその点を把握できれば、転送した画像機器コマンドや結果通知等の情報は、その時点で破棄してしまってよい。もちろん、実行結果やエラー情報を抽出して管理する等してもよい。
この結果問い合わせスレッドの処理を行うことにより、仲介装置101が管理装置102に転送した画像機器コマンドの実行結果を取得し、これを画像処理装置100に通知することができる。この処理において、ステップS38及びS41が第2の転送手順の処理であり、ここではCPU52が第2の転送手段として機能する。
Note that when the processing of step S39 or step S42 is completed, the processing related to the image device command transferred to the
By executing the processing of the result inquiry thread, the execution result of the image device command transferred to the
なお、以上説明した各スレッドは、処理終了時に消滅させてしまう必要はなく、処理終了後も、新たな開始トリガーがあるまで待機状態にしておくようにしてもよい。従って、各スレッドの処理が同時に並行して実行されることも有り得る。また、転送スレッドについては、複数のスレッドを同時に起動し、複数のコマンドについて並行して転送の処理を行うことができるようにしてもよい。HTTPサーバスレッドについても、サーバ機能の仕様が許せば、複数同時に起動してもよい。ただし、これらの場合でも、スレッドを多く設けすぎるとリソースの消費が大きくなるので、スレッド数に上限を設けることが好ましい。 Each thread described above does not need to be erased at the end of the process, and may be kept in a standby state until a new start trigger exists after the process ends. Therefore, it is possible that the processing of each thread is executed simultaneously in parallel. As for the transfer thread, a plurality of threads may be activated at the same time so that a plurality of commands can be transferred in parallel. A plurality of HTTP server threads may be activated simultaneously if the specification of the server function permits. However, even in these cases, it is preferable to set an upper limit on the number of threads, since resource consumption increases when too many threads are provided.
また、結果問い合わせスレッドについては、同種のものを複数同時に用意すると、それだけ結果問い合わせの回数が増してしまう。むしろ、状況に応じて結果問い合わせの間隔を調整し、応答を受信していないコマンドが多数ある場合に間隔を短くする等の対応を行う方がよい。このようにすれば、多数のコマンドを逐次的に処理する場合でも、管理装置102において処理が完了していれば、短時間のうちに全てのコマンドに対する応答を取得することができる。また、受信すべき応答がない場合でも結果問い合わせスレッドを待機状態にしておくのであれば、その間は結果問い合わせを行わないようにするとよい。
As for the result inquiry thread, if a plurality of the same types are prepared simultaneously, the number of result inquiries increases accordingly. Rather, it is better to adjust the interval for inquiring the result according to the situation and shorten the interval when there are many commands that have not received a response. In this way, even when a large number of commands are processed sequentially, if the processing is completed in the
また、以上の各フローチャートでは、仲介装置101からの管理装置102に対するコマンドについては特に言及していないが、このコマンドも、転送スレッド及び結果問い合わせスレッドとほぼ同じ処理によって取り扱うことができる。ただし、実行結果を画像処理装置100に通知することは当然不要であり、それに代えて、コマンドを生成したアクションハンドラに結果を通知するようにすればよい。
さらに、ここでは結果問い合わせスレッドは1つしか示していないが、転送したコマンドの種類に応じて異なる結果問い合わせコマンドを用意する場合には、各結果問い合わせコマンドに対応する結果問い合わせスレッドを設け、独立して動作させるようにするとよい。
In each of the above flowcharts, the command from the
Furthermore, although only one result inquiry thread is shown here, when different result inquiry commands are prepared depending on the type of transferred command, a result inquiry thread corresponding to each result inquiry command is provided and is independent. It is good to make it operate.
ここで、図34に、仲介装置101に以上説明した各スレッドに係る処理を実行させて画像処理装置100からの管理装置102に対するコマンドの転送を仲介させる場合の処理シーケンスを示す。
すなわち、画像処理装置100が画像機器コマンドを生成した場合(S51)、まずそのコマンドを仲介装置101に送信する(S52)。このとき、画像処理装置100は、送信したコマンドが最終的にどの装置で実行されるかを必ずしも認識している必要はない。
Here, FIG. 34 shows a processing sequence in the case where the
That is, when the
また、仲介装置101は、画像機器コマンドを受信し、これが転送の必要なコマンドであると認識した場合、とりあえず画像処理装置100に受信通知を返し(S53)、その後管理装置102にコマンドを転送する(S54)。そして、管理装置102は、これを受信すると受付通知を返す(S55)。
その後、仲介装置101は定期的に管理装置102に結果問い合わせを行う(S56,S59)。そして、管理装置102は、この結果問い合わせに対し、受信したコマンドに対する処理が完了していなければ処理未完了の応答を(S57)、画像機器コマンドに応じた処理(S58)を行って処理が完了していれば、処理完了の応答を返す(S60)。
Also, when the mediating
Thereafter, the
そして、仲介装置101は、処理完了の応答を受け取ると、画像処理装置100にその旨及び応答の内容を示す結果通知を送信する(S61)。そして、画像処理装置100はその結果通知に対して受信通知を返すと共に(S62)、受け取ったコマンド実行結果に応じた処理を行う(S63)。
Then, when the
以上説明してきたように、この実施例の遠隔管理システムにおいては、仲介装置101は、複数の画像処理装置100からコマンドを受信して管理装置102に転送することができる。そして、各装置は、コマンドを受信した場合に直ちにその送信元に対して受付通知や受信通知を返すので、コマンドの転送や処理に時間がかかる場合でもHTTPリクエストがタイムアウトしないようにすることができる。特に、仲介装置101と画像処理装置100との間の通信は、ユーザ環境内のLAN等によって行うため、タイムアウトの発生を非常に少なくすることができる。
As described above, in the remote management system of this embodiment, the
また、仲介装置101は、タイムアウトを気にすることなく任意のタイミングでコマンドの転送を行うことができるので、プロトコル設計の自由度を向上させることができる。
また、その後の結果問い合わせや結果通知は仲介装置101が行うため、末端の画像処理装置100には、これらの機能を設ける必要がない。従って、通常の画像処理装置をこの実施形態の遠隔管理システムに対応させるような場合に付加すべき機能が少なくて済み、設計や開発が容易になる。
Further, since the
Further, since the
また、仲介装置101は、結果問い合わせを、コマンドの送信元がどの装置であるかを特に考慮することなく行い、管理装置102も、結果問い合わせがあった時点でいずれかのコマンドに応じた処理が完了していれば、それがどの装置からのコマンドに係るものであるかに関わりなく応答を返すようにしている。
従って、仲介装置101が複数の画像処理装置100(さらに仲介装置101自身あるいは被管理仲介装置110)が行うべき結果問い合わせを代行し、一本化して行うことができるので、各装置がばらばらに結果問い合わせを行う場合に比較して、各コマンドに対する応答の取得に必要な結果問い合わせの数を削減して通信トラフィックの量を低減することができる。
Further, the
Accordingly, the
すなわち、ファイアウォール104の内側に設けられる画像処理装置100がファイアウォール104の外側にある管理装置102にコマンドを送信してそのコマンドに対する応答を受信する場合において、管理装置102においてコマンドに対応する処理に時間を要する場合でも、コマンドをタイムアウトさせずに済むようにしながら、管理装置102から画像処理装置100への動作応答の転送のために必要な通信トラフィックを抑えられるようにすることができる。
また、管理装置102には、積極的に結果通知を行う機能を設けなくても、仲介装置101からの、表1や表2に示したようなコマンドに応じた処理を行う機能を設けるのみで、コマンドの処理結果を末端の画像処理装置100まで伝達することができる。従って、管理装置102の機能構成も単純化し、設計や開発のコストを低減することができる。
That is, when the
In addition, the
なお、以上の説明において、表1及び表2を用いて説明した仕様例では、コマンド(サービス)毎に対応する結果問い合わせメソッドを用意する例を示したが、全てのコマンドに対応可能な共通の結果問い合わせメソッドを用意するようにしたり、複数のコマンドに対応可能な結果問い合わせメソッドを用意するようにしてもよいことはもちろんである。
ただし、このようにした場合、仲介装置101が画像処理装置100に対して適当な結果通知コマンドを送信できるようにするためには、結果問い合わせコマンドに対する応答として画像機器コマンドの実行結果を受け取った仲介装置101が、受け取ったものがどの種類のコマンドに対する実行結果であるのかを認識できるようにすることが好ましい。そして、このためには、結果問い合わせコマンドに対する応答に、画像機器コマンドに記載されていたコマンド名を追加したり、仲介装置101側で、受付番号とコマンド名とを対応付けて管理しておき、受付番号からコマンド名を検索できるようにする等することが考えられる。
In the above description, the specification example described using Table 1 and Table 2 shows an example in which a result inquiry method corresponding to each command (service) is prepared. Of course, a result inquiry method may be prepared, or a result inquiry method capable of handling a plurality of commands may be prepared.
However, in this case, in order to enable the
また、結果通知メソッドについても、画像機器コマンドと対応させて設けることは必須ではなく、上記の結果問い合わせメソッドの場合と同様、複数の画像機器コマンドに対応可能な共通のメソッドを用意するようにしてもよい。そして、結果問い合わせメソッドと結果通知メソッドとが対応していれば、仲介装置101において、画像機器コマンドの具体的なコマンド名を管理しておく必要はない。
ただし、この場合、画像処理装置100の側で、通知された動作結果がその画像機器コマンドに対応するものかを管理できるようにしておくことが必要である。このためには例えば、仲介装置101側で、結果通知コマンドの「コマンドID」として、対応する画像機器コマンドに画像処理装置100が付したIDを使用するようにすることが考えられる。
Also, it is not essential to provide a result notification method in correspondence with the image device command. As in the case of the result inquiry method described above, a common method that can handle a plurality of image device commands should be prepared. Also good. If the result inquiry method and the result notification method correspond to each other, it is not necessary for the mediating
However, in this case, it is necessary for the
さらに、管理装置102において、結果問い合わせコマンドを受け付けた時点で同一の装置からの複数のコマンドに関する処理が完了していた場合、これらのコマンドに対する応答を、1つのSOAPレスポンスに記載してまとめて返すようにしてもよい。
別々の装置からの複数のコマンドに関する処理が完了していた場合でも、同様な対応を行うことは可能であるが、この場合には、コマンド送信元(応答の宛先)の装置の情報をSOAPヘッダに記載することができないので、各応答と対応させてSOAPボディに記載することになる。
Further, when the
Even when processing related to a plurality of commands from different devices has been completed, the same correspondence can be performed. In this case, information on the device of the command transmission source (response destination) is stored in the SOAP header. Therefore, it is described in the SOAP body corresponding to each response.
〔第2の実施例:図35乃至図56〕
次に、図1に示した通信システムの第2の実施例である遠隔管理システムについて説明する。この遠隔管理システムの特徴は、仲介装置101と管理装置102との間で、1つのHTTPメッセージに複数のSOAPメッセージを記載して送信できるようにした点と、結果問い合わせという独立のメソッドを設けなくても、管理装置102に転送するコマンドとそのコマンドに対する応答とにより、実質的にこれを同じ機能を実現できるようにした点である。そして、このような特徴を実現するため、主に仲介装置101及び管理装置102における処理が第1の実施例の場合と異なる。そして、システムのハードウェア構成及び、画像処理装置100の機能については、第1の実施例の場合とほぼ同様であるから、これらについての説明は省略するか簡単にする。また、第1の実施例の構成と対応する部分には、第1の実施例の場合と同じ符号を用いる。
[Second Embodiment: FIGS. 35 to 56]
Next, a remote management system which is a second embodiment of the communication system shown in FIG. 1 will be described. This remote management system is characterized in that a plurality of SOAP messages can be described and transmitted between the
まず、図35に、この遠隔管理システムにおける仲介装置101と管理装置102の間の通信シーケンスの例を示す。
この遠隔管理システムにおいても、仲介装置101と管理装置102との間には、ファイアウォール104があるため、この図に示すように、通信は常に、仲介装置101から通信要求としてHTTPリクエストを管理装置102に送信し、管理装置102からこの通信要求に対する通信応答としてHTTPレスポンスを仲介装置101に返すという手順で行われる。
First, FIG. 35 shows an example of a communication sequence between the
Also in this remote management system, since there is a
そして、仲介装置101は、画像処理装置100から受信した画像機器コマンドのうち、自身で処理せず転送するコマンドを、HTTPリクエストに記載して管理装置102に転送するようにしている(HTTPリクエストX)。また、仲介装置101自身が生成したコマンドも、同じHTTPリクエストに記載して管理装置102に転送することができる。この場合において、1つのHTTPリクエストに0も含めて任意の数(データ量の観点から上限を設けてもよい)のコマンドを記載することができ、HTTPリクエストXには2つの画像機器コマンドと1つの仲介装置コマンドを記載した例を示している。
Then, the
一方、管理装置102は、受信したコマンドに対する応答がすぐに生成できる場合には、コマンド受信時のHTTPリクエストに対するHTTPレスポンスに応答を記載して仲介装置101に送信する(HTTPレスポンスX)。この場合にも、上記の場合と同様、1つのHTTPレスポンスに任意の数の応答を記載することができる。
しかし、処理に時間がかかる場合には、特に応答を記載せずにHTTPレスポンスを送信する。図35に示した例では画像機器コマンドCに対する応答はHTTPレスポンスXには記載していない。
On the other hand, when the response to the received command can be generated immediately, the
However, when processing takes time, an HTTP response is transmitted without particularly describing a response. In the example shown in FIG. 35, the response to the image device command C is not described in the HTTP response X.
そして、仲介装置101は、定期的に管理装置102にHTTPリクエストを送信してアクセスし、管理装置102は、このアクセスがあった時点で仲介装置101に送信できる状態になっている応答があれば、対応するHTTPレスポンスにその応答を記載して送信する。図35に示した例では、画像機器コマンドCに対する応答をHTTPレスポンスYに記載して送信している。
このように、この遠隔管理システムにおいては、第1の実施例の場合と異なり、管理装置102からの受付通知や、仲介装置101からの結果問い合わせといったSOAPメッセージは採用していない。しかし、このようなシーケンスを採用しても、第1の実施例の場合と同様に画像機器コマンドの転送と応答の取得は可能である。この遠隔簡易システムにおいては、仲介装置101から管理装置102に対して送信するHTTPリクエストが、それ自体で結果問い合わせと同様な機能を有するようにしているためである。
なお、仲介装置101と画像処理装置100との間の通信シーケンスについては、第1の実施例の場合と同様である。
Then, the
Thus, unlike the first embodiment, this remote management system does not employ a SOAP message such as an acceptance notification from the
The communication sequence between the
次に、図36に、この実施例における仲介装置101の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図を示す。図36に示す各機能は、CPU52が所要の制御プログラムを実行して仲介装置101の各部の動作を制御することにより実現されるものである。
また、図36に示す機能のうち、HTTPサーバ機能部41及びHTTPクライアント機能部45の機能は、CPU52及びPHY57によって実現されるものである。コマンド分配機能部42,アクションハンドラ群43,コマンド転送ハンドラ44,送信メッセージ収集機能部47,受信メッセージ分配機能部48,応答状況管理機能部49の機能は、CPU52によって実現されるものである。被管理側コマンドプール46は、いずれかの書き換え可能な記憶手段に設けられるものである。例えばフラッシュメモリ54に設けることができるが、SDRAM53やHDD63に設けてもよい。
Next, FIG. 36 shows a functional block diagram showing a configuration of functions for performing processing relating to commands and command responses among the functions of the
36, the functions of the HTTP
これらの機能についてさらに詳述する。
まず、HTTPサーバ機能部41及びコマンド分配機能部42の機能は、第1の実施例の場合と同様である。ただし、この実施例においては、後述する通り、コマンド分配機能部42は仲介装置コマンドの管理装置102への送信には関与しない。
また、アクションハンドラ群43は、第1の実施例の場合と同様、複数のアクションハンドラ43a及びコマンド転送ハンドラ44を有する。ただし、これらの各ハンドラは、画像処理装置100から受信したり自身で生成したりして管理装置102に転送すべきコマンドを、転送用コマンドシートを作成して被管理側コマンドプール46に登録する(L1)ようにしている点が、第1の実施例の場合と異なる。
These functions will be described in further detail.
First, the functions of the HTTP
The
また、コマンド転送ハンドラ44は、管理装置102に転送したコマンドに対する応答を受け取った場合に、その応答を画像処理装置100に通知するため、結果通知コマンドに係るSOAPリクエストを生成してHTTPリクエスト送信機能部45aに渡し、これをHTTPリクエストに記載して画像処理装置100に送信させる機能も有する(M1)。
そして、被管理側コマンドプール46は、管理装置102に送信すべき画像機器コマンド及び仲介装置コマンドを、これらのコマンドに対する応答や、このコマンドの識別情報及び宛先や送信元の情報等と関連付けて登録するプールである。以後、画像機器コマンドと仲介装置コマンドとを一括して「被管理側コマンド」とも呼ぶことにする。
When the
The managed-
ここで、図37に仲介装置101の転送用コマンドシートにおけるデータ構造の例を示す。
この図に示すように、仲介装置101においては、転送用コマンドシートには、「コマンドID」、「送信元情報」、「メソッド名」、「入力パラメータ」、「状態」、「コマンド実行結果の通知先」、および「出力パラメータ」のデータを記憶する領域を設けている。そして、このうち「コマンドID」、「メソッド名」、および「入力パラメータ」が被管理側コマンド(及びそこに付されたID)に該当し、「状態」及び「コマンド実行結果の通知先」が管理情報に該当する。「出力パラメータ」は、管理装置102から受信するコマンド応答の内容である。
Here, FIG. 37 shows an example of the data structure in the transfer command sheet of the
As shown in this figure, in the
各項目の内容について説明する。
まず、「メソッド名」は、管理装置102に対するリクエストの内容であり、管理装置102において呼び出す関数(メソッド)の種類を示す。「入力パラメータ」は、「メソッド名」に付随するデータであり、関数を呼び出す際の引数である。
「送信元情報」は、コマンドの送信元、すなわちコマンドを生成した装置の識別情報を示す。またこの情報は、コマンドに対する応答を送信する際の宛先を示す情報になる。なお、識別情報としては、ID、固有名称、IPアドレス等を用いることができる。また、シートに記載されているコマンドが複数の装置を経由して転送されてきたものである場合には、最終的な応答の宛先までの経路情報も含む。
The contents of each item will be described.
First, “method name” is the content of a request to the
“Transmission source information” indicates identification information of a command transmission source, that is, a device that has generated the command. This information is information indicating a destination when a response to the command is transmitted. As identification information, an ID, a unique name, an IP address, or the like can be used. In addition, when the command described on the sheet has been transferred via a plurality of devices, the route information to the final response destination is also included.
「コマンドID」は、被管理側コマンドを識別するための識別情報である。「状態」は、被管理側コマンドに関する処理の進行状況を示すデータであり、処理の進行と共に、「未処理」→「応答待ち」→「応答受信済」もしくは、遅延通知があった場合には「未処理」→「応答待ち」→「応答遅延」→「応答受信済」と遷移していく。
「コマンド実行結果の通知先」は、そのシートに記載している被管理側コマンドに対する応答を受信した場合に、その旨を通知して必要な処理を実行させるモジュールを示す参照情報である。参照するモジュールは、被管理側コマンドを登録したハンドラであることが多いが、必ずしもそうである必要はない。
「出力パラメータ」には、コマンド応答を受け取った段階で、その内容を格納する。管理装置102からのコマンド応答を受け取るまでは空である。
この他に、シートのプロパティを記録できるようにしてもよい。
“Command ID” is identification information for identifying a managed command. “Status” is data indicating the progress of processing related to the managed side command. When processing progresses, “Unprocessed” → “Waiting for response” → “Response received” or when there is a delay notification “Unprocessed” → “waiting for response” → “response delay” → “response received” transitions.
The “command execution result notification destination” is reference information indicating a module that, when receiving a response to the managed-side command described in the sheet, notifies that fact and executes a necessary process. The module to be referenced is often a handler that registers the managed-side command, but this is not necessarily the case.
The “output parameter” stores the contents when the command response is received. It is empty until a command response from the
In addition, the sheet properties may be recorded.
図38に、画像処理装置100から受信した画像機器コマンド(例えば図16に示したようなSOAPリクエスト)をコマンド転送ハンドラ44が転送用コマンドシートに登録する場合の、各項目に記載すべきデータの取得先を示す。
この図に示すように、「コマンドID」及び「送信元情報」は、それぞれSOAPリクエストのSOAPヘッダから抽出する。図16に示した例では、前者は「コマンドID」タグの要素として、後者は「送信元」タグの要素として記載されている。
38 shows data items to be described in each item when the
As shown in this figure, “command ID” and “source information” are extracted from the SOAP header of the SOAP request. In the example shown in FIG. 16, the former is described as an element of a “command ID” tag, and the latter is described as an element of a “transmission source” tag.
また、「メソッド名」は、SOAPボディから抽出するが、一般に、「Body」要素の子要素のタグに記載されている。そして、「入力パラメータ」としては、SOAPボディのXML文字列をそのまま登録する。この場合において、SOAPボディの内容を解釈する必要はない。
そして、「状態」には初期値として「未処理」を登録し、「コマンド実行結果の通知先」には、コマンドシートを作成したコマンド転送ハンドラ44を登録する。「出力パラメータ」の初期値が空であることは、上述の通りである。
The “method name” is extracted from the SOAP body, but is generally described in the tag of the child element of the “Body” element. As the “input parameter”, the XML character string of the SOAP body is registered as it is. In this case, it is not necessary to interpret the contents of the SOAP body.
Then, “unprocessed” is registered as an initial value in “state”, and the
図36の説明に戻ると、送信メッセージ収集機能部47は、管理装置102に転送すべき被管理側コマンドを、コマンドID及び宛先情報と関連付けて被管理側コマンドプール46から読み出し(L2)、これらから送信メッセージを生成する機能を有する。なお、被管理側コマンドに転送優先順位が指定されている場合には、送信メッセージ収集機能部47が転送優先順位の高いものから順に読み出すようにすることが考えられる。
Returning to the description of FIG. 36, the transmission message
また、送信メッセージとは、上記のコマンド応答やコマンドとコマンドIDとを、構造化言語であるXML(Extensible Markup Language)で、SOAPメッセージとして記載したものである。そして、送信メッセージ収集機能部47は、1つのコマンドにつき、送信メッセージとして1つのSOAPメッセージを生成する。またこのとき、各コマンドのコマンドID、送信元情報及び宛先情報はSOAPヘッダに記載し、被管理側コマンドの内容は、SOAPボディに記載する。SOAPによる通信では、SOAPヘッダとSOAPボディとからなるSOAPエンベロープ(封筒)と呼ばれるメッセージをXMLで記載し、HTTPなどのプロトコルで交換することになる。
このようなコマンドからのSOAPメッセージの生成は、WSDL(Web Service Description Language)に基づいて生成される所要の変換プログラム(シリアライザ)を実行し、データを直列化することによって行うことができる。なお、転送用コマンドシートにXML文字列がそのまま登録されている部分については、シリアライザは不要である。
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
Generation of a SOAP message from such a command can be performed by executing a required conversion program (serializer) generated based on Web Service Description Language (WSDL) and serializing the data. Note that a serializer is not necessary for the portion in which the XML character string is registered as it is in the transfer command sheet.
また、HTTPクライアント機能部45は、第1の実施例の場合と同様、HTTPリクエスト送信機能部45aとHTTPレスポンス受信機能部45bとを備える。
そして、HTTPリクエスト送信機能部45aは、送信メッセージ収集機能部47が生成した送信メッセージを記載したHTTPリクエストを生成し、管理装置102に送信する機能を有する(L3,L4)。このとき、1つのHTTPリクエストに送信メッセージをいくつ含めてもよい。もちろん、送信元の異なるコマンドに係る送信メッセージを混在させてもよい。
そこで、HTTPリクエスト送信機能部45aは、コマンドの種類や送信元に関わり無く、送信メッセージ収集機能部47が生成した全ての送信メッセージを1つのHTTPリクエストに含めて送信するようにしている。ただし、1つのHTTPリクエストに含める送信メッセージの数に上限を設けることも考えられる。
The HTTP
The HTTP request
Therefore, the HTTP request
ところで、このHTTPリクエストの送信は、送信メッセージ収集機能部47が被管理側コマンドやコマンド応答等の読み出しを試みた場合には、読み出すデータがなく、結果的に送信すべきSOAPメッセージを生成しなかった場合にも行うものである。そして、この読み出しの試みは、定期的に行うものとする。例えば、タイマによって60分毎に読み出すことが考えられる。
このようにするのは、上述のように、管理装置102から仲介装置101に送信したい情報があったとしても仲介装置101から通信を要求しない限り送信できないためである。仲介装置101から何も送信するデータがなかったとしても、定期的に管理装置102に対して通信要求を送信して、管理装置102から仲介装置101に情報を送信する機会を与えることにより、転送の必要な情報が長期間に亘って管理装置102に滞留してしまうことを防止できる。
By the way, this HTTP request is transmitted when the transmission message
This is because, as described above, even if there is information desired to be transmitted from the
なお、送信メッセージ収集機能部47による読み出しと、それに続くHTTPリクエスト送信機能部45aによるHTTPリクエストの送信とを、定期的なタイミング以外に適宜行ってよいことはもちろんである。例えば、緊急に送信が必要な情報が被管理側コマンドプール46に登録された場合に、アクションハンドラ群43の各ハンドラ43a,44が送信メッセージ収集機能部47にその旨を通知して読み出しを行わせるようにしてもよい。
また、HTTPリクエスト送信機能部45aは、コマンド転送ハンドラ44から渡される、画像処理装置100に転送すべき各種SOAPリクエストを、HTTPリクエストに記載して画像処理装置100に送信する機能も有する(M2)。この場合には、1つのHTTPリクエストに対して1つのSOAPリクエストを記載するようにしている。
It goes without saying that the reading by the transmission message
The HTTP request
また、HTTPレスポンス受信機能部45bは、管理装置102が送信してくるHTTPレスポンスを受信し、これを受信メッセージ分配機能部48に渡す機能と(L5,L6)、画像処理装置100が送信してくるHTTPレスポンスを受信し、これをコマンド転送ハンドラ44に渡す機能を有する(M3,M4)。ここで、画像処理装置100が送信してくるHTTPレスポンスは、第1の実施例の場合と同様、1つのSOAPレスポンスを記載したものであるが、管理装置102が送信してくるHTTPレスポンスには、被管理側コマンドに対する応答及びそのコマンドと関連付けられたコマンドIDと送信元情報を含むSOAPメッセージによる任意の数の受信メッセージが含まれている。
The HTTP response
受信メッセージ分配機能部48は、HTTPレスポンス受信機能部45bが受信したHTTPレスポンスに含まれるデータを、被管理側コマンドプール46に記憶している適当な転送用コマンドシートに振り分けて登録する機能を有する(L7)。
具体的には、管理装置102から受信したHTTPレスポンスに含まれる、被管理側コマンドに対する応答を、対応する被管理側コマンドについての「出力パラメータ」として登録する。その際、そのコマンドと関連付けられたコマンドIDを被管理側コマンドプール46に記憶している転送用コマンドシートのコマンドIDと照合して対応する被管理側コマンドを特定することができる。
The received message
Specifically, the response to the managed command included in the HTTP response received from the
そしてこのとき、HTTPレスポンスを分割してそこに含まれる各受信メッセージを取り出し、そのデータをテーブルへの登録に必要な形式に変換するが、この変換は、WSDLに基づいて生成される所要の変換プログラム(デシリアライザ)を実行することによって行うことができる。なお、応答を画像処理装置100に転送する場合には、SOAPボディ中の「結果」要素以外の部分については、XML文字列をそのまま出力パラメータとして登録すればよく、この部分に付いてはデシリアライザによる処理は不要である。
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). When the response is transferred to the
応答状況管理機能部49は、被管理側コマンドプール46に登録されているコマンドに対するコマンド応答の受信状況を管理する手段である。そして、管理装置102への転送後、応答を受信していないコマンドがある場合には、送信メッセージ収集機能部47によるコマンドの読み出し周期、すなわち管理装置102へのアクセス周期を短くする制御を行う機能を有する。
なお、ここでは説明を省略したが、仲介装置101は、管理装置102から仲介装置101や画像処理装置100へのコマンド(管理装置コマンド)に係るSOAPリクエストを、管理装置102から送信されてくるHTTPレスポンスに記載した状態で受信したり、そのコマンドに対する応答に係るSOAPレスポンスを、HTTPリクエストに記載して管理装置102に送信したりする機能も有する。
The response status
Although explanation is omitted here, the
このとき、受信した管理装置コマンドは、受信メッセージ分配機能部48により図示を省略した管理装置コマンドプールに登録し、その旨をコマンドに応じたアクションハンドラに通知して、コマンドに係る処理を実行させるようにするとよい。そして、その結果も管理装置コマンドと対応するように管理装置コマンドプールに登録し、送信メッセージ収集機能部47が読み出して管理装置102に返すようにするとよい。
At this time, the received management device command is registered in the management device command pool (not shown) by the received message
次に、図39に、管理装置102の機能のうち、コマンド及びコマンド応答に関する処理を行うための機能の構成を示す機能ブロック図を示す。図39に示す各機能は、制御装置126内のCPUが所要の制御プログラムを実行して管理装置102の各部の動作を制御することにより実現されるものである。
また、図39に示す機能のうち、HTTPサーバ機能部141の機能は、制御装置126内のCPU及び外部接続I/F123によって実現されるものである。アクションハンドラ群143,送信メッセージ収集機能部147,受信メッセージ分配機能部148,応答状況管理機能部149の機能は、制御装置126内のCPUによって実現されるものである。被管理側コマンドプール150は、制御装置126内のメモリに設けられるものである。
Next, FIG. 39 is a functional block diagram showing a configuration of functions for performing processing related to commands and command responses among the functions of the
In addition, among the functions shown in FIG. 39, the function of the HTTP
これらの機能についてさらに詳述する。
まず、HTTPサーバ機能部141は、第1の実施例の場合と同様、HTTPリクエスト受信機能部141aとHTTPレスポンス送信機能部141bとを備える。
そして、HTTPリクエスト受信機能部141aは、仲介装置101が送信してくるHTTPリクエストを受信し、これを受信メッセージ分配機能部148に渡す機能を有する(N1,N2)。ここで、仲介装置101が送信してくるHTTPリクエストには、被管理側コマンド及びそのコマンドと関連付けられたコマンドIDと送信元情報を含むSOAPメッセージが含まれている。
These functions will be described in further detail.
First, the HTTP
The HTTP request
また、HTTPレスポンス送信機能部141bは、送信メッセージ収集機能部147が生成した送信メッセージを記載したHTTPレスポンスを生成し、受信したHTTPリクエストに対する通信応答として仲介装置101に送信する機能を有する(N7,N8)。このとき、1つのHTTPリクエストに送信メッセージをいくつ含めてもよい。もちろん、送信元の異なるコマンドに対する応答を混在させてもよい。
そこで、HTTPレスポンス送信機能部141bは、コマンドの種類や送信元に関わり無く、送信メッセージ収集機能部147が生成した全ての送信メッセージを1つのHTTPレスポンスに含めて送信するようにしている。ただし、1つのHTTPレスポンスに含める送信メッセージの数に上限を設けることも考えられる。
Further, the HTTP response transmission function unit 141b has a function of generating an HTTP response in which the transmission message generated by the transmission message
Therefore, the HTTP response transmission function unit 141b transmits all the transmission messages generated by the transmission message
また、受信メッセージ分配機能部148は、HTTPリクエスト受信機能部141aが受信したHTTPリクエストに含まれるデータを、被管理側コマンドプール150に被管理側コマンドシートを設けて登録する機能を有する(N3)。
そして、被管理側コマンドプール150は、被管理側コマンドを、これらのコマンドに対する応答や、このコマンドの識別情報及びコマンドの送信元の情報等と関連付けて登録するプールである。
Further, the received message
The managed-
ここで、図40に管理装置102の被管理側コマンドシートにおけるデータ構造の例を示す。
この図に示すように、管理装置102においては、被管理側コマンドシートには、「コマンドID」、「送信元情報」、「メソッド名」、「入力パラメータ」、「状態」、「コマンドの通知先」、および「出力パラメータ」のデータを記憶する領域を設けている。そして、このうち「コマンドID」、「メソッド名」、および「入力パラメータ」が被管理側コマンド(及びそこに付されたID)に該当し、「状態」及び「コマンドの通知先」が管理情報に該当する。「出力パラメータ」は、アクションハンドラ群143のアクションハンドラが生成するコマンド応答の内容である。この他に、シートのプロパティを記録できるようにしてもよい。
Here, FIG. 40 shows an example of the data structure in the managed command sheet of the
As shown in this figure, in the
これらの各項目の内容は概ね仲介装置101の転送用コマンドシートの場合と同様である。ただし、「コマンドの通知先」は、そのシートに記載している被管理側コマンドを実行させるためのモジュールを示す参照情報である。また、「状態」の遷移は、「未処理」→「処理完了」→「応答済」もしくは、遅延通知を行う場合には「未処理」→「遅延未通知」→「処理待ち」→「処理中」→「処理完了」→「応答済」となる。
The contents of these items are generally the same as those in the transfer command sheet of the
図41に、仲介装置101から受信した被管理側コマンド(例えば図18に示したようなSOAPリクエスト)を受信メッセージ分配機能部148が被管理側コマンドシートに登録する場合の、各項目に記載すべきデータの取得先を示す。
この図に示すように、「コマンドID」及び「送信元情報」は、それぞれSOAPリクエストのSOAPヘッダから抽出する。図18に示した例では、前者は「コマンドID」タグの要素として、後者は「送信元」タグの要素として記載されている。
In FIG. 41, the managed-side command (for example, a SOAP request as shown in FIG. 18) received from the
As shown in this figure, “command ID” and “source information” are extracted from the SOAP header of the SOAP request. In the example shown in FIG. 18, the former is described as an element of a “command ID” tag, and the latter is described as an element of a “transmission source” tag.
また、「メソッド名」及び「入力パラメータ」は、それぞれSOAPボディから抽出する。このとき、SOAPボディのデータをテーブルへの登録に必要な形式に変換するが、この変換は、WSDLに基づいて生成される所要の変換プログラム(デシリアライザ)を実行することによって行うことができる。
そして、「状態」には初期値として「未処理」を登録し、「コマンド実行結果の通知先」には、第1の実施例で図31を用いて説明したようなハンドラテーブルを管理装置102についても用意しておいてこれを参照し、コマンドに係る処理を実行させるためのアクションハンドラを登録する。「出力パラメータ」の初期値が空であることは、上述の通りである。
Further, “method name” and “input parameter” are each extracted from the SOAP body. At this time, the data of the SOAP body is converted into a format necessary for registration in the table. This conversion can be performed by executing a required conversion program (deserializer) generated based on WSDL.
Then, “unprocessed” is registered as an initial value in “status”, and a handler table as described with reference to FIG. 31 in the first embodiment is registered in “notification destination of command execution result”. Prepare an action handler and register an action handler to execute the process related to the command. The initial value of “output parameter” is empty as described above.
図39の説明に戻ると、アクションハンドラ群143は、第1の実施例の場合と同様、複数のアクションハンドラを有する。しかし、結果問い合わせハンドラ144が不要である点と、各ハンドラが、受信メッセージ分配機能部148からの通知に基づいて被管理側コマンドプール150の被管理側コマンドシートから必要な情報を取得して(N4)その情報に基づいて被管理側コマンドに係る処理を行い、処理の完了後、応答を同じ被管理側コマンドシートに登録する(N5)点が、第1の実施例の場合と異なる。
Returning to the description of FIG. 39, the
また、送信メッセージ収集機能部147は、仲介装置101に送信すべき、被管理側コマンドに対する応答を、コマンドID及び宛先情報とを関連付けて被管理側コマンドプール150から読み出し(N6)、これらから送信メッセージを生成する機能を有する。なお、応答に送信優先順位が指定されている場合には、送信メッセージ収集機能部147が送信優先順位の高いものから順に読み出すようにすることが考えられる。
Further, the transmission message
また、送信メッセージ収集機能部147がコマンド応答の読み出しを試みるのは、仲介装置101からのHTTPリクエストを受信した場合である。これ以外の場面で読み出しを試みても、管理装置102からファイアウォール104を越えて仲介装置101にHTTPリクエストを送信することができないので、送信メッセージを仲介装置101に転送することができないためである。そして、HTTPレスポンスの送信は、送信メッセージ収集機能部147がコマンド応答等の読み出しを試みた場合には、読み出すデータがなく、結果的に送信すべきSOAPメッセージを生成しなかった場合にも行うものである。
応答状況管理機能部149は、被管理側コマンドプール150に登録されているコマンドに対するコマンド応答の生成及び送信状況を管理する手段である。
The transmission message
The response status
なお、ここでは説明を省略したが、管理装置102は、仲介装置101や画像処理装置100へのコマンド(管理装置コマンド)に係るSOAPリクエストを、HTTPレスポンスに記載した状態で仲介装置101に送信したり、そのコマンドに対する応答に係るSOAPレスポンスを、HTTPリクエストに記載した状態で仲介装置101から受信する機能も有する。
このとき、生成した管理装置コマンドは、コマンドを生成したアクションハンドラが図示を省略した管理装置コマンドプールに登録し、送信メッセージ収集機能部147がこれを収集して送信するようにするとよい。また、応答を受信した場合には、受信メッセージ分配機能部148がその応答を管理装置コマンドと対応するように管理装置コマンドプールに登録し、適当なアクションハンドラにその旨を通知して応答に応じた処理を行わせるようにするとよい。
Although not described here, the
At this time, the generated management device command may be registered in the management device command pool (not shown) by the action handler that generated the command, and the transmission message
以上のような各機能を仲介装置101及び管理装置102に設けることによっても、第1の実施例の場合と同様、仲介装置101に、複数の画像処理装置100からの動作要求を受信して管理装置102に転送する転送手順と、管理装置102にアクセスした際、管理装置102において、それまでに転送したいずれかのコマンドに対する応答が送信可能な状態になっていた場合に、その応答を受信する受信手順と、その手順で応答を受信した場合に、その応答を、その応答と対応するコマンドの送信元に転送する第2の転送手順とを実行させることが可能になる。なお、画像処理装置100の機能は、第1の実施例の場合と同様である。
By providing each function as described above in the
次に、図42にこのような機能を有する仲介装置101が管理装置102に送信するHTTPリクエストの例を示す。
このHTTPリクエストには、図42に示すように、ボディ部としてMIME(Multipurpose Internet Mail Extension)に従ったマルチパートのメッセージを記載し、この各パートには、それぞれエンティティヘッダを記載すると共に、詳細な図示は省略しているが、SOAPエンベロープを埋め込んでいる。SOAPエンベロープの内容については、当然コマンドやコマンド応答の内容に従って異なるものである。
また、図42の例では、HTTPリクエストのHTTPボディには、「MIME_boundary」で区分された各要素が、独立した第1パート、第2パート、第3パート、第4パートを構成しているが、HTTPボディに含めることのできるパート数は4つに限られない。0個を含め、いくつでもよい。
HTTPリクエストに埋め込まれて引き渡されるSOAPエンベロープには、被管理側コマンドを記載したものと、管理装置コマンドに対する応答を記載したものとがある。
Next, FIG. 42 shows an example of an HTTP request transmitted from the
In this HTTP request, as shown in FIG. 42, a multi-part message according to MIME (Multipurpose Internet Mail Extension) is described as a body part, and an entity header is described in each part, and detailed information is provided. Although not shown, a SOAP envelope is embedded. The contents of the SOAP envelope naturally differ according to the contents of the command and command response.
In the example of FIG. 42, each element divided by “MIME_boundary” forms an independent first part, second part, third part, and fourth part in the HTTP body of the HTTP request. The number of parts that can be included in the HTTP body is not limited to four. Any number is possible including zero.
The SOAP envelope embedded and delivered in the HTTP request includes a description of a managed command and a description of a response to a management device command.
また、図43にこのような機能を有する仲介装置101が管理装置102から受信するHTTPレスポンスの例を示す。
図43に示すように、このHTTPレスポンスは、形式としては図42に示したHTTPリクエストとHTTPヘッダ部が異なるのみであり、ボディ部には、HTTPリクエストの場合と同様に、詳細な図示は省略しているが、MIMEに従ったマルチパートのSOAPエンベロープを記載する。SOAPエンベロープの内容については、当然コマンドやコマンド応答の内容に従って異なるものである。
HTTPレスポンスに埋め込まれて引き渡されるSOAPエンベロープには、管理装置コマンドを記載したものと、被管理側コマンドに対する応答を記載したものとがある。
FIG. 43 shows an example of an HTTP response received from the
As shown in FIG. 43, this HTTP response is different in format only from the HTTP request shown in FIG. 42 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 management device command and a response to the managed command.
そして、以上のような形式のHTTPリクエストやHTTPレスポンスは、転送可能な1つのメッセージであり、各パートのSOAPエンベロープを、形式を変更せずに複数結合して生成することができる。また、このような形式のHTTPリクエストやHTTPレスポンスを分割して各パートのSOAPエンベロープを取り出せば、各SOAPエンベロープ毎に個別に別のHTTPリクエストやHTTPレスポンスに記載して転送することができる。
また、各パートには、SOAPエンベロープの他、そのパートの内容を示すエンティティヘッダも記載している。そしてこのうち、「X-SOAP-Type」ヘッダには、このパートに記載されているSOAPメッセージがSOAPリクエストであるかSOAPレスポンスであるかを示す情報を記載している。そして、あるパートがSOAPリクエストのパートであれば、そのパートの「X-SOAP-Type」ヘッダの値を「Request」とし、あるパートがSOAPレスポンスのパートであれば、そのパートの「X-SOAP-Type」ヘッダの値を「Response」としている。
The HTTP request and HTTP response in the above format are one message that can be transferred, and a plurality of SOAP envelopes of each part can be combined and generated without changing the format. Further, by dividing the HTTP request and HTTP response in such a format and taking out the SOAP envelope of each part, it is possible to transfer each SOAP envelope in a separate HTTP request or HTTP response.
In addition to the SOAP envelope, each part includes an entity header indicating the contents of the part. Among these, the “X-SOAP-Type” header describes information indicating whether the SOAP message described in this part is a SOAP request or a SOAP response. If a part is a SOAP request part, the value of the “X-SOAP-Type” header of that part is “Request”, and if a part is a SOAP response part, the “X-SOAP” of that part -Type "header value is" Response ".
また、「SOAPAction」ヘッダは、SOAPリクエストの内容を示すものであり、この例では、「http://www.…」というURI(Uniform Resource Identifier)によりリクエストの内容を示している。なお、「SOAPAction」ヘッダは、SOAPメッセージがSOAPレスポンスである場合には付加しないため、メッセージの受信側において、このヘッダの有無により、各パートのSOAPメッセージがSOAPリクエストであるかSOAPレスポンスであるかを判断することもできる。 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, whether the SOAP message of each part is a SOAP request or a SOAP response depending on the presence or absence of this header on the message receiving side. Can also be judged.
また、以上説明したような各機能を効率よく実現するためには、各装置において用意するメソッドを、第1の実施例の場合とは多少異なる一定の規約に従って作成するようにするとよい。次に、この点について説明する。
まず、具体例として、第1の実施例において表1を用いて説明したような、「用紙注文」のコマンドについて考える。この場合、コマンドの名称を「用紙注文」とし、引数(入力パラメータ)として「商品名」と「数量」を渡すとすると、各装置において例えば表3に示すような仕様のメソッドを用意するとよい。この表において、下線は、異なる種類(名称)のメソッドについても共通にしておくとよい部分を示す。
Further, in order to efficiently realize each function as described above, a method prepared in each device may be created according to a certain rule slightly different from the case of the first embodiment. Next, this point will be described.
First, as a specific example, consider a “paper order” command as described with reference to Table 1 in the first embodiment. In this case, assuming that the command name is “paper order” and “product name” and “quantity” are passed as arguments (input parameters), a method having specifications as shown in Table 3 may be prepared in each device. In this table, the underline indicates a portion that should be shared for different types (names) of methods.
この実施例においても、画像処理装置100と仲介装置101との間の通信シーケンスは第1の実施例の場合と同様であるから、用意すべきメソッドも、第1の実施例の場合と同様である。
しかし、管理装置102については、「用紙注文結果問い合わせ」のメソッドを設けず、「用紙注文」のみとしている。この場合において、「用紙注文」メソッドの出力パラメータには、「用紙注文」メソッドに特有の出力パラメータである「料金」が含まれる。また、管理装置102側で受付番号を用意しなくても、メソッドを呼び出すコマンドとそのコマンドに対する応答との対応関係は、コマンドIDにより容易に把握できる。従って、この実施例においては、第1の実施例の場合のような「受付番号」は不要である。
Also in this embodiment, since the communication sequence between the
However, the
また、これらの各メソッドが従うべき規約を示すと、表4のようになる。この表中において、下線部は、コマンドの種類に応じて定めるべき部分を示し、それ以外は、コマンドの種類によらず共通とすることが好ましい部分を示す。そして、「要求名」は、表3に示した例では「用紙注文」に該当し、「要求のパラメータ」は「商品名」と「数量」に、「要求の結果」は「料金」に該当する。 Table 4 shows the conventions to be followed by each of these methods. In this table, the underlined portion indicates a portion that should be determined according to the type of command, and the other portions indicate portions that are preferably common regardless of the type of command. In the example shown in Table 3, “request name” corresponds to “paper order”, “request parameter” corresponds to “product name” and “quantity”, and “request result” corresponds to “fee”. To do.
なお、画像機器コマンドとして表3を用いて説明した用紙注文コマンドを管理装置102に対して発した場合に各装置が送受信するSOAPメッセージ(SOAPエンベロープ)の具体例については、第1の実施例で図を図16乃至図28に示したものと概ね同様である。ただし、この実施例においては、結果問い合わせコマンドを使用していないため、そのコマンド及びそのコマンドに対する応答に係るメッセージが送受信されることはない。また、管理装置102における「用紙注文」メソッドの変更に伴って、管理装置102に転送した画像機器コマンドに対する応答のSOAPメッセージの形式が、第1の実施例の場合と若干異なる。
A specific example of a SOAP message (SOAP envelope) transmitted and received by each device when the paper order command described using Table 3 as an image device command is issued to the
図44に、管理装置102から仲介装置101に送信する、用紙注文コマンドに対する応答の例を示す。
この例においても、名前空間の宣言やSOAPヘッダの内容は、図19に示した、用紙注文コマンドの受付通知に係るSOAPレスポンスの例の場合と同様である。
しかし、SOAPボディにおいて、用紙注文コマンドに対する応答として、処理結果そのもの(「結果」及び「料金」)を返すようにしている点が、第1の実施例の場合と異なる。このような対応が可能であるのは、この実施例においては、HTTPリクエスト/レスポンスとSOAPリクエスト/レスポンスが1対1に対応しなくてもよいようにしているので、コマンドに対して即座に応答を返さなくてもよいためである。
FIG. 44 shows an example of a response to the paper order command transmitted from the
Also in this example, the namespace declaration and the contents of the SOAP header are the same as those in the example of the SOAP response related to the receipt notification of the paper order command shown in FIG.
However, the SOAP body is different from the first embodiment in that the processing result itself (“result” and “fee”) is returned as a response to the paper order command. In this embodiment, such a response is possible because the HTTP request / response and the SOAP request / response do not have to correspond one-to-one. This is because it is not necessary to return.
図45には、用紙注文コマンドに対する応答に係る、別のSOAPレスポンスの例を示す。
この例は、管理装置102において、用紙注文コマンドに応じた処理が完了したものの結果がエラーである場合の例であり、ここでは、「結果」タグの内容として、注文に係る用紙の在庫がなく、注文を受け付けられなかった旨を示す「在庫なし」を記載している。
「Envelope」タグの属性やSOAPヘッダの内容は、図44の場合と同様である。
なお、管理装置102において用紙注文コマンドの受付時にエラーとなった場合については、第1の実施例においても、図20に示したように、用紙注文コマンドに対する応答にその旨を記載していたので、この実施例についても同様なフォーマットとしている。
FIG. 45 shows another example of the SOAP response related to the response to the paper order command.
This example is an example in the case where the processing according to the paper order command is completed in the
The attributes of the “Envelope” tag and the contents of the SOAP header are the same as in FIG.
Note that in the case where an error occurs when the paper order command is received in the
次に、以上説明したような構成及び機能を有する仲介装置101において実行する処理について、図46乃至図50のフローチャートを用いて説明する。これらのフローチャートに示す処理は、仲介装置101のCPU52が所要の制御プログラムを実行することによって行うものである。
まず、図46に、仲介装置101において以上説明してきたような画像機器コマンドの転送に係る機能を実現するために行う処理のうち、HTTPサーバ機能部41に通信要求があった場合に実行する処理のフローチャートを示す。
Next, processing executed in the
First, among the processes performed to realize the function related to the transfer of the image device command as described above in the mediating
この処理は、仲介装置101をHTTPサーバとして機能させるためのHTTPサーバスレッドの処理であり、CPU52が図36に示した各部として機能して実行するものである。そして、CPU52は、HTTPサーバ機能部41に通信要求があった場合にこのスレッドを作成し、図46のフローチャートに示す処理を開始する。また、この処理は、第1の実施例で図29を用いて説明した処理と対応するものであり、ステップS101乃至S106の処理は、図29のステップS1乃至S6の処理と同様なものである。
This process is an HTTP server thread process for causing the
そして、ステップS104でハンドラがなく、受信した画像機器コマンドが管理装置102に転送すべきものであった場合の処理が、図29の場合と異なる。
すなわちこの場合、ステップS107で、受信したSOAPリクエストをもとに転送用コマンドシートを作成し、ステップS108でその作成した転送用コマンドシートを被管理側コマンドプール46に登録する。そして、ステップS109で、コマンドの受付通知に係るSOAPレスポンス(例えば図17に示したもの)を記載したHTTPレスポンスを画像処理装置100に送信する。
Then, the processing when there is no handler in step S104 and the received image device command is to be transferred to the
That is, in this case, a transfer command sheet is created based on the received SOAP request in step S107, and the created transfer command sheet is registered in the managed
以上の処理により、仲介装置101は、画像処理装置100からのコマンドを受け付け、それが自身で処理するコマンドであれば処理を行って応答を返し、自身で処理しない(できない)コマンドであれば受付通知を返した上で管理装置102への転送を準備することができる。また、以上の処理において、ステップS109が受信通知手順の処理であり、この処理において、CPU52が受信通知手段として機能する。
Through the above processing, the
次に、図47及び図48に、仲介装置101が受信した画像機器コマンドを管理装置102へ転送する機能を実現するために実行する転送スレッドの処理のフローチャートを示す。この処理は、CPU52が図36に示した各部、主として送信メッセージ収集機能部47及び受信メッセージ分配機能部48として機能して実行するものである。そして、CPU52は、定期的に、管理装置102にアクセスするタイミングになると、図47のフローチャートに示す処理を開始する。
Next, FIGS. 47 and 48 are flowcharts of processing of a transfer thread that is executed to realize a function of transferring an image device command received by the
そして、この処理においては、仲介装置101のCPU52はまず、ステップS111で、被管理側コマンドプール46から、「状態」が「未送信」である被管理側コマンドシートに登録されているコマンドとコマンドIDとを収集する。「未送信」という「状態」は、コマンドが被管理側コマンドプール46に登録された後、まだ管理装置102に送信されていないことを示すものであるので、これを基準に管理装置102に送信すべきコマンドを抽出できる。また、この時、画像機器コマンドと仲介装置コマンドとは区別せずに取り扱う。
In this process, the
その後、ステップS111で収集した全ての被管理側コマンドを順次対象として、ステップS112乃至S114の処理を繰り返す。この部分の処理においては、まずステップS112で、対象の被管理側コマンドと、そのコマンドID及び送信元情報とを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書(SOAPエンベロープ)に変換し、ステップS113でこれにエンティティヘッダを付加して対象の被管理側コマンドに関するパートを生成する。そして、ステップS114で、対象の被管理側コマンドを記載していた被管理側コマンドシートの「状態」を「応答待ち」に変更する。「応答待ち」という「状態」は、コマンドを管理装置102に送信済であり、応答はまだ受信していないことを示すものである。
Thereafter, the processes in steps S112 to S114 are repeated for all the managed-side commands collected in step S111. In this part of the processing, first, in step S112, the target managed command, its command ID and transmission source information, and the XML document (SOAP envelope) in which these information are included in the SOAP body and the SOAP header, respectively. In step S113, an entity header is added to this to generate a part related to the target managed command. In step S114, the “status” of the managed command sheet that describes the target managed command is changed to “wait for response”. The “status” of “waiting for response” indicates that the command has been transmitted to the
これらが全て完了した後、CPU52は、ステップS115で、ステップS113で生成した各パートをマージし、図42に示したようなマルチパートのHTTPリクエストを生成して、HTTPリクエスト送信機能部45aの機能により管理装置102に送信する。
なお、管理装置コマンドプールに管理装置コマンドに対する未送信の応答がある場合には、その応答のパートも作成して、同じHTTPリクエストに記載して管理装置102に送信するようにするとよい。また、ステップS114で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンドを再度送信の対象とすることができるので、システムの信頼性が向上する。
After all these are completed, in step S115, the
When there is an untransmitted response to the management device command in the management device command pool, a response part is also created and described in the same HTTP request and transmitted to the
以上でHTTPリクエストの送信に関する処理を終了し、図48の処理に進む。
そして、ステップS116でHTTPレスポンス受信機能部45bとしての機能により管理装置102からHTTPレスポンスを受信し、ステップS117でそのHTTPレスポンスのHTTPボディを解析してパートに分割する。ここで、各パートへの分割は、「MIME_boundary」で区分された要素に分割することであり、またここで全てのパートに関して分割する。そして、ここで得られた各パートについて、以下のステップS118乃至S127の処理を繰り返す。ここでは、各パートは被管理側コマンドに対する応答のパートであるとする。
This completes the processing related to the transmission of the HTTP request, and proceeds to the processing in FIG.
In step S116, an HTTP response is received from the
この場合、まずステップS118で対象パートのSOAPヘッダを解析し、ステップS119で、SOAPヘッダ中のコマンドIDをキーに、被管理側コマンドプール46から、対象パートの応答に対応する転送用コマンドシートを検索する。
そして、ステップS120で、発見したコマンドシートに記載されているコマンドが転送用のコマンド、すなわち画像処理装置100から受信して管理装置102に転送した画像機器コマンドであるか否か判断する。そして、YESであれば、ステップS121で対象パートのSOAPボディのうち「結果」要素を抽出してステップS122でこの内容を抽出した転送用コマンドシートの「結果」の項目に登録する。そして、ステップS123ではSOAPボディの「結果」以外の部分を、XML文字列のまま「その他の出力パラメータ」の項目に登録する。すなわち、この場合には、応答に応じた処理を自身では行わず、応答を他の装置に転送するので、応答の内容全体を解釈する必要はないのである。
In this case, first, the SOAP header of the target part is analyzed in step S118, and in step S119, a command sheet for transfer corresponding to the response of the target part is received from the managed
In step S120, it is determined whether the command described in the found command sheet is a transfer command, that is, an image device command received from the
一方、ステップS120でNOであれば、ステップS126で対象パートのSOAPボディ全体を解析し、ステップS127でこの内容を抽出した転送用コマンドシートの「出力パラメータ」の項目に登録する。
そして、ステップS123又はS127の後は、ステップS124に進み、応答を登録した転送用コマンドシートの「状態」を「応答受信済」に変更する。「応答受信済」という「状態」は、コマンドに対する応答を管理装置102から受信済であることを示すものである。
On the other hand, if “NO” in the step S120, the entire SOAP body of the target part is analyzed in a step S126, and the contents are registered in the “output parameter” item of the transfer command sheet extracted in a step S127.
After step S123 or S127, the process proceeds to step S124, and the “status” of the transfer command sheet in which the response is registered is changed to “response received”. The “status” of “response received” indicates that a response to the command has been received from the
その後、応答を受信した旨を、応答を登録した転送用コマンドシートの「コマンド実行結果の通知先」に記載されたハンドラに通知し、そのハンドラが応答の受信に応じた処理を行う。このとき、コマンドが画像機器コマンドであれば、通知の対象はコマンド転送ハンドラ44であり、応答の受信に応じた処理は、図50に示す結果通知スレッドの処理である。
ステップS117で得られた全てのパートについて以上の処理が終了すると、転送スレッドの処理は終了する。
なお、受信したHTTPレスポンスに管理装置コマンドのパートがあった場合には、管理装置コマンドシートを作成してこのコマンドを管理装置コマンドプールに登録し、「コマンドの通知先」に記載されたハンドラに通知して、コマンドに係る処理を実行させるようにするとよい。
Thereafter, the fact that the response has been received is notified to the handler described in the “command execution result notification destination” of the transfer command sheet in which the response is registered, and the handler performs processing in response to the reception of the response. At this time, if the command is an image device command, the subject of notification is the
When the above processing is completed for all the parts obtained in step S117, the processing of the transfer thread is completed.
If there is a management device command part in the received HTTP response, a management device command sheet is created and this command is registered in the management device command pool. It is good to notify and to make the process which concerns on a command perform.
以上の処理により、画像処理装置100から受信した画像機器コマンドを、管理装置102に転送すると共に、管理装置102に転送した画像機器コマンドの実行結果を受信することができる。そして、管理装置102において、それまでに転送した複数のコマンドに対する応答がそれぞれ送信可能な状態になっていた場合に、それらの動作応答を複数一括して受信することができる。また、HTTPサーバスレッドの処理とこの転送スレッドの処理のうち図47に示した部分の処理が、転送手順の処理であり、この処理において、CPU52が転送手段として機能する。また、図48に示した部分の処理は、受信手順の処理であり、この処理において、CPU52が受信手段として機能する。
Through the above processing, the image device command received from the
次に、図49に、仲介装置101が管理装置102へのアクセスタイミングを設定するための転送タイミング設定スレッドの処理のフローチャートを示す。この処理は、CPU52が図36に示した応答状況管理機能部49として機能して実行するものである。
CPU52は、適当なタイミングで図49のフローチャートに示す処理を開始し、管理装置102へのアクセスタイミングの管理を開始する。そして、ステップS301で、管理装置102からのHTTPレスポンスの受信イベントがあるまで待機する。そして、このイベントがあるとステップS302に進んで「状態」が「処理待ち」の転送用コマンドシートが被管理側コマンドプール46に記憶されているか否か判断する。すなわち、管理装置102に送信済みで、かつ応答を受信していない被管理側コマンドがあるか否か判断する。
Next, FIG. 49 shows a flowchart of processing of a transfer timing setting thread for the
The
そして、あればステップS303で転送スレッドの実行間隔を短い時間に設定して管理装置102へのアクセス間隔を短縮し、なければステップS304で実行間隔を長い時間に設定してアクセス間隔を長くする。その後、ステップS301に戻って処理を繰り返す。なお、ステップS302の判断は、HTTPレスポンスに記載した状態で受信した受信メッセージの分配が完了してから行うようにするとよい。
If there is, the transfer thread execution interval is set to a short time in step S303 to shorten the access interval to the
以上のような処理を行うことにより、管理装置102に被管理側コマンドを送信した後、管理装置102に送信した全ての被管理側コマンドに対する応答を受信するまでは、それ以外の期間よりも短い間隔で前記サーバにアクセスするようにすることができる。このようにすることにより、通常は、ネットワークトラフィックの低減を考慮して管理装置102へのアクセス間隔を1時間に1回等ある程度長めの期間に設定してシステムを運用しながら、コマンドを管理装置102に送信した後は、なるべく早いタイミングで応答を受け取れるよう、アクセス間隔を短縮するといった対応が可能となる。従って、通信効率をある程度維持しながら、ネットワークのトラフィックを削減することができる。
By performing the processing as described above, after a managed-side command is transmitted to the
なお、図49に示した条件よりも細かくアクセス間隔を制御できるようにしてもよい。また例えば、極端に処理に時間がかかるコマンドを管理装置102に送信した場合でも応答が得られるまで短い間隔でアクセスを繰り返すとすると、無駄に通信トラフィックを増加させることになってしまう。そこで、このような場合には、管理装置102が遅延通知を返してコマンドの処理に時間がかかる旨を通知するようにするとよい。そして、仲介装置101側では、送信済みで応答を受け取っていない被管理側コマンドがある場合でも、それらについて全て遅延通知を受け取っている場合には、管理装置102へのアクセス間隔を長くするように制御することが考えられる。
Note that the access interval may be controlled more finely than the conditions shown in FIG. Further, for example, even when a command that takes extremely long processing time is transmitted to the
次に、図50に、仲介装置101が画像処理装置100に画像機器コマンドの実行結果を通知する機能を実現するために実行する結果通知スレッドの処理のフローチャートを示す。この処理は、CPU52が図36に示した各部、主としてコマンド転送ハンドラ44として機能して実行するものである。そして、CPU52は、図48のステップS125においてコマンド転送ハンドラ44に画像機器コマンドに対する応答が被管理側コマンドプール46に登録された旨の通知がなされた場合に、このスレッドを作成し、図50のフローチャートに示す処理を開始する。
Next, FIG. 50 shows a flowchart of processing of a result notification thread executed by the
なお、この処理の内容は、ステップS131で、処理結果を画像処理装置100に通知すべき画像機器コマンドについて、転送用コマンドシートの内容を読み出し、ステップS133又はS136でその内容をもとに結果通知のSOAPリクエストを生成する点以外は、図33のステップS36乃至S42の内容とほぼ同様である。
従って、詳細な説明は省略するが、この結果問い合わせスレッドの処理を行うことにより、仲介装置101が画像処理装置100に画像機器コマンドの実行結果を通知することができる。この処理において、ステップS134及びS137が第2の転送手順の処理であり、ここではCPU52が第2の転送手段として機能する。
The contents of this process are the contents of the transfer command sheet for the image device command whose processing result should be notified to the
Accordingly, although detailed description is omitted, the
なお、以上説明した各スレッドは、処理終了時に消滅させてしまう必要はなく、処理終了後も、新たな開始トリガーがあるまで待機状態にしておくようにしてもよい。その他、第1の実施例で説明したような変形を適宜適用可能である。ただし、転送スレッドについては、管理装置102へのアクセス間隔の管理の便宜のため、複数スレッドを同時に設けないことが好ましい。
Each thread described above does not need to be erased at the end of the process, and may be kept in a standby state until a new start trigger exists after the process ends. In addition, the modifications described in the first embodiment can be applied as appropriate. However, for the transfer thread, it is preferable not to provide a plurality of threads at the same time for the convenience of managing the access interval to the
次に、以上説明したような構成及び機能を有する管理装置102において実行する処理について、図51乃至図54のフローチャートを用いて説明する。これらのフローチャートに示す処理は、制御装置126中のCPUが所要の制御プログラムを実行することによって行うものである。
まず、図51及び図52に、仲介装置101との間のSOAPメッセージの送受信に係る機能を実現するために行う処理のフローチャートを示す。
Next, processing executed in the
First, FIG. 51 and FIG. 52 are flowcharts of processing performed to realize a function related to transmission / reception of a SOAP message with the
この処理は、制御装置126中のCPUが図39に示した各部として機能して実行するものである。そして、制御装置126中のCPUは、仲介装置101からHTTPサーバ機能部141に通信要求があった場合にこのフローチャートに示す処理を開始する。
そして、この処理においては、まずステップS201で、仲介装置101からHTTPリクエストを受信する。そして、ステップS202で、受信したHTTPリクエストのHTTPボディを各パートに分割する。ここで、各パートへの分割は、「MIME_boundary」で区分された要素に分割することであり、またここで全てのパートに関して分割する。
This processing is executed by the CPU in the
In this process, first, in step S201, an HTTP request is received from the
そしてその後、分割して得た全てのパートを順に対象として、ステップS203及びS204の処理を繰り返す。そして、この部分の処理においては、まずステップS203で、対象パートのSOAPリクエストをもとに図41を用いて説明したように被管理側コマンドシートを作成し、ステップS204でその作成した被管理側コマンドシートを被管理側コマンドプール150に登録する。これらの処理は、受信メッセージ分配機能部148の機能によるものである。
なお、受信したHTTPリクエストに管理装置コマンドに対する応答のパートがあった場合には、管理装置コマンドプールからその応答と対応するコマンドの管理装置コマンドシートを抽出し、そのコマンドシートに応答の内容を登録すると共に、「コマンド実行結果の通知先」に記載されたハンドラに通知して、受信したコマンド応答に係る処理を実行させるようにするとよい。
Thereafter, the processes in steps S203 and S204 are repeated for all the parts obtained by the division in order. In this part of processing, first, in step S203, a managed command sheet is created based on the SOAP request of the target part as described with reference to FIG. 41, and the created managed side is created in step S204. Register the command sheet in the managed
If there is a response part to the management device command in the received HTTP request, the management device command sheet of the command corresponding to the response is extracted from the management device command pool, and the response content is registered in the command sheet. At the same time, it is preferable to notify the handler described in “Notification destination of command execution result” to execute the processing related to the received command response.
全てのパートについてステップS203及びS204の処理が終了すると、処理は図52のステップS205に進み、被管理側コマンドプール150から、「状態」が「処理完了」である被管理側コマンドシートに登録されているコマンドとコマンドIDとを収集する。「処理完了」という「状態」は、コマンドに係る処理が完了し、応答が被管理側コマンドプール150に登録された後、まだ仲介装置101に送信されていないことを示すものであるので、これを基準に仲介装置101に送信すべき応答を抽出できる。
When the processing in steps S203 and S204 is completed for all parts, the processing proceeds to step S205 in FIG. 52, and is registered in the managed command sheet whose “status” is “processing completed” from the managed
そして、ここで収集した全てのコマンドについて、ステップS206乃至S208の処理を繰り返す。この部分の処理においては、まずステップS206で、対象の被管理側コマンドに係る出力パラメータ(応答)と、そのコマンドID及び送信元情報とを、これらの情報がそれぞれSOAPボディとSOAPヘッダとに含まれるXML文書(SOAPエンベロープ)に変換し、ステップS207でこれにエンティティヘッダを付加して対象のコマンドに対する応答に関するパートを生成する。そして、ステップS208で、対象の被管理側コマンドを記載していた被管理側コマンドシートの「状態」を「応答済」に変更する。「応答済」という「状態」は、コマンド応答を仲介装置101に送信済であることを示すものである。
And the process of step S206 thru | or S208 is repeated about all the commands collected here. In this part of the processing, first, in step S206, the output parameter (response) related to the target managed command, its command ID, and transmission source information are included in the SOAP body and SOAP header, respectively. In step S207, an entity header is added to the XML document (SOAP envelope) to generate a part related to the response to the target command. In step S208, the “status” of the managed command sheet that describes the target managed command is changed to “responded”. “Status” of “Responded” indicates that a command response has been transmitted to the
これらが全て完了した後、制御装置126中のCPUは、ステップS209で、ステップS207で生成した各パートをマージし、図43に示したようなマルチパートのHTTPレスポンスを生成して、ステップS210でHTTPレスポンス送信機能部141bとしての機能によりそのHTTPレスポンスを仲介装置101に送信して処理を終了する。
なお、管理装置コマンドプールに未送信の管理装置コマンドがある場合には、そのコマンドのパートも作成して、同じHTTPリクエストに記載して管理装置102に送信するようにするとよい。また、ステップS208で行った「状態」の変更は、実際にこの送信が終了してから行うようにしてもよい。このようにすることにより、通信エラーが発生しても、送信しようとしていたコマンド応答を再度送信の対象とすることができるので、システムの信頼性が向上する。
After all of these are completed, the CPU in the
If there is an untransmitted management device command in the management device command pool, a part of the command may be created and transmitted to the
以上の処理により、管理装置102において、仲介装置101からアクセスがあった場合に、その仲介装置101から受信したいずれかのコマンドに対する応答が送信可能な状態であれば、その応答を仲介装置101に送信することができる。またステップS205乃至S210の処理が送信手順の処理であり、この部分の処理において、制御装置126中のCPUが送信手段として機能する。
As a result of the above processing, when the
次に、図53に、管理装置102における被管理側コマンドの実行に関する処理のフローチャートを示す。
被管理側コマンドの実行に関する処理としては、まず、制御装置126中のCPUが、図53のフローチャートに示す処理を、図51に示したステップS204の処理の後に、すなわち被管理側コマンドを被管理側コマンドプール150に登録した直後に行うことが考えられる。
Next, FIG. 53 shows a flowchart of processing relating to execution of the managed side command in the
As processing related to execution of the managed side command, first, the CPU in the
そして、この処理においては、まずステップS221で、登録した被管理側コマンドについての被管理側コマンドシートの「コマンドの通知先」の情報に基づいて被管理側ハンドラを呼び出し、「入力パラメータ」のデータを渡して被管理側コマンドに関する処理を実行させる。なお、この被管理側コマンドに関する処理は、このフローチャートには示していないが、制御装置126中のCPUが別途実行することになる。
そして、これが完了すると、ステップS222で実行結果を被管理側コマンドシートの「出力パラメータ」の項目に登録すると共に、ステップS223で被管理側コマンドシートの「状態」を「処理完了」に変更し、処理が完了したことを示して、もとの図51の処理に戻る。
以上の処理を行うことにより、仲介装置101から被管理側コマンドを受信した場合に、そのコマンドに係る動作を実行し、その結果をコマンド応答として生成して仲介装置101に送信可能な状態にすることができる。
In this process, first, in step S221, the managed handler is called based on the “command notification destination” information of the managed command sheet for the registered managed command, and the “input parameter” data To execute the process related to the managed command. The processing related to the managed side command is not shown in this flowchart, but is executed separately by the CPU in the
When this is completed, the execution result is registered in the “output parameter” item of the managed command sheet in step S222, and the “status” of the managed command sheet is changed to “processing completed” in step S223. Returning to the original process of FIG. 51, indicating that the process has been completed.
By performing the above processing, when a managed command is received from the
また、図54に、被管理側コマンドの実行に関する処理の別の例のフローチャートを示す。この処理は、図51に示した処理とは独立に行うものであり、この処理を用いる場合、制御装置126中のCPUは適当なタイミングで図54のフローチャートに示す処理を開始する。
FIG. 54 shows a flowchart of another example of processing related to execution of the managed side command. This process is performed independently of the process shown in FIG. 51. When this process is used, the CPU in the
そして、この処理においては、まずステップSX1で、被管理側コマンドプール150に「状態」が「処理待ち」である被管理側コマンドシートがあるか否か判断し、なければこのような被管理側コマンドシートが追加されるまで待機する。そして、このような被管理側コマンドシートを発見した場合、ステップSX2でその1つを処理対象とし、その被管理側コマンドシートの「状態」を「処理中」に変更する。
その後、図53の場合と同様なステップS221乃至S223の処理を行って処理対象の被管理側コマンドシートに記載された被管理側コマンドを実行し、これが完了するとステップSX1に戻って処理を繰り返す。
In this process, first, in step SX1, it is determined whether or not there is a managed command sheet whose “status” is “waiting for processing” in the managed
Thereafter, the processes in steps S221 to S223 similar to those in FIG. 53 are performed to execute the managed command described in the managed command sheet to be processed. When this is completed, the process returns to step SX1 to repeat the process.
以上の処理は、複数のスレッド(例えば4スレッド)で同時に行うようにしてもよい。処理対象となった被管理側コマンドシートの「状態」は、「処理待ち」ではないため、複数のスレッドで同時に処理を行っても、1つの被管理側コマンドシートを重複して処理対象としてしまうことはない。 The above processing may be performed simultaneously by a plurality of threads (for example, 4 threads). Since the “status” of the managed command sheet to be processed is not “waiting for processing”, even if processing is performed simultaneously by multiple threads, one managed command sheet is duplicated as the processing target. There is nothing.
以上のような処理を行うようにすれば、任意のタイミングで被管理側コマンドを実行することができるので、実行に時間のかかるコマンドがあった場合でも、以後の処理が滞ることがない。そして、実行の終了したものから順に、その結果をコマンド応答として仲介装置101に送信可能な状態にすることができる。
以上で、管理装置102において実行する、各コマンド及びコマンド応答の転送に関する処理の説明を終了する。
なお、画像処理装置100において実行する、各コマンド及びコマンド応答の転送に関する処理は、第1の実施例の場合と同様であるから、説明を省略する。
If the processing as described above is performed, the managed-side command can be executed at an arbitrary timing. Therefore, even if there is a command that takes a long time to execute, the subsequent processing is not delayed. Then, in order from the end of execution, the result can be sent to the
This is the end of the description of the processing related to the transfer of each command and command response executed in the
Note that the processing related to the transfer of each command and command response executed in the
ここで、図55に、以上説明してきた遠隔管理システムにおいて、画像処理装置100が管理装置102に対する画像機器コマンドを生成してからそのコマンドに対する応答を受け取るまでに各装置において行われる一連の処理を示す。
この図に示す処理の各々は、既に説明した処理のいずれかであるので、詳細な説明は省略するが、以上説明してきた遠隔管理システムにおいては、このような処理を行うことにより、画像処理装置100と管理装置102との間のコマンド及びコマンド応答の送受信を、仲介装置101によって仲介して行うことができる。
Here, in the remote management system described above with reference to FIG. 55, a series of processing performed in each device from when the
Since each of the processes shown in this figure is one of the processes already described, detailed description will be omitted. However, in the remote management system described above, by performing such a process, the image processing apparatus Transmission and reception of commands and command responses between the
また、図56に、以上説明してきた遠隔管理システムにおいて、画像処理装置100が管理装置102に対する画像機器コマンドを生成してからそのコマンドに対する応答を受け取るまでの各装置間における通信シーケンス例を示す。
この例においては、まず画像処理装置100が、管理装置102に対する画像機器コマンドを生成し、これをHTTPリクエストxに記載して仲介装置101に送信している。そして、仲介装置101は、HTTPサーバスレッドの処理により、これが自身で実行すべきものでないと判断し、転送用コマンドシートに登録すると共に、HTTPリクエストxに対するHTTPレスポンスに、受信通知を記載して画像処理装置100に返す。
FIG. 56 shows an example of a communication sequence between the respective apparatuses from when the
In this example, first, the
一方、仲介装置101は、これとは別に、転送スレッドの処理により、管理装置102に転送すべき画像機器コマンドと、自身が生成したコマンドとを、同じHTTPリクエストに記載して管理装置102に転送する。ここでは、まずHTTPリクエストXがこの転送に係るHTTPリクエストに該当し、画像処理装置100から受信した画像機器コマンドAと、自身で生成した仲介装置コマンドBとをHTTPリクエストXに記載して管理装置102に転送している。
On the other hand, the
そして、管理装置は、受信したコマンドを被管理側コマンドシートに登録し、実行結果も同じシートに登録するが、応答がすぐに生成できる場合には、コマンドが記載されていたHTTPリクエストに対するHTTPレスポンスに、応答を記載して仲介装置101に送信することができる。ここでは仲介装置コマンドBに対する応答を、HTTPレスポンスXに記載して送信している。
しかし、すぐに応答を生成できないコマンドについては、応答の生成後、仲介装置101からHTTPリクエストを受信した際にこれを仲介装置101に送信するようにしている。
Then, the management apparatus registers the received command in the managed command sheet and registers the execution result in the same sheet. However, if the response can be generated immediately, the HTTP response to the HTTP request in which the command is described The response can be described and transmitted to the
However, a command that cannot immediately generate a response is transmitted to the
一方、仲介装置101は、特に管理装置102に送信すべき情報がなくても、定期的に管理装置102にHTTPリクエストを送信し、管理装置102から仲介装置101に送信すべき情報を受け取ることができるようにしている。
ここでは、HTTPリクエストYがこれに該当し、この時点までに管理装置102で画像機器コマンドAに対する応答が生成されていれば、管理装置102は、このHTTPリクエストYに対するHTTPレスポンスYに、画像機器コマンドAに対する応答を記載して仲介装置101に返す。
On the other hand, even if there is no information to be transmitted to the
Here, the HTTP request Y corresponds to this, and if the response to the image device command A has been generated by the
この場合において、送信するHTTPリクエストYに何らかのコマンドが記載されていたとしても、画像機器コマンドAに対する応答の送信は同様に行われる。すなわち、仲介装置101からのコマンドの送信と、管理装置102からのコマンド応答の送信は、基本的には独立して行われ、仲介装置101から管理装置102に対して何らかの問い合わせ(ここではHTTPリクエストの送信)をした際に、管理装置102側で生成されているコマンド応答があれば、これを受け取るという処理を行うようにしている。もちろん、複数のコマンドについて応答が生成されていれば、それらを全て一括して受け取ることができる。
In this case, even if any command is described in the HTTP request Y to be transmitted, a response to the image device command A is transmitted in the same manner. That is, the transmission of the command from the
そして、仲介装置101は、管理装置102から、画像機器コマンドに対する応答を受信すると、結果通知スレッドの処理により、応答に記載された処理結果を、コマンド送信元の画像処理装置100に通知するための結果通知を生成し、画像処理装置100に対するHTTPリクエストyに記載して送信する。そして、これを受け取った画像処理装置100は、受信通知を、そのHTTPリクエストに対する応答であるHTTPレスポンスyに記載して仲介装置101に送信し、以上で画像機器コマンドAに関する一連の通信シーケンスは終了する。
When the
以上説明してきたように、この実施例の遠隔管理システムにおいても、第1の実施例の場合と同様、ファイアウォール104の内側に設けられる画像処理装置100がファイアウォール104の外側にある管理装置102にコマンドを送信してそのコマンドに対する応答を受信する場合において、管理装置102においてコマンドに対応する処理に時間を要する場合でも、管理装置102から画像処理装置100へのコマンド応答の転送のために必要な通信トラフィックを抑えながら、コマンドをタイムアウトさせずに済ませられるようにすることができる。
またその他、第1の実施形態の場合と同様な効果を有する。さらに、複数のコマンドを1つのHTTPリクエストを記載して送信したり、複数の応答を1つのHTTPレスポンスに記載して受信したりすることができるので、1つずつばらばらのHTTPメッセージに記載する場合に比べ、通信のオーバーヘッドを低減すると共に、送信すべきデータ量も低減し、第1の実施形態の場合よりも通信の負荷を低減することができる。
As described above, also in the remote management system of this embodiment, as in the case of the first embodiment, the
In addition, the same effects as those of the first embodiment are obtained. Furthermore, since multiple commands can be sent with one HTTP request written, and multiple responses can be written with one HTTP response, they can be written separately in separate HTTP messages. In comparison with the first embodiment, the communication overhead is reduced, the amount of data to be transmitted is also reduced, and the communication load can be reduced as compared with the case of the first embodiment.
〔変形例:図57〕
ここで、上述した実施形態に適用する変形例について説明する。
上述した実施形態においては、RPCを実現する上位プロトコルとしてSOAPを採用し、アプリケーションは直接プールを操作してRPCを実現しているが、アプリケーションとプールとの間にCORBA(Common Object Request Broker Architecture)やJAVA(登録商標)RMI(Remote Method Invocation)とのブリッジ(メッセージ変換機能)を備えることによってアプリケーションの開発効率をさらに向上させてもよい。
すなわち、上述した各実施形態において、各ノード間でのコマンド及びこれに対するコマンド応答のやり取りは、XMLで記述されたSOAPメッセージにより行うこととしているが、これに限るものでなく、他の形式で記述されていてもよい。
[Modification: FIG. 57]
Here, the modification applied to embodiment mentioned above is demonstrated.
In the above-described embodiment, SOAP is adopted as the upper protocol for realizing RPC, and the application directly operates the pool to realize RPC. However, CORBA (Common Object Request Broker Architecture) is provided between the application and the pool. Or a JAVA (registered trademark) RMI (Remote Method Invocation) bridge (message conversion function) may be provided to further improve application development efficiency.
That is, in each of the above-described embodiments, the exchange of commands and command responses between the nodes is performed by a SOAP message described in XML. However, the present invention is not limited to this and is described in another format. May be.
また、上述した実施形態において、被管理装置10や画像処理装置100が、仲介装置101と管理装置102との間でコマンドやコマンド応答の送受信に使用するプロトコル(ここではSOAP)に対応していない場合、仲介装置101がデータ形式を変換し、被管理装置10や画像処理装置100が対応する形式でこれらの装置との間でコマンドやコマンド応答の送受信を行うようにしてもよい。例えば、画像処理装置100がSNMP(Simple Network Management Protocol)にしか対応していない場合、仲介装置101が画像機器コマンドをMIB(Management Information Base)形式に変換して転送することが考えられる。
また、送受信するコマンドやコマンド応答の情報量に制限を設けても構わない。特に、受信するコマンドの情報量を制限するようにすると、受信側がメモリ容量の限られた装置である場合にメモリの使用量を抑えることができる。
In the above-described embodiment, the managed
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.
また、上述した第2の実施例において、SOAP標準のプロトコルだけでなく、SOAPとMIMEマルチパートを組み合わせた独自のプロトコルをもこれに加えて採用することにより、HTTPリクエスト、或いはHTTPレスポンスに含まれるSOAPエンベロープを全く独立したものとして扱うこととしているが、SOAPの関連仕様として定義されたSOAPアタッチメントによって、HTTPレスポンスに含まれる第1パートのSOAPエンベロープに、第2パート以降のSOAPエンベロープへのリンクを埋め込んでこれらを関連付けて引き渡す構成にしてもよい。SMTPを用いる電子メールの場合にも同様である。 In the second embodiment described above, 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 is treated as completely independent, but the SOAP attachment defined as the related specification of SOAP links the SOAP envelope of the first part included in the HTTP response 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を採用した例について説明したが、この下位プロトコルについても、SMTPやFTP(File Transfer Protocol)等の他のプロトコルを採用してもよい。
また、ここでは仲介装置101と管理装置102とをインターネット103を介して接続した例について説明したが、これ以外にも、有線、無線を問わず、ネットワーク通信が可能な各種通信経路を用いることができる。仲介装置101、被管理仲介装置110、被管理装置10の相互間においても、LAN以外の各種通信経路を用いることもできる。
Furthermore, as an example of adopting HTTP as a data communication protocol positioned below a higher level protocol such as SOAP, an example has been described here. However, for this lower level protocol, other protocols such as SMTP and FTP (File Transfer Protocol) are also used. It may be adopted.
In addition, although the example in which the
さらにまた、通信システムの構成についても、以上説明したものに限られることはなく、遠隔管理システム以外の通信システムにもこの発明を適用できることは、言うまでもない。管理対象の装置も、画像処理装置に限られることはない。
例えば、図1に示した遠隔管理システムにおいて、種々の電子装置に通信機能を設けた通信装置を被管理装置とし、図57に示すような遠隔管理システムを構成することが考えられる。この図においては、被管理装置の例として、テレビ受像機12aや冷蔵庫12bのようなネットワーク家電、医療機器12c,自動販売機12d,計量システム12e,空調システム12f、自動車13aや航空機13bを挙げている。
Furthermore, the configuration of the communication system is not limited to that described above, and it goes without saying that the present invention can be applied to communication systems other than the remote management system. The device to be managed is not limited to the image processing device.
For example, in the remote management system shown in FIG. 1, it is conceivable to configure a remote management system as shown in FIG. 57 by using a communication device provided with a communication function in various electronic devices as a managed device. In this figure, examples of managed devices include network home appliances such as a
また、自動車13aや航空機13bのように、広範囲を移動する装置においても、自動車や航空機そのものに仲介装置101やファイアウォール104の機能を設けて設置環境として捉え、例えば自動車13aに搭載している制御用コンピュータ、ナビゲーションシステムあるいはITS(Intelligent Transport System)端末等を、クライアントとして取り扱うことも可能である。
さらに、通信システムの構成として、クライアントが遅延通知等の機能に対応しているものであってもよいし、サーバがクライアントや仲介装置を管理する機能を有しない装置であってもよい。
また、仲介装置を多段にカスケード接続する構成にも対応可能である。あるいは、仲介装置がいずれかのクライアントと一体として構成されていてもよい。
Further, even in an apparatus that moves over a wide range, such as the
Furthermore, as a configuration of the communication system, the client may correspond to a function such as a delay notification, or the server may be an apparatus that does not have a function of managing the client or the mediation device.
Further, it is possible to cope with a configuration in which intermediary devices are cascade-connected in multiple stages. Alternatively, the mediation device may be configured integrally with any one of the clients.
また、この発明によるプログラムは、コンピュータに、ファイアウォールの内側に設けられ、そのファイアウォールの外側に設けられるサーバと、そのファイアウォールの内側に設けられる複数のクライアントとの間の通信を仲介する仲介装置を制御させるためのプログラムであり、このようなプログラムをコンピュータに実行させることにより、上述したような効果を得ることができる。 In addition, the program according to the present invention controls a mediating apparatus that mediates communication between a server provided inside a firewall and a server provided outside the firewall and a plurality of clients provided inside the firewall. 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, according to the intermediary device, communication system, communication method, program, or recording medium of the present invention, the client provided inside the firewall transmits an operation request to the server outside the firewall, and the operation When receiving an operation response to a request, even if the server takes time to process the operation request, the operation request is timed out while suppressing the communication traffic required for transferring the operation response from the server to the client. You can make it happen.
Therefore, by applying the present invention to such a communication system or an intermediary device that mediates communication in such a communication system, it is possible to configure a communication system that enables stable communication but has a low communication load. it can.
10:被管理装置
41,141,241:HTTPサーバ機能部
41a,141a,241a:HTTPリクエスト受信機能部
41b,141b,241b:HTTPレスポンス送信機能部
42,142,242:コマンド分配機能部
43,143,243:アクションハンドラ群
43a,143a,243a:アクションハンドラ
44:コマンド転送ハンドラ
45,245:HTTPクライアント機能部
45a,245a:HTTPリクエスト送信機能部
45b,245b:HTTPレスポンス受信機能部
47,147:送信メッセージ収集機能部
48,148:受信メッセージ分配機能部
49,149:応答状況管理機能部
52,201:CPU 57,206:PHY
100:画像処理装置 101:仲介装置
102:管理装置 103:インターネット
104:ファイアウォール 126:制御装置
144:結果問い合わせハンドラ
146:コマンド実行結果記憶機能部
10: Managed
DESCRIPTION OF SYMBOLS 100: Image processing apparatus 101: Mediation apparatus 102: Management apparatus 103: Internet 104: Firewall 126: Control apparatus 144: Result inquiry handler 146: Command execution result storage function part
Claims (21)
前記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、
前記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、
前記各クライアントからの動作要求を受信して前記第1の記憶手段に記憶させる第1の受信手段と、
前記第1の記憶手段から、前記サーバに送信すべき動作要求を読み出し、前記第2の記憶手段から、前記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を前記サーバに送信する第1の送信手段と、
前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、
前記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて前記第1の記憶手段に記憶させると共に、前記第1の受信手段が受信した動作要求を、前記第2の記憶手段に記憶させる分配手段と、
前記第1の記憶手段から、前記クライアントに送信すべき動作応答を読み出し、前記クライアントに送信する第2の送信手段と、
前記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて前記第2の記憶手段に記憶させる処理手段とを設けたことを特徴とする仲介装置。 An intermediary device that mediates communication between a server and a plurality of clients ,
First storage means for storing an operation request from the client and an operation response to the operation request;
Second storage means for storing an operation request from the server and an operation response to the operation request;
First receiving means for receiving an operation request from each client and storing the operation request in the first storage means;
The operation request to be transmitted to the server is read from the first storage unit, the operation response in a state that can be transmitted to the server is read from the second storage unit, and the operation request and the operation response are read from the server. First transmitting means for transmitting to
When the first transmission means has access to the server, at the server, what has become transmittable state in the operation response and operation request from the server to any of the operation request sent so far A second receiving means for receiving the operation response and the operation request , if any,
The operation response received by the first reception unit is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first reception unit is stored in the second storage. Distribution means to be stored in the means;
Second transmission means for reading out an operation response to be transmitted to the client from the first storage means and transmitting the response to the client;
Processing means for executing a process according to the operation request stored in the second storage means, obtaining an operation response to the operation request, and storing the response in association with the operation request in the second storage means; An intermediary device characterized by comprising
前記第2の受信手段が、前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段であることを特徴とする仲介装置。 The intermediary device according to claim 1,
When the first transmission means accesses the server, the second receiving means can transmit the operation response to any of the operation requests transmitted so far and the operation request from the server. An intermediary device, characterized in that when there are a plurality of devices in a certain state, the plurality of operation responses and operation requests are collectively received.
前記第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまで、前記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に前記サーバにアクセスする手段であることを特徴とする仲介装置。 The intermediary device according to claim 1 or 2,
It said first transmission means, said after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, whether or operation requests and operation responses to be transmitted to the server And a means for periodically accessing the server.
前記第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で前記サーバにアクセスする手段を有することを特徴とする仲介装置。 The intermediary device according to claim 3,
It said first transmitting means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, accesses the server at intervals shorter than the other period mediating apparatus characterized by having means.
前記クライアントから動作要求を受信した場合に、該クライアントに対して受信通知を送信する受信通知手段を設けたことを特徴とする仲介装置。 The intermediary device according to any one of claims 1 to 4,
An intermediary apparatus, comprising: a reception notification means for transmitting a reception notification to the client when an operation request is received from the client.
前記仲介装置に、
前記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、
前記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、
前記各クライアントからの動作要求を受信して前記第1の記憶手段に記憶させる第1の受信手段と、
前記第1の記憶手段から、前記サーバに送信すべき動作要求を読み出し、前記第2の記憶手段から、前記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を前記サーバに送信する第1の送信手段と、
前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、
前記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて前記第1の記憶手段に記憶させると共に、前記第1の受信手段が受信した動作要求を、前記第2の記憶手段に記憶させる分配手段と、
前記第1の記憶手段から、前記クライアントに送信すべき動作応答を読み出し、前記クライアントに送信する第2の送信手段と、
前記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて前記第2の記憶手段に記憶させる処理手段とを設け、
前記各クライアントに、
前記動作要求を前記仲介装置に送信する送信手段と、
その送信した動作要求に対する動作応答を前記仲介装置から受信する受信手段とを設け、
前記サーバに、
前記仲介装置から送信されてきた動作要求とその動作要求に対する動作応答とを記憶する第3の記憶手段と、
前記仲介装置に送信する動作要求とその動作要求に対する動作応答とを記憶する第4の記憶手段と、
前記仲介装置から動作要求及び動作応答を受信する第3の受信手段と、
前記第3の受信手段が受信した動作要求を前記第3の記憶手段に記憶させると共に、前記第3の受信手段が受信した動作応答を、対応する動作要求と対応付けて第4の記憶手段に記憶させる分配手段と、
前記第3の記憶手段が記憶している動作要求に係る動作を実行して動作応答を生成し、その動作要求と対応付けて前記第3の記憶手段に記憶させる手段と、
前記仲介装置に送信する動作要求を生成して前記第4の記憶手段に記憶させる手段と、
前記仲介装置からアクセスされた場合に、前記第3の記憶手段から、該仲介装置から受信したいずれかの動作要求に対する動作応答であって送信可能な状態のものを読み出し、前記第4の記憶手段から、該仲介装置に送信できる状態の動作要求を読み出し、それらの動作要求及び動作応答を該仲介装置に送信する第3の送信手段とを設けたことを特徴とする通信システム。 A communication system comprising a server, a plurality of clients, and an intermediary device that mediates communication between the server and the plurality of clients ,
In the mediating device,
First storage means for storing an operation request from the client and an operation response to the operation request;
Second storage means for storing an operation request from the server and an operation response to the operation request;
First receiving means for receiving an operation request from each client and storing the operation request in the first storage means;
The operation request to be transmitted to the server is read from the first storage unit, the operation response in a state that can be transmitted to the server is read from the second storage unit, and the operation request and the operation response are read from the server. First transmitting means for transmitting to
When the first transmission means has access to the server, at the server, what has become transmittable state in the operation response and operation request from the server to any of the operation request sent so far A second receiving means for receiving the operation response and the operation request , if any,
The operation response received by the first reception unit is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first reception unit is stored in the second storage. Distribution means to be stored in the means;
Second transmission means for reading out an operation response to be transmitted to the client from the first storage means and transmitting the response to the client;
Processing means for executing a process according to the operation request stored in the second storage means, obtaining an operation response to the operation request, and storing the response in association with the operation request in the second storage means; Provided,
For each client,
Transmitting means for transmitting the operation request to the mediating device;
A receiving means for receiving an operation response to the transmitted operation request from the intermediary device;
To the server,
Third storage means for storing an operation request transmitted from the mediation device and an operation response to the operation request;
Fourth storage means for storing an operation request to be transmitted to the intermediary device and an operation response to the operation request;
Third receiving means for receiving an operation request and an operation response from the intermediary device;
The operation request received by the third receiving unit is stored in the third storage unit, and the operation response received by the third receiving unit is associated with the corresponding operation request in the fourth storage unit. Distribution means for storing;
Means for executing an action related to the action request stored in the third storage means to generate an action response, and storing the action response in association with the action request;
Means for generating an operation request to be transmitted to the intermediary device and storing it in the fourth storage means;
When accessed from the intermediary device, the third storage means reads out an operation response to any of the operation requests received from the intermediary device in a transmittable state, and the fourth storage means And a third transmission means for reading out the operation requests ready to be transmitted to the mediation device and transmitting the operation requests and the response to the mediation device .
前記仲介装置の第2の受信手段が、前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段であり、
前記サーバの送信手段が、前記仲介装置からアクセスされた場合に、その仲介装置から受信した動作要求に対する動作応答及びその仲介装置に送信する動作要求が複数送信可能な状態であれば、それらの動作応答及び動作要求を該仲介装置に複数一括して送信する手段であることを特徴とする通信システム。 The communication system according to claim 6, wherein
When the first receiving means accesses the server, the second receiving means of the intermediary device, in the server, sends an operation response to any of the operation requests transmitted so far and an operation request from the server. If the ones out has become transmittable state there is a plurality, a means for receiving a plurality collectively their operation response and operation request,
When the transmission means of the server is accessed from the mediation device , if the operation response to the operation request received from the mediation device and a plurality of operation requests to be transmitted to the mediation device can be transmitted , those operations A communication system, characterized in that a plurality of responses and operation requests are transmitted to the intermediary device in a lump.
前記仲介装置において、第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまで、前記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に前記サーバにアクセスする手段であることを特徴とする通信システム。 The communication system according to claim 6 or 7,
In the intermediary device, the first transmission means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, the operation requests and the operation responses to be transmitted to the server A communication system characterized by being means for periodically accessing the server regardless of the presence or absence .
前記仲介装置の前記第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で前記サーバにアクセスする手段を有することを特徴とする通信システム。 The communication system according to claim 8, wherein
The first transmission means of the mediation device, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, the at shorter intervals than the other period A communication system comprising means for accessing a server.
前記仲介装置に、前記クライアントから動作要求を受信した場合に、該クライアントに対して受信通知を送信する受信通知手段を設け、
前記各クライアントに、該受信通知を受信する手段を設けたことを特徴とする通信システム。 The communication system according to any one of claims 6 to 9,
When receiving an operation request from the client, the intermediary device is provided with a reception notification means for transmitting a reception notification to the client,
A communication system, wherein each client is provided with means for receiving the reception notification.
前記仲介装置に、
前記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段を用意する手順と、
前記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段を用意する手順と、
前記各クライアントからの動作要求を受信して前記第1の記憶手段に記憶させる第1の受信手順と、
前記第1の記憶手段から、前記サーバに送信すべき動作要求を読み出し、前記第2の記憶手段から、前記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を前記サーバに送信する第1の送信手順と、
前記第1の送信手順で前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手順と、
前記第1の受信手順で受信した動作応答を、対応する動作要求と対応付けて前記第1の記憶手段に記憶させると共に、前記第1の受信手段が受信した動作要求を、前記第2の記憶手段に記憶させる分配手順と、
前記第1の記憶手段から、前記クライアントに送信すべき動作応答を読み出し、前記クライアントに送信する第2の送信手順と、
前記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて前記第2の記憶手段に記憶させる処理手順とを実行させるようにしたことを特徴とする通信方法。 A communication method in which communication between a server and a plurality of clients is mediated by an intermediary device ,
In the mediating device,
A procedure for preparing first storage means for storing an operation request from the client and an operation response to the operation request;
A procedure for preparing second storage means for storing an operation request from the server and an operation response to the operation request;
A first reception procedure for receiving an operation request from each of the clients and storing the operation request in the first storage unit;
The operation request to be transmitted to the server is read from the first storage unit, the operation response in a state that can be transmitted to the server is read from the second storage unit, and the operation request and the operation response are read from the server. A first transmission procedure to transmit to
When accessing the server by the first transmission procedure in the server, what has become transmittable state in the operation response and operation request from the server to any of the operation request sent so far A second reception procedure for receiving the operation response and the operation request , if any,
The operation response received in the first reception procedure is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first reception unit is stored in the second storage. A distribution procedure to be stored in the means;
A second transmission procedure for reading an operation response to be transmitted to the client from the first storage means and transmitting the response to the client;
A processing procedure for executing a process according to the operation request stored in the second storage means, obtaining an operation response to the operation request, and storing the response in the second storage means in association with the operation request; A communication method characterized in that the method is executed.
前記仲介装置に実行させる前記第2の受信手順が、前記第1の送信手順で前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手順であることを特徴とする通信方法。 The communication method according to claim 11, comprising:
When the second reception procedure to be executed by the mediation apparatus accesses the server in the first transmission procedure , the server receives an operation response to any of the operation requests transmitted so far, and from the server. A communication method characterized in that when there are a plurality of operation requests in a transmittable state, a plurality of operation responses and operation requests are collectively received.
前記第1の送信手順が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまで、前記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に前記サーバにアクセスする手順を有することを特徴とする通信方法。 The communication method according to claim 11 or 12,
Said first transmission procedure, after sending the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, whether or operation request to be sent to the server and operating response And a procedure for periodically accessing the server.
前記第1の送信手順が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で前記サーバにアクセスする手順を有することを特徴とする通信方法。 The communication method according to claim 13, comprising:
It said first transmission procedure, after sending the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, accesses the server at intervals shorter than the other period communication method characterized by having a step.
前記仲介装置に、さらに、前記クライアントから動作要求を受信した場合に、該クライアントに対して受信通知を送信する受信通知手順を実行させるようにしたことを特徴とする仲介装置。 The communication method according to any one of claims 11 to 14,
The intermediary apparatus, further comprising: a reception notification procedure for transmitting a reception notification to the client when an operation request is received from the client.
前記クライアントからの動作要求とその動作要求に対する動作応答とを記憶する第1の記憶手段と、
前記サーバからの動作要求とその動作要求に対する動作応答とを記憶する第2の記憶手段と、
前記各クライアントからの動作要求を受信して前記第1の記憶手段に記憶させる第1の受信手段と、
前記第1の記憶手段から、前記サーバに送信すべき動作要求を読み出し、前記第2の記憶手段から、前記サーバに送信可能な状態の動作応答を読み出し、それらの動作要求及び動作応答を前記サーバに送信する第1の送信手段と、
前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものがあった場合に、その動作応答及び動作要求を受信する第2の受信手段と、
前記第1の受信手段が受信した動作応答を、対応する動作要求と対応付けて前記第1の記憶手段に記憶させると共に、前記第1の受信手段が受信した動作要求を、前記第2の記憶手段に記憶させる分配手段と、
前記第1の記憶手段から、前記クライアントに送信すべき動作応答を読み出し、前記クライアントに送信する第2の送信手段と、
前記第2の記憶手段に記憶されている動作要求に従った処理を実行してその動作要求に対する動作応答を取得し、その動作要求と対応付けて前記第2の記憶手段に記憶させる処理手段として機能させるためのプログラム。 A computer that controls an intermediary device that mediates communication between a server and a plurality of clients ;
First storage means for storing an operation request from the client and an operation response to the operation request;
Second storage means for storing an operation request from the server and an operation response to the operation request;
First receiving means for receiving an operation request from each client and storing the operation request in the first storage means;
The operation request to be transmitted to the server is read from the first storage unit, the operation response in a state that can be transmitted to the server is read from the second storage unit, and the operation request and the operation response are read from the server. First transmitting means for transmitting to
When the first transmission means has access to the server, at the server, what has become transmittable state in the operation response and operation request from the server to any of the operation request sent so far A second receiving means for receiving the operation response and the operation request , if any,
The operation response received by the first reception unit is stored in the first storage unit in association with the corresponding operation request, and the operation request received by the first reception unit is stored in the second storage. Distribution means to be stored in the means;
Second transmission means for reading out an operation response to be transmitted to the client from the first storage means and transmitting the response to the client;
As processing means for executing processing according to the operation request stored in the second storage means, obtaining an operation response to the operation request, and storing it in the second storage means in association with the operation request A program to make it work.
前記第2の受信手段が、前記第1の送信手段が前記サーバにアクセスした際、そのサーバにおいて、それまでに送信したいずれかの動作要求に対する動作応答及び前記サーバからの動作要求のうち送信可能な状態になっているものが複数あった場合に、それらの動作応答及び動作要求を複数一括して受信する手段であることを特徴とするプログラム。 The program according to claim 16, wherein
When the first transmission means accesses the server, the second receiving means can transmit the operation response to any of the operation requests transmitted so far and the operation request from the server. A program characterized by being means for collectively receiving a plurality of operation responses and operation requests when there are a plurality of items in a different state.
前記第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまで、前記サーバに送信すべき動作要求及び動作応答の有無に関わらず、定期的に前記サーバにアクセスする手段であることを特徴とするプログラム。 The program according to claim 16 or 17,
It said first transmission means, said after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, whether or operation requests and operation responses to be transmitted to the server not, the program, which is a means for accessing periodically to the server.
前記第1の送信手段が、前記サーバに動作要求を送信した後、該サーバに送信した全ての動作要求に対する動作応答を受信するまでは、それ以外の期間よりも短い間隔で前記サーバにアクセスする手段を有することを特徴とするプログラム。 The program according to claim 18, wherein
It said first transmitting means, after transmitting the operation request to the server, until it receives an operational response to all the operation requests transmitted to the server, accesses the server at intervals shorter than the other period a program characterized by having means.
前記コンピュータを、前記クライアントから動作要求を受信した場合に、該クライアントに対して受信通知を送信する受信通知手段として機能させるためのプログラムを更に含むことを特徴とするプログラム。 A program according to any one of claims 16 to 19,
A program for causing the computer to function as reception notification means for transmitting a reception notification to the client when an operation request is received from the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005105313A JP4382006B2 (en) | 2004-03-31 | 2005-03-31 | Mediation apparatus, communication system, communication method, program, and recording medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004108281 | 2004-03-31 | ||
JP2005105313A JP4382006B2 (en) | 2004-03-31 | 2005-03-31 | Mediation apparatus, communication system, communication method, program, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005316991A JP2005316991A (en) | 2005-11-10 |
JP4382006B2 true JP4382006B2 (en) | 2009-12-09 |
Family
ID=35444297
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005105313A Active JP4382006B2 (en) | 2004-03-31 | 2005-03-31 | Mediation apparatus, communication system, communication method, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4382006B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1710694A3 (en) | 2005-04-08 | 2006-12-13 | Ricoh Company, Ltd. | Communication apparatus, program product for adding communication mechanism to communication apparatus for providing improved usability and communication efficiency, and recording medium storing program product |
JP4704105B2 (en) | 2005-05-24 | 2011-06-15 | 株式会社リコー | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD |
JP5966269B2 (en) * | 2011-07-25 | 2016-08-10 | 株式会社リコー | Mediation device, management system and program |
JP6399210B2 (en) * | 2015-03-27 | 2018-10-03 | 三菱電機株式会社 | Proxy response device, proxy response system, and proxy response method |
JP2020123072A (en) | 2019-01-29 | 2020-08-13 | 株式会社リコー | Resource reservation system, setting method, and program |
-
2005
- 2005-03-31 JP JP2005105313A patent/JP4382006B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2005316991A (en) | 2005-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7600050B2 (en) | Information processing apparatus, information processing apparatus control method, information processing program, and network system | |
JP4019038B2 (en) | Communication device, communication device remote management system, communication device control method, and program | |
US7587496B2 (en) | Transfer device, distributed processing system, transfer device control method, program, and recording medium | |
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 | |
US20070165265A1 (en) | System using services, image handling apparatus, external processing apparatus, information processing apparatus, and state change sending method | |
JP4704105B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD | |
US20070032888A1 (en) | Control apparatus, communication device, and communication method | |
JP5448542B2 (en) | Information processing apparatus, control method, and program | |
CN101431456A (en) | Upnp-based network system and control method thereof | |
JP4382006B2 (en) | Mediation apparatus, communication system, communication method, program, and recording medium | |
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 | |
JP2009289041A (en) | Information processor, control method of information processor, and computer program | |
JP2004139586A (en) | Mediation device, communication system, method for controlling mediation device, program and recording medium | |
JP4030943B2 (en) | Image processing apparatus, image processing system, control method for image processing apparatus, program, and recording medium | |
JP2005322222A (en) | Communication function adding method, program, storage medium and communication apparatus | |
JP4160480B2 (en) | Mediation device, communication system, mediation device control method, program, and recording medium | |
JP2004220448A (en) | Information providing device, information providing method, information providing system and information providing program | |
JP2005259106A (en) | Mediating device, distributed processing system, data transfer method, program, and recording medium | |
US20110225321A1 (en) | Image processing device, device management system, and image processing method | |
JP2005259105A (en) | Mediating device, communication system, control method of mediating device, program, and recording medium | |
JP4198562B2 (en) | Communication client, communication server, communication system, and communication method | |
JP5562161B2 (en) | Management system, image forming apparatus, information processing method, and program | |
JP2004139565A (en) | Communication method | |
JP2004140803A (en) | Communication client, method of controlling communication client, program, and recording medium therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070806 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081209 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090209 |
|
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: 20090915 |
|
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: 20090916 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121002 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4382006 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: 20121002 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131002 Year of fee payment: 4 |