JP2006244428A - Session management method and session management system - Google Patents
Session management method and session management system Download PDFInfo
- Publication number
- JP2006244428A JP2006244428A JP2005063152A JP2005063152A JP2006244428A JP 2006244428 A JP2006244428 A JP 2006244428A JP 2005063152 A JP2005063152 A JP 2005063152A JP 2005063152 A JP2005063152 A JP 2005063152A JP 2006244428 A JP2006244428 A JP 2006244428A
- Authority
- JP
- Japan
- Prior art keywords
- session
- information
- session management
- application
- management table
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、分散環境においてクライアントアプリケーションとサーバアプリケーション間の論理的な接続関係を示すセッションを管理する技術に関する。 The present invention relates to a technique for managing a session indicating a logical connection relationship between a client application and a server application in a distributed environment.
近年の著しいインターネットの普及に伴い、従来は独自のインタフェースを使っていたクライアントサーバシステムにおけるクライアントとサーバ間のインタフェースを標準のプロトコルであるHTTP(Hypertext Transfer Protocol)/HTML(Hypertext Markup Language)に準拠させ、特定のクライアントのプラットフォームに依存することなく、クライアントのWebブラウザからサーバのサービスであるWebアプリケーションを利用可能にする動きが急速に広がっている。 Accompanying the remarkable spread of the Internet in recent years, the interface between the client and the server in the client-server system that used the original interface has been made compliant with the standard protocol HTTP (Hypertext Transfer Protocol) / HTML (Hypertext Markup Language). The movement to make a web application that is a server service available from a client web browser is rapidly expanding without depending on a specific client platform.
また、XML(Extensible Markup Language)、SOAP(Simple Object Access Protocol)、HTTPといったインターネット標準技術を利用してクライアントアプリケーションと直接データ交換を行うWebサービスが普及し始めている。 In addition, Web services that directly exchange data with client applications using Internet standard technologies such as XML (Extensible Markup Language), SOAP (Simple Object Access Protocol), and HTTP are beginning to spread.
これらのネットワーク上で行われるデータ交換においては、セッション管理が行われている。上述のHTTPプロトコルでは、クライアントのアプリケーションからWebサーバへリクエストされる毎に、クライントとサーバとの間でコネクションが成立し、リクエストに対するレスポンスが行われ、通信が終了した後、そのコネクションは切断される。 In data exchange performed on these networks, session management is performed. In the above HTTP protocol, every time a client application requests a Web server, a connection is established between the client and the server, a response to the request is made, and the communication is terminated, and then the connection is disconnected. .
つまり、「接続、通信、切断」という一連の処理が行われる。この一連の処理を「セッション」と呼ぶ。一つのセッションの間にやり取りされる情報は、そのセッションが終了すると無効になる。そのため、1つのセッションの情報を次のセッションに持ち越すことはできない。 That is, a series of processes “connection, communication, disconnection” are performed. This series of processing is called a “session”. Information exchanged during one session becomes invalid when the session ends. Therefore, the information of one session cannot be carried over to the next session.
しかしながら、複数のセッション間で情報を共有するために、複数のセッションを一つのセッションとして管理したい場合がある。例えば、ショッピングサイトで商品購入までの一連の処理である「ログイン」、「商品選択」、「清算処理」、「ログアウト」などが別々のセッションとなると、ログインしたユーザの情報、選択した商品の情報、清算情報、ログアウト情報がお互いに関連した情報であることが分からず、ショッピングとしての処理が成立しない。そのため、複数のセッションを一つのセッションとして管理する必要がでてくる。このように、一連の処理を一つのセッションとして管理する仕組みのことをセッション管理という。 However, in order to share information among a plurality of sessions, there are cases where it is desired to manage a plurality of sessions as one session. For example, if "Login", "Product selection", "Clearing process", "Logout", etc., which are a series of processes until product purchase at the shopping site, become separate sessions, the logged-in user information and the selected product information In this case, it is not known that the clearing information and the logout information are related to each other, and shopping processing is not established. Therefore, it is necessary to manage a plurality of sessions as one session. In this way, a mechanism for managing a series of processes as one session is called session management.
このセッション管理を実現する一般的な方法として、例えばセッションを識別する情報としてサーバが発行するセッションIDを利用するものがある。これは、クライアントからサーバへのリクエストに対するレスポンスに付加されるセッションIDをクライアントが保持しておき、次の処理に対するリクエストを送信する際に、保持したセッションIDを付加するものである。 As a general method for realizing this session management, for example, there is a method using a session ID issued by a server as information for identifying a session. In this method, a client holds a session ID added to a response to a request from the client to the server, and the held session ID is added when a request for the next process is transmitted.
サーバアプリケーションは、このセッションIDに基づいてセッション単位で保持されている情報を用いた処理を行い、レスポンスを行う。通常、クライアントアプリケーションでは、セッションを張るか否かを設定することができ、セッションを張らない設定にして処理を実行した場合は、セッションIDを付加せずにリクエストを送信する。そして、それに対するレスポンスにセッションIDが付加されていたとしても、そのセッションIDを保持せずにセッションを終了する。 Based on this session ID, the server application performs processing using information held in units of sessions and makes a response. Normally, a client application can set whether or not to set up a session. When processing is executed with a setting that does not set up a session, a request is sent without adding a session ID. Even if a session ID is added to the response to the response, the session is terminated without holding the session ID.
また、セッション管理に関して、特にサーバ側がWebサービスである場合、クライアント側で細かい制御ができることが望まれている。なぜならば、WebサービスはWebアプリケーションのように一連の処理を一つのフローとして提供するというよりも、処理の一部を提供するものとして扱うことができ、クライアントが、単数或いは複数のWebサービスが提供する様々なサービスを組み合わせて使用するという形態が成立し、クライアント側が主体となってフローを構成するためである。 Regarding session management, it is desired that fine control can be performed on the client side, particularly when the server side is a Web service. This is because a Web service can be treated as providing a part of processing rather than providing a series of processing as a single flow like a Web application, and a client can provide one or more Web services. This is because a form in which various services are used in combination is established, and the flow is formed mainly by the client side.
ところで、従来、マルチプロセス環境でクライアントアプリケーションを実行する場合、アクセス先が同じサーバであったとしても、セッションIDはプロセス毎に保存される。そのため、複数のクライアントアプリケーションが存在しても、それぞれのクライアントアプリケーションで独立したセッションを保持して一連の処理を実行することができる。また、逆にプロセス毎に独立したセッションを扱うのではなく、アプリケーション同士が意図して共通のセッションを扱うための提案がされており(例えば、特許文献1を参照)、セッション管理の単位を制御することが可能になっている。
組み込み機器には、シングルプロセスで動作するアプリケーションプラットフォーム上に複数のアプリケーションを起動するアーキテクチャを持つものがある。このようなアーキテクチャ上でアプリケーションから共通に利用できる共通ライブラリでセッション管理を行う場合、異なるクライアントアプリケーションから同じサーバに対してアクセス要求されても、共通ライブラリからはどのクライアントアプリケーションからのアクセス要求かを判別することができない。そのため、クライアントアプリケーション間で意図せずに同じセッションIDが利用されてしまう。 Some embedded devices have an architecture for starting a plurality of applications on an application platform that operates in a single process. When session management is performed with a common library that can be used in common by applications on such an architecture, even if access requests are made to the same server from different client applications, it is determined from which client applications the common library is requesting access. Can not do it. Therefore, the same session ID is used unintentionally between client applications.
即ち、異なるクライアントアプリケーションから同一のWebサービスにアクセスした場合、それぞれ異なるクライアントアプリケーションであるにも係らず、同じセッションとしてWebサービスの処理が行われてしまい、独立したクライアントアプリケーションとして動作することができない、という問題がある。 That is, when the same web service is accessed from different client applications, the web service is processed as the same session regardless of the different client applications, and cannot operate as an independent client application. There is a problem.
また、従来、クライアントアプリケーションからセッションを柔軟に扱うことが困難であった。クライアントアプリケーションからより柔軟にセッションを管理する際に、クライアントアプリケーションが一旦終了した場合であっても、再起動後に前回のセッションで継続して処理を行うこと、また逆に、再起動時には新たなセッションを開始することをクライアントアプリケーションから選択できる柔軟性が望まれている。 Conventionally, it has been difficult to handle a session flexibly from a client application. When managing a session more flexibly from a client application, even if the client application is once terminated, processing continues in the previous session after restart, and conversely, a new session is restarted It is desirable to have the flexibility to select from the client application to initiate.
通常、クライアントアプリケーションでは、Webサービスライブラリを介してWebサービスを利用する。Webサービスライブラリは、クライアントとWebサービス間で相互にやり取りするSOAPメッセージの生成や解析を行うモジュールである。クライアントアプリケーションはこのモジュールを呼び出すインタフェースとなるオブジェクトを生成してWebサービスとのデータ交換を行う。 Normally, a client application uses a web service via a web service library. The Web service library is a module that generates and analyzes a SOAP message that is exchanged between the client and the Web service. The client application generates an object as an interface for calling this module and exchanges data with the Web service.
クライアントアプリケーションが一つのサーバアプリケーションに対してセッションを保持しながら複数のセッションを張るような処理を行う場合、張りたいセッションの数だけオブジェクトを生成していた。しかし、リソースの少ない機器上では非効率になる。 When a client application performs processing such as holding a plurality of sessions while holding a session for one server application, objects are generated for the number of sessions desired. However, it becomes inefficient on devices with few resources.
更に、クライアントアプリケーションから柔軟にセッションを管理する際に、保持されているセッションIDの初期化をクライアントアプリケーションで行うことが望まれる。 Furthermore, when a session is flexibly managed from a client application, it is desired that the held session ID is initialized by the client application.
また、組み込み機器のようなリソースの限られている環境では、アプリケーション実行時に、なるべくメモリを消費しないように、オブジェクトの生成数を少なくすることが求められる。しかしながら、同じサーバに対して新たなセッションを開始しようとした場合、サーバにアクセスするためのモジュールを呼び出すオブジェクトを新たに生成し、そのオブジェクトを使用してアクセスする必要があった。 Further, in an environment where resources are limited such as an embedded device, it is required to reduce the number of generated objects so that memory is not consumed as much as possible when an application is executed. However, when trying to start a new session for the same server, it is necessary to newly generate an object that calls a module for accessing the server and to access the object using the object.
本発明は上述の課題を解決するためになされたもので、クライアントアプリケーション毎にセッションの管理を可能とすることを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to enable session management for each client application.
また、本発明は、クライアント側で持続的にセッションの管理を行えるようにすることを目的とする。 Another object of the present invention is to enable continuous session management on the client side.
更に、本発明は、クライアント側で管理しているセッションの初期化を可能とすることを目的とする。 Another object of the present invention is to enable initialization of a session managed on the client side.
本発明は、クライアントアプリケーションとサーバアプリケーション間で送受信されるセッション情報とクライアント側で取得したセッション管理情報とを関連付けて記憶するセッション管理テーブルを用いて前記クライアントアプリケーションとサーバアプリケーション間の論理的な接続関係を示すセッションを管理するセッション管理方法であって、前記クライアントアプリケーションからサーバアプリケーションへのリクエストに付加するセッション情報を前記セッション管理情報に基づいて前記セッション管理テーブルから検索して取得するセッション情報検索工程と、前記サーバアプリケーションから受信したセッション情報を記憶する場合、リクエスト時に前記クライアント側で取得したセッション管理情報と該セッション情報とを関連付けて前記セッション管理テーブルに記憶するセッション情報記憶工程とを有することを特徴とする。 The present invention provides a logical connection relationship between the client application and the server application using a session management table that stores session information transmitted and received between the client application and the server application and session management information acquired on the client side in association with each other. A session management method for managing a session indicating a session information search step for retrieving and acquiring session information to be added to a request from the client application to the server application from the session management table based on the session management information; When storing session information received from the server application, the session management information acquired on the client side at the time of request and the session information Characterized in that the association and a session information storage step of storing the session management table.
また、本発明は、クライアントアプリケーションとサーバアプリケーション間で送受信されるセッション情報とクライアント側で取得したセッション管理情報とを関連付けて記憶するセッション管理テーブルを用いて前記クライアントアプリケーションとサーバアプリケーション間の論理的な接続関係を示すセッションを管理するセッション管理装置であって、前記クライアントアプリケーションからサーバアプリケーションへのリクエストに付加するセッション情報を前記セッション管理情報に基づいて前記セッション管理テーブルから検索して取得するセッション情報検索手段と、前記サーバアプリケーションから受信したセッション情報を記憶する場合、リクエスト時に前記クライアント側で取得したセッション管理情報と該セッション情報とを関連付けて前記セッション管理テーブルに記憶するセッション情報記憶手段とを有することを特徴とする。 Further, the present invention provides a logical connection between the client application and the server application using a session management table that stores session information transmitted and received between the client application and the server application in association with session management information acquired on the client side. A session management device that manages a session indicating a connection relationship, and retrieves session information to be added to a request from the client application to a server application from the session management table based on the session management information and acquires the session information search And session management information received on the client side at the time of the request and the session information received from the server application. And having a session information storage means for storing in said session management table in association with the information.
本発明によれば、クライアントとサーバとの間の論理的な接続関係を示すセッションをクライアント側で柔軟に管理することが可能となる。 According to the present invention, it is possible to flexibly manage a session indicating a logical connection relationship between a client and a server on the client side.
以下、図面を参照しながら発明を実施するための最良の形態について詳細に説明する。 The best mode for carrying out the invention will be described below in detail with reference to the drawings.
本実施形態を説明する前に、まずWebサービスにおける処理の概略について説明する。図1は、Webサービスが行われるシステムの構成の一例を示す図である。図1に示すように、Webサービスが行われるシステムは、Webサービスを利用するクライアントアプリケーション101、スタブ(Stub)オブジェクト102、Webサービスライブラリ103、通信ライブラリ104、ネットワーク105、及びWebサービスを提供するサーバアプリケーション106で構成されている。
Before describing this embodiment, an outline of processing in a Web service will be described first. FIG. 1 is a diagram illustrating an example of a configuration of a system in which a Web service is performed. As shown in FIG. 1, a system in which a web service is performed includes a
尚、クライアント側のアプリケーションやライブラリなどは、パーソナルコンピュータなどのコンピュータや組み込み機器においてオペレーティングシステム(OS)によって実行されるプログラムである。また、サーバ側の構成については詳細に示していないが、Webサービスを提供する際に必要なライブラリやモジュールはクライアント側と同様に備えられているものとする。 The client-side applications, libraries, and the like are programs executed by an operating system (OS) in a computer such as a personal computer or an embedded device. Further, although the configuration on the server side is not shown in detail, it is assumed that libraries and modules necessary for providing the Web service are provided in the same manner as on the client side.
また、クライアントやサーバとして機能するコンピュータは汎用のコンピュータで良く、ここでの説明は省略する。 The computer functioning as a client or server may be a general-purpose computer, and a description thereof is omitted here.
スタブオブジェクト102は、クライアントアプリケーション101からはメソッドの呼び出し先となるモジュールであり、更にクライアントアプリケーション101とWebサービスライブラリ103との間で引数や返値の型変換を行う。このスタブオブジェクト102のクラスは、WSDL(Web Services Description Language)で記述されたサービス仕様からスタブ生成プログラムにより自動的に生成されたものであり、提供するメソッドにより、異なるスタブオブジェクト102a、102bが存在する。また同じメソッドを提供する場合でも、クライアントアプリケーション毎に別のスタブオブジェクト102、102aが存在する。
The
上述のWSDLはXMLをベースとするWebサービス記述言語であり、W3C(World Wide Web Consortium)で策定されている。このWSDLは、Webサービスがどのような機能を持つのか、それを利用するためにはどのような要求をすれば良いのか、などを記述する方法を定義している。 The above-mentioned WSDL is a Web service description language based on XML, and is formulated by W3C (World Wide Web Consortium). This WSDL defines a method for describing what functions a Web service has and what requests it should make in order to use it.
Webサービスライブラリ103は、スタブオブジェクト102からのメソッド呼び出しとSOAPメッセージとを相互に変換するモジュールである。
The
通信ライブラリ104は、ネットワーク105を通じてサーバアプリケーション106との通信を行うモジュールであり、HTTPなどを使用して通信を行う。
The
サーバアプリケーション106は、クライアントから送られたSOAPメッセージに基づき実際にサービスを提供するモジュールであり、処理の結果をSOAPメッセージとしてクライアントに返送する。
The
このWebサービスの処理では、クライアントアプリケーション101からはスタブオブジェクト102のみ見え、サーバアプリケーション106ではなくスタブオブジェクト102が処理の提供者として認識される。
In this Web service processing, only the
よって、Webサービスを利用するに当たり、クライアントアプリケーション101は、まずスタブオブジェクト102の取得を行う。一度取得したスタブオブジェクト102はWebサービスで提供されるメソッドの呼び出しに何度でも使用できる。
Therefore, when using the Web service, the
次に、クライアントアプリケーション101はスタブオブジェクト102に対して所望のサーバアプリケーション106のURL(Uniformed Resource Locater)を設定する。尚、同じサービスを提供しURLが異なるサーバアプリケーション106aを使用しないのであれば,この処理は一度行えば良い。また、URLが異なるサーバアプリケーション106aを使用する場合は、この処理を再度行えば良い。
Next, the
次に、クライアントアプリケーション101がWebサービスを使用するために、スタブオブジェクト102のメソッドを呼び出す(処理111)。一方、スタブオブジェクト102は、呼び出されたメソッドの引数をWebサービスライブラリ103で処理できるオブジェクトに変換し、Webサービスライブラリ103を呼び出す(処理112)。
Next, in order to use the Web service, the
ここで、Webサービスライブラリ103はスタブオブジェクト102からのメソッド呼び出しをSOAPのメッセージに変換し、通信ライブラリ104に対して送信を依頼する(処理113)。
Here, the
通信ライブラリ104は、HTTPプロトコルを用いてネットワーク105を通じてサーバアプリケーション106に対してSOAPメッセージを送信する(処理114)。
The
これにより、サーバアプリケーション106は受信したSOAPメッセージを解釈し、所定の処理を行い、その結果をSOAPメッセージとしてHTTPプロトコルを用いて通信ライブラリ104に送信する(処理115)。
Accordingly, the
通信ライブラリ104は、受信したSOAPメッセージをWebサービスライブラリ103に渡す(処理116)。そして、通信ライブラリ104からSOAPメッセージを受け取ったWebサービスライブラリ103は、SOAPメッセージをメソッド呼び出しに対する応答に変換し、スタブオブジェクト102に返す(処理117)。
The
スタブオブジェクト102はWebサービスライブラリ103から返ってきたメソッド呼び出しに対する応答の返値をクライアントアプリケーション101の求める型に変換し、クライアントアプリケーション101に返す(処理118)。
The
以上の処理により、クライアントアプリケーション101からは、通常のメソッド呼び出しを行うだけで、ネットワーク105上にあるサーバアプリケーション106に対して処理を要求し、返答を得ることができる。
With the above processing, the
また、クライアントアプリケーション101は、同じサーバアプリケーション106を利用するのであれば、上述した処理111を繰り返せば良い。
Further, if the
上述した処理はWebサービスの実装方法の一例であり、スタブオブジェクト102を使用しない実装も存在する。しかしながら、クライアントアプリケーション101からのメソッド呼び出しをSOAPメッセージに変換してサーバアプリケーション106に送信し、サーバアプリケーション106から返送されたSOAPメッセージをメソッドの返値に変換してクライアントアプリケーション101に返すという仕組みはWebサービスの基本的な構造である。
The above-described processing is an example of a Web service mounting method, and there is an implementation that does not use the
[第1の実施形態]
次に、図2乃至図4を用いて、本発明に係る第1の実施形態について詳細に説明する。第1の実施形態は、図2に示すように、図1の構成に更にセッション管理テーブル201を備え、Webサービスライブラリ103がセッション管理テーブル201に登録されたセッション管理情報に基づいてセッション管理を行うものである。
[First Embodiment]
Next, the first embodiment according to the present invention will be described in detail with reference to FIGS. As shown in FIG. 2, the first embodiment further includes a session management table 201 in the configuration of FIG. 1, and the
図3は、第1の実施形態におけるセッション管理テーブルの構成の一例を示す図である。図3に示すように、第1の実施形態では、セッション管理テーブルは、セッション管理情報としてスタブオブジェクト102のオブジェクトID301を用い、接続先サーバ情報としてサーバアプリケーションのURL302とセッション情報303とを管理するものである。
FIG. 3 is a diagram illustrating an example of a configuration of a session management table according to the first embodiment. As shown in FIG. 3, in the first embodiment, the session management table uses the
また、セッション管理情報としてスタブオブジェクト102のオブジェクトID301の代わりにクライアントアプリケーション101のオブジェクトIDや、スタブオブジェクト102やクライアントアプリケーション101のオブジェクト自体を使用しても良い。更には、Webサービスライブラリ103にUUID(Universally Unique Identifier)のような一意な値を生成させ、そのUUIDをセッション管理情報としても良い。
Further, instead of the
スタブオブジェクト102のオブジェクトID301は、クライアントアプリケーション101とWebサービスライブラリ103との仲立ちをするスタブオブジェクト102のオブジェクトIDであり、このIDはスタブオブジェクト102毎に異なるIDとなる。また、クライアントアプリケーション101やシステムを再起動した後に、スタブオブジェクト102を取得すると、その都度異なるIDとなる。
An
尚、セッション管理テーブルにおいてクライアントアプリケーション101で使用するサーバアプリケーション106が変更されることがなければ、サーバアプリケーションのURL302はなくても良い。
If the
図3に示す304、305は、セッション管理ID301がともに「Stub Object1」で、サーバアプリケーションのURL302が「http://aaa.com/」、「http://aaa1.com/」で異なる場合に、「Session1」、「Session1A」のように、異なるセッション情報を管理している状態を示している。また、図3に示す306は、304と比べてセッション管理ID301が「Stub Object2」で異なるが、サーバアプリケーションのURL302は同じ「http://aaa.com/」の場合に、304と異なるセッション情報「Session2」を管理している状態を示している。
304 and 305 shown in FIG. 3 are when the
セッション情報303はサーバアプリケーション106との通信において、複数の通信を一連のものとして管理する、即ちセッション管理のために使用する情報であり、サーバアプリケーション106との通信時にHTTPを使用する場合においてはHTTPヘッダのCookie情報として送信されたり、サーバアプリケーション106へのリクエストURLに付加されて送信されたりする一意な情報である。
The
ここで、図4を用いて、図3に示すセッション管理テーブルによってセッションを管理し、Webサービスを利用するクライアント側の処理について説明する。 Here, with reference to FIG. 4, processing on the client side that manages a session by using the session management table shown in FIG.
図4は、第1の実施形態におけるWebサービスの全体的な処理を示すフローチャートである。尚、実線で囲んだ部分はクライアントアプリケーション101での処理であり、一点鎖線で囲んだ部分はスタブオブジェクト102での処理であり、点線で囲んだ部分はWebサービスライブラリ103での処理であり、二点鎖線で囲んだ部分は通信ライブラリ104での処理である。
FIG. 4 is a flowchart showing the overall processing of the Web service in the first embodiment. The part surrounded by a solid line is processing by the
まず、ステップS401において、クライアントアプリケーション101はスタブオブジェクト102を取得する。尚、スタブオブジェクトは再利用可能であるため、この取得処理は一度行えば良く、後述する2回目以降のメソッドの呼び出し処理ではこのステップは不要である。
First, in step S401, the
次に、ステップS402において、クライアントアプリケーション101はスタブオブジェクト102に対してサーバアプリケーション106のURLを設定する。次に、ステップS403において、Webサービスを利用するためにクライアントアプリケーション101はスタブオブジェクト102のメソッドを呼び出す。もし、セッション管理情報としてWebサービスライブラリ103が発行するUUIDを使用する場合、Webサービスライブラリ103に設けられたUUID発行メソッドを呼び出し、UUIDを取得する。取得したUUIDをセッション管理情報としてスタブオブジェクト102に設定する。
In step S <b> 402, the
次に、ステップS404において、スタブオブジェクト102で、クライアントアプリケーション101から与えられたメソッドの引数の型変換処理が行われ、Webサービスライブラリ103が呼び出される、ここで、スタブオブジェクト102はメソッドの引数と共に、自身のオブジェクトIDとステップS402で設定されたサーバアプリケーション106のURLを引数としてWebサービスライブラリ103に渡す。セッション管理情報がオブジェクトIDではなくWebサービスライブラリ103が発行したUUIDを使用する場合は、UUIDをセッション管理情報としてWebサービスライブラリ103に渡す。
Next, in step S404, the
これにより、Webサービスライブラリ103では、まずステップS405において、呼び出されたメソッドに対応するSOAPメッセージを生成する。次に、ステップS406において、スタブオブジェクト102から渡されたスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLをキーにセッション管理テーブルの検索を行う。そして、ステップS407において、その検索結果を判定する。
As a result, the
ステップS407で、セッション管理テーブルにスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLが設定されておらず、対応するセッション情報303が存在しなければステップS409へ進み、通信ライブラリ104に対して、スタブオブジェクト102から渡されたURLのサーバアプリケーション106へのSOAPメッセージの送信を要求する。
In step S407, if the object ID of the stub object and the URL of the server application are not set in the session management table and the
また、ステップS407で、セッション管理テーブルにスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLが設定されており、対応するセッション情報が存在した場合はステップS408へ進み、通信ライブラリ104に対してそのセッション情報303をリクエストヘッダに追加するように要求する。そして、ステップS409において、スタブオブジェクト102から渡されたURLのサーバアプリケーション106へのSOAPメッセージの送信を要求する。
In step S407, if the object ID of the stub object and the URL of the server application are set in the session management table and the corresponding session information exists, the process proceeds to step S408, and the
一方、通信ライブラリ104は、まずステップS410において、ネットワーク105を介してサーバアプリケーション106に対してリクエストとしてSOAPメッセージを送信し、レスポンスの受信を待つ。次に、ステップS411において、通信ライブラリ104はサーバアプリケーション106からレスポンスを受信すると、そのレスポンスのヘッダ情報とサーバアプリケーション106から送られてきた処理の結果であるSOAPメッセージとをWebサービスライブラリ103に渡す。
On the other hand, the
これにより、Webサービスライブラリ103では、まずステップS412において、レスポンスのヘッダ情報からセッション情報を取得する。次に、ステップS413において、セッション管理テーブルの検索を行い、ステップS414において、その検索結果を判定する。
As a result, the
ここで、ステップS412で取得したセッション情報がセッション管理テーブルに登録されていなければステップS415へ進み、そのセッション情報をスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLに対応させてセッション管理テーブルに登録する。 If the session information acquired in step S412 is not registered in the session management table, the process proceeds to step S415, and the session information is registered in the session management table in association with the object ID of the stub object and the URL of the server application.
また、取得したセッション情報がセッション管理テーブルに登録されていればステップS416へ進み、そのセッション情報に対応させてスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLをセッション管理テーブルに登録し、セッション情報を更新する。そして、ステップS417において、受信したSOAPメッセージをメソッドの返答に変換し、スタブオブジェクト102に返す。
If the acquired session information is registered in the session management table, the process proceeds to step S416, and the object ID of the stub object and the URL of the server application are registered in the session management table corresponding to the session information, and the session information is updated. To do. In step S 417, the received SOAP message is converted into a method response and returned to the
次に、ステップS418において、スタブオブジェクト102で、Webサービスライブラリ103から返ってきた返値をクライアントアプリケーション101の要求する型に変換する。そして、ステップS419において、クライアントアプリケーション101に返す。
In step S418, the
これにより、ステップS420において、スタブオブジェクト102から返値を返されたクライアントアプリケーション101はメソッド呼び出し処理を終了する。
Thereby, in step S420, the
クライアントアプリケーション101が2回目以降にWebサービスを利用する場合に、同じURLのサーバアプリケーション106を利用するならば、ステップS403から処理を開始する。また、異なるURLのサーバアプリケーション106bを利用する場合はステップS402から処理を開始する。
When the
尚、以上の説明では、ステップS407で、セッション管理テーブルにスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLが設定されていない場合、ステップS415で、ステップS412で取得したセッション情報をスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLに対応させてセッション管理テーブルに登録した。 In the above description, if the object ID of the stub object and the URL of the server application are not set in the session management table in step S407, the session information acquired in step S412 is replaced with the object ID of the stub object in step S415. It was registered in the session management table in correspondence with the URL of the server application.
しかしながら、以下のように実現することも可能である。即ち、ステップS407で、セッション管理テーブルにスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLが設定されていない場合、スタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLに対応させてセッション管理テーブルに登録し、ステップS409へ進む。そして、ステップS415で、ステップS412で取得したセッション情報をスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLに対応させてセッション管理テーブルに登録する。 However, it can also be realized as follows. That is, if the object ID of the stub object and the URL of the server application are not set in the session management table in step S407, they are registered in the session management table in association with the object ID of the stub object and the URL of the server application, and step S409. Proceed to In step S415, the session information acquired in step S412 is registered in the session management table in association with the object ID of the stub object and the URL of the server application.
第1の実施形態によれば、複数のクライアントアプリケーションがWebサービスライブラリを介して同じサーバアプリケーションを利用しても、セッション情報を別々に管理できるので、各クライアントアプリケーションで独立してセッションを張ることができ、クライアントアプリケーション毎に異なる処理状態を維持することができる。 According to the first embodiment, even if a plurality of client applications use the same server application via the Web service library, session information can be managed separately, so that each client application can establish a session independently. It is possible to maintain a different processing state for each client application.
[第2の実施形態]
次に、図5及び図6を用いて、本発明に係る第2の実施形態について詳細に説明する。第1の実施形態では、セッション管理テーブルにセッション管理ID(オブジェクトID)を設定しているが、第2の実施形態はアプリケーションIDを設定し、セッション管理を行うものである。ここで、アプリケーションIDとは、個々のクライアントアプリケーションを識別するための識別子である。
[Second Embodiment]
Next, a second embodiment according to the present invention will be described in detail with reference to FIGS. In the first embodiment, a session management ID (object ID) is set in the session management table, but in the second embodiment, an application ID is set and session management is performed. Here, the application ID is an identifier for identifying individual client applications.
図5は、第2の実施形態におけるセッション管理テーブルの構成の一例を示す図である。図5に示すように、第2の実施形態のセッション管理テーブルは、セッション管理情報としてクライアントアプリケーション101の識別子であるアプリケーションID501を用い、接続先サーバ情報としてサーバアプリケーションのURL502とセッション情報503とを管理するものである。
FIG. 5 is a diagram illustrating an example of a configuration of a session management table according to the second embodiment. As shown in FIG. 5, the session management table of the second embodiment uses an
尚、アプリケーションID501は、クライアントアプリケーションやシステムの再起動などで変わることのないクライアントアプリケーションに固有で、かつ、永続的な識別子であり、例えばクライアントアプリケーションの名称やクライアントアプリケーションに設定されたシリアルナンバーなどである。又は、固定的にアプリが本来有する情報ではなく、第1の実施形態で説明したのようにWebサービスライブラリから発行されたUUIDをクライアントアプリケーションで永続的に記憶し、アプリケーションID501として使用しても良い。
The
また、第1の実施形態と同様に、セッション管理テーブルにおいてクライアントアプリケーション101で使用するサーバアプリケーション106が変更されることがなければ、サーバアプリケーションのURL502はなくても良い。
Similarly to the first embodiment, if the
図5に示す504、505は、アプリケーションID501がともに「ApplD1」で、サーバアプリケーションのURL502が「http://aaa.com/」、「http://aaa1.com/」で異なる場合に、「Session1」、「Session1A」のように、異なるセッション情報を管理している状態を示している。また、図5に示す506は、504と比べてアプリケーションID501が「ApplD2」で異なるが、サーバアプリケーションのURL502は同じ「http://aaa.com/」の場合に、504と異なるセッション情報「Session2」を管理している状態を示している。
504 and 505 shown in FIG. 5 indicate that when the
尚、セッション情報503は、第1の実施形態で説明したセッション情報303と同様な情報である。
Note that the
ここで、図6を用いて、図5に示すセッション管理テーブルによってセッションを管理し、Webサービスを利用するクライアント側の処理について説明する。 Here, with reference to FIG. 6, processing on the client side that manages a session by using the session management table shown in FIG.
図6は、第2の実施形態におけるWebサービスの全体的な処理を示すフローチャートである。尚、第2の実施形態でも第1の実施形態と同様に、線の種類によりクライアントアプリケーション101、スタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104で行われる処理を分けている。
FIG. 6 is a flowchart showing the overall processing of the Web service in the second embodiment. In the second embodiment, as in the first embodiment, processing performed by the
まず、ステップS601において、システムが起動されるとWebサービスライブラリ103は、例えばハードディスクなどの永続記憶装置600からセッション管理テーブルをクライアントのメモリ上にロードする。ここで永続記憶装置600からセッション管理テーブルを読み込まず、ステップS608におけるセッション管理テーブルの検索処理で永続記憶装置600上のセッション管理テーブルを検索しても良い。
First, in step S601, when the system is started, the
次に、クライアントアプリケーション101において、ステップS602、S604、S605の処理は、第1の実施形態における図4に示したステップS401〜S403での処理と同じであり、その説明は省略する。
Next, in the
第2の実施形態では、ステップS603において、スタブオブジェクト102に対してアプリケーションID501を設定する。ここで、スタブオブジェクト102に対してアプリケーションID501の設定を行わなければ、第1の実施形態と同様に、セッション管理ID301であるスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURL302とをキーにセッション管理テーブルの検索を行い、得られたセッション情報303を用いてサーバアプリケーション106へのSOAPメッセージの送信を要求する。
In the second embodiment, an
但し、第1の実施形態において、Webサービスライブラリ103から発行されたUUIDをセッション管理情報として扱う場合は、セッション管理情報のみでセッション情報の永続記憶を行うか判断できないので、別途、セッション情報の永続管理が必要であることをスタブオブジェクト102に設定する。スタブオブジェクト102はメソッド呼び出しの際に永続管理が必要であることをWebサービスライブラリ103に伝える。
However, in the first embodiment, when the UUID issued from the
次に、ステップS606〜S618に示すスタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104の処理は、第1の実施形態における図4に示したステップS404〜S416での処理と同じであり、その説明は省略する。
Next, the processing of the
次に、ステップS617又はS618の登録処理又は更新処理が終了すると、ステップS619において、Webサービスライブラリ103は、セッション管理テーブルを永続記憶装置600に記憶する。尚、ステップS717又はS618で永続記憶装置600上のセッション管理テーブルに対して直接登録処理又は更新処理を行っている場合は、このステップは必要ない。
Next, when the registration process or update process in step S617 or S618 is completed, in step S619, the
次に、ステップS620以降の処理は、第1の実施形態における図4に示したステップS417以降と同じであり、その説明は省略する。 Next, the processing after step S620 is the same as the processing after step S417 shown in FIG. 4 in the first embodiment, and a description thereof will be omitted.
第2の実施形態によれば、クライアントアプリケーションがセッション管理情報としてアプリケーションIDを指定した場合に、セッション管理情報とセッション情報を関連付けて永続的に記憶するため、クライアントアプリケーションを再起動後でも同じセッション管理情報を指定することにより再起動前のセッション情報を用いて処理を継続して行うことができる。 According to the second embodiment, when the application ID is specified as the session management information by the client application, the session management information and the session information are stored in association with each other, so that the same session management is performed even after the client application is restarted. By specifying information, it is possible to continue processing using session information before restart.
[第3の実施形態]
次に、図7及び図8を用いて、本発明に係る第3の実施形態について詳細に説明する。第3の実施形態は、第1の実施形態で説明したセッション管理テーブルにサブIDの情報を加え、セッション管理を行うものである。ここで、サブIDの情報は、クライアントアプリケーション内で一意なものであれば、どのようなものでも良い。
[Third Embodiment]
Next, a third embodiment according to the present invention will be described in detail with reference to FIGS. In the third embodiment, session management is performed by adding sub ID information to the session management table described in the first embodiment. Here, the sub ID information may be any information as long as it is unique within the client application.
図7は、第3の実施形態におけるセッション管理テーブルの構成の一例を示す図である。図7に示すように、第3の実施形態では、セッション管理テーブルは、セッション管理情報としてスタブオブジェクト102のオブジェクトID701を用い、接続先サーバ情報としてサーバアプリケーションのURL702、サブID703、セッション情報704を管理するものである。
FIG. 7 is a diagram illustrating an example of a configuration of a session management table according to the third embodiment. As shown in FIG. 7, in the third embodiment, the session management table uses the
尚、第1の実施形態と同様に、セッション管理情報としてスタブオブジェクト102のオブジェクトID701の代わりにクライアントアプリケーション101のオブジェクトIDを使用しても良い。
As in the first embodiment, the object ID of the
また、セッション管理テーブルにおいてクライアントアプリケーション101で使用するサーバアプリケーション106が変更されることがなければ、サーバアプリケーションのURL702はなくても良い。
Further, if the
図7に示す705、706は、セッション管理ID701がともに「Stub Object1」で、サーバアプリケーションのURL702もともに「http://aaa.com/」で同じであるが、サブID703が「SubID1」、「SubID2」で異なる場合に、「Session1」、「Session1_1」のように、異なるセッション情報を管理することができることを示している。
In FIG. 7, 705 and 706 have the same
ここで、図8を用いて、図7に示すセッション管理テーブルによってセッションを管理し、Webサービスを利用するクライアント側の処理について説明する。 Here, with reference to FIG. 8, processing on the client side that manages a session by using the session management table shown in FIG. 7 and uses a Web service will be described.
図8は、第3の実施形態におけるWebサービスの全体的な処理を示すフローチャートである。尚、第3の実施形態でも第1の実施形態と同様に、線の種類によりクライアントアプリケーション101、スタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104で行われる処理を分けている。
FIG. 8 is a flowchart showing the overall processing of the Web service in the third embodiment. In the third embodiment, as in the first embodiment, processing performed by the
まず、クライアントアプリケーション101において、ステップS801、S802、S804の処理は、第1の実施形態における図4に示したステップS401〜S403と同じであり、その説明は省略する。
First, in the
第3の実施形態では、ステップS803において、スタブオブジェクト102に対してサブID703を設定する。ここで、サブID703が設定されない場合は、第1の実施形態と同様に動作する。
In the third embodiment, a
次に、ステップS805〜S821に示すスタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104、クライアントアプリケーション101の処理は、第1の実施形態における図4に示したステップS404〜S420でオブジェクトID701とサブID703を用いる点が異なるだけで他の処理は同じであり、その説明は省略する。
Next, the processes of the
第3の実施形態によれば、第1の実施形態における効果に加え、サブIDを用いることにより、他のセッション情報を保持したまま同じオブジェクトを使用してサーバへアクセスすることができるため、冗長なオブジェクトを生成しないですむ。 According to the third embodiment, in addition to the effects of the first embodiment, by using the sub-ID, it is possible to access the server using the same object while retaining other session information. It is not necessary to create a new object
[第4の実施形態]
次に、図9及び図10を用いて、本発明に係る第4の実施形態について詳細に説明する。第4の実施形態は、第2の実施形態で説明したセッション管理テーブルにサブIDの情報を加え、セッション管理を行うものである。尚、このサブIDの情報は、第3の実施形態と同様に、クライアントアプリケーション内で一意なものであれば、どのようなものでも良い。
[Fourth Embodiment]
Next, a fourth embodiment according to the present invention will be described in detail with reference to FIGS. 9 and 10. In the fourth embodiment, sub-ID information is added to the session management table described in the second embodiment to perform session management. Note that this sub ID information may be any information as long as it is unique within the client application, as in the third embodiment.
図9は、第4の実施形態におけるセッション管理テーブルの構成の一例を示す図である。図9に示すように、第4の実施形態のセッション管理テーブルは、セッション管理情報としてクライアントアプリケーション101の識別子であるアプリケーションID901を用い、接続先サーバ情報としてサーバアプリケーションのURL902、サブID903、セッション情報904を管理するものである。
FIG. 9 is a diagram illustrating an example of a configuration of a session management table according to the fourth embodiment. As shown in FIG. 9, the session management table of the fourth embodiment uses an
尚、アプリケーションID901は、第2の実施形態と同様な情報である。
The
また、第2の実施形態と同様に、セッション管理テーブルにおいてクライアントアプリケーション101で使用するサーバアプリケーション106が変更されることがなければ、サーバアプリケーションのURL902はなくても良い。
Similarly to the second embodiment, if the
図9に示す905、906は、アプリケーションID901がともに「ApplD1」で、サーバアプリケーションのURL902もともに「http://aaa.com/」で同じであるが、サブID903が「SubID1」、「SubID2」で異なる場合に、「Session1」、「Session1_1」のよういに、異なるセッション情報を管理することができることを示している。
905 and 906 shown in FIG. 9 have the
ここで、図10を用いて、図9に示すセッション管理テーブルによってセッションを管理し、Webサービスを利用するクライアント側の処理について説明する。 Here, with reference to FIG. 10, processing on the client side that manages a session by using the session management table shown in FIG. 9 and uses a Web service will be described.
図10は、第4の実施形態におけるWebサービスの全体的な処理を示すフローチャートである。尚、第4の実施形態でも第2の実施形態と同様に、線の種類によりクライアントアプリケーション101、スタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104で行われる処理を分けている。
FIG. 10 is a flowchart showing the overall processing of the Web service in the fourth embodiment. Note that, in the fourth embodiment, similarly to the second embodiment, processing performed by the
まず、ステップS1001において、システムが起動されるとWebサービスライブラリ103は、例えばハードディスクなどの永続記憶装置1000からセッション管理テーブルをクライアントのメモリ上にロードする。この管理テーブルの読み込み処理は、第2の実施形態における図6に示したステップS601での処理と同じである。
First, in step S1001, when the system is activated, the
次に、クライアントアプリケーション101において、ステップS1002〜S1004、S1006の処理は、第2の実施形態における図6に示したステップS602〜S605と同じであり、その説明は省略する。
Next, in the
第4の実施形態では、ステップS1005において、スタブオブジェクト102に対してサブID903を設定する。ここで、サブID903が設定されない場合は、第2の実施形態と同様に動作する。
In the fourth embodiment, a
次に、ステップS1007〜S1024に示すスタブオブジェクト102、Webサービスライブラリ103、通信ライブラリ104、クライアントアプリケーション101の処理は、第2の実施形態における図6に示したステップS606〜S623でオブジェクトID901とサブID903を用いる点が異なるだけで他の処理は同じであり、その説明は省略する。
Next, the processing of the
第4の実施形態によれば、第2の実施形態における効果に加え、サブIDを用いることにより、他のセッション情報を保持したまま同じオブジェクトを使用してサーバへアクセスすることができるため、冗長なオブジェクトを生成しないですむ。 According to the fourth embodiment, in addition to the effect of the second embodiment, by using the sub-ID, it is possible to access the server using the same object while holding other session information. It is not necessary to create a new object
[第5の実施形態]
次に、図11を用いて、本発明に係る第5の実施形態について詳細に説明する。第5の実施形態では、複数のユーザがWebサービスを利用する場合に、ユーザ毎にセッションを管理するものである。
[Fifth Embodiment]
Next, a fifth embodiment according to the present invention will be described in detail with reference to FIG. In the fifth embodiment, when a plurality of users use a Web service, a session is managed for each user.
図11は、第5の実施形態におけるセッション管理テーブルリストの構成の一例を示す図である。図11に示すように、第5の実施形態では、第1乃至第4の実施形態で用いたセッション管理テーブルを、クライアントアプリケーション101からWebサービスを利用するユーザ毎に備え、Webサービスライブラリ103が各ユーザを識別するためのユーザ識別子に基づいてセッションを管理するものである。尚、ユーザ識別子は、例えば機器にログインしているユーザのユーザ名などである。
FIG. 11 is a diagram illustrating an example of a configuration of a session management table list according to the fifth embodiment. As shown in FIG. 11, in the fifth embodiment, the session management table used in the first to fourth embodiments is provided for each user who uses the Web service from the
第1乃至第4の実施形態において、セッション情報検索処理(例えば、図4のステップS406)で、まずユーザ識別子を取得し、取得したユーザ識別子に対応するセッション管理テーブルをセッション管理テーブルリスト1100から取得する。そして、取得したセッション管理テーブルに対してセッション情報の検索を行う。
In the first to fourth embodiments, in the session information search process (for example, step S406 in FIG. 4), first, a user identifier is acquired, and a session management table corresponding to the acquired user identifier is acquired from the session
以上の処理を行うことにより、新たにスタブオブジェクトを生成しなくてもユーザ毎にセッションを管理してWebサービスを利用することができる。 By performing the above processing, it is possible to manage a session for each user and use a Web service without newly generating a stub object.
[第6の実施形態]
次に、図12を用いて、本発明に係る第6の実施形態について詳細に説明する。第6の実施形態では、個々のクライアントアプリケーションに対してシステムで一意、かつ永続的なIDを設定し、その永続的なIDに基づいてセッションを管理するものである。ここで、永続的なIDとは、クライアントアプリケーションやシステムの再起動などで変わることのないクライアントアプリケーションに固有で、かつ永続的な識別子であり、クライアントアプリケーションの名称やクライアントアプリケーションに設定されたシリアルナンバーなどである。
[Sixth Embodiment]
Next, a sixth embodiment according to the present invention will be described in detail with reference to FIG. In the sixth embodiment, a unique and permanent ID is set in the system for each client application, and a session is managed based on the permanent ID. Here, the permanent ID is a unique identifier that is unique to the client application that does not change when the client application or the system is restarted. The name of the client application or the serial number set in the client application Etc.
図12は、第6の実施形態におけるWebサービスを利用するクライアント側システムの構成の一例を示す図である。図12には、永続的なIDに関係する部分のみ示しているが、全体的な構成は図2に示した構成と同様である。 FIG. 12 is a diagram illustrating an example of the configuration of a client-side system that uses a Web service according to the sixth embodiment. FIG. 12 shows only the portion related to the permanent ID, but the overall configuration is the same as the configuration shown in FIG.
ここで、個々のクライアントアプリケーションからWebサービスを利用する際の処理について説明する。尚、第6の実施形態におけるクライアント側の処理は、図6を用いて説明した第2の実施形態と同様であり、ここでは異なる処理について説明する。 Here, processing when using a Web service from an individual client application will be described. The processing on the client side in the sixth embodiment is the same as that in the second embodiment described with reference to FIG. 6, and different processing will be described here.
まず、クライアントアプリケーションA1201aは、第2の実施形態と同様に、設定された永続的なIDを指定してアプリケーションA用スタブ1202aのメソッドを呼び出す。次に、アプリケーションA用スタブ1202aは、クライアントアプリケーションA1201aで設定された永続的なIDを引数に追加してWebサービスライブラリ1203を呼び出す。
First, similarly to the second embodiment, the
これにより、Webサービスライブラリ1203では、永続的なIDをキーにしてセッション管理テーブル1210からセッション情報を検索し、取得したセッション情報を付加してサーバアプリケーション1204に対してSOAPメッセージを送り、Webサービスを利用する。
As a result, the
また、クライアントアプリケーションB1201bは、第2の実施形態と同様に、設定された永続的なIDを指定してアプリケーションB用スタブ1202bのメソッドを呼び出す。次に、アプリケーションB用スタブ1202bは、クライアントアプリケーションB1201bで設定された永続的なIDを引数に追加してWebサービスライブラリ1203を呼び出す。
Similarly to the second embodiment, the
これにより、Webサービスライブラリ1203では、永続的なIDをキーにしてセッション管理テーブル1210からセッション情報を検索し、取得したセッション情報を付加してサーバアプリケーション1204に対してSOAPメッセージを送り、Webサービスを利用する。
As a result, the
以上の処理を行うことにより、異なるクライアントアプリケーション間で同じ永続的なIDを使用することにより、異なるクライアントアプリケーション間でも同一のセッション情報を使ってWebサービスを利用することができる。 By performing the above processing, it is possible to use the same session information between different client applications by using the same permanent ID between different client applications.
[第7の実施形態]
次に、図13を用いて、本発明に係る第7の実施形態について詳細に説明する。第7の実施形態では、第6の実施形態で設定した永続的なIDだけでなくサブIDも設定し、永続的なIDとサブIDとに基づいてセッションを管理するものである。ここで、サブIDは、個々のクライアントアプリケーションで一意なものであればどのようなものでも良い。
[Seventh Embodiment]
Next, the seventh embodiment according to the present invention will be described in detail with reference to FIG. In the seventh embodiment, not only the permanent ID set in the sixth embodiment but also the sub ID is set, and the session is managed based on the permanent ID and the sub ID. Here, the sub ID may be anything as long as it is unique for each client application.
図13は、第7の実施形態におけるWebサービスを利用するクライアント側システムの構成の一例を示す図である。図13には、永続的なIDに関係する部分のみ示しているが、全体的な構成は図2に示した構成と同様である。 FIG. 13 is a diagram illustrating an example of the configuration of a client-side system that uses a Web service according to the seventh embodiment. FIG. 13 shows only the portion related to the permanent ID, but the overall configuration is the same as the configuration shown in FIG.
ここで、個々のクライアントアプリケーションからWebサービスを利用する際の処理について説明する。尚、第7の実施形態におけるクライアント側の処理は、図10を用いて説明した第4の実施形態と同様であり、ここでは異なる処理について説明する。 Here, processing when using a Web service from an individual client application will be described. The processing on the client side in the seventh embodiment is the same as that in the fourth embodiment described with reference to FIG. 10, and different processing will be described here.
まず、クライアントアプリケーションA1301aは、第4の実施形態と同様に、設定された永続的なIDとサブIDとを指定してアプリケーションA用スタブ1302aのメソッドを呼び出す。次に、アプリケーションA用スタブ1302aは、クライアントアプリケーションA1301aで設定された永続的なIDとサブIDとを引数に追加してWebサービスライブラリ1303を呼び出す。
First, similarly to the fourth embodiment, the
これにより、Webサービスライブラリ1303では、永続的なIDとサブIDとをキーにしてセッション管理テーブル1310からセッション情報を検索し、取得したセッション情報を付加してサーバアプリケーション1304に対してSOAPメッセージを送り、Webサービスを利用する。
As a result, the
また、クライアントアプリケーションB1301bは、第4の実施形態と同様に、設定された永続的なIDとサブIDとを指定してアプリケーションB用スタブ1302bのメソッドを呼び出す。次に、アプリケーションB用スタブ1302bは、クライアントアプリケーションB1301bで設定された永続的なIDとサブIDとを引数に追加してWebサービスライブラリ1303を呼び出す。
Similarly to the fourth embodiment, the
これにより、Webサービスライブラリ1303では、永続的なIDとサブIDとをキーにしてセッション管理テーブル1310からセッション情報を検索し、取得したセッション情報を付加してサーバアプリケーション1304に対してSOAPメッセージを送り、Webサービスを利用する。
As a result, the
以上の処理を行うことにより、異なるクライアントアプリケーション間で同じ永続的なIDとサブIDとを使用することにより、異なるクライアントアプリケーション間でも同一のセッション情報を使ってWebサービスを利用することができる。 By performing the above processing, by using the same permanent ID and sub ID between different client applications, it is possible to use the Web service using the same session information between different client applications.
[第8の実施形態]
次に、図14を用いて、本発明に係る第8の実施形態について詳細に説明する。第8の実施形態では、第1及び第3の実施形態での処理に加えてスタブオブジェクト及びWebサービスライブラリがセッションの初期化を行うものである。
[Eighth Embodiment]
Next, an eighth embodiment according to the present invention will be described in detail with reference to FIG. In the eighth embodiment, in addition to the processing in the first and third embodiments, the stub object and the Web service library perform session initialization.
図14は、第8の実施形態におけるセッション初期化処理を示すフローチャートである。尚、実線で囲んだ部分はクライアントアプリケーション101での処理であり、一点鎖線で囲んだ部分はスタブオブジェクト102での処理であり、点線で囲んだ部分はWebサービスライブラリ103での処理である。
FIG. 14 is a flowchart showing session initialization processing in the eighth embodiment. The portion surrounded by the solid line is processing by the
まず、ステップS1401において、同一のセッションとして行われてきたWebサービスの利用が終了し、新たなセッションでのWebサービスの利用を行うために、クライアントアプリケーション101はサーバアプリケーションのURLを設定し、スタブオブジェクト102に対してセッションの初期化を依頼する。
First, in step S1401, the use of the Web service that has been performed as the same session ends, and in order to use the Web service in a new session, the
次に、ステップS1402において、スタブオブジェクト102はWebサービスライブラリ103に対してスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLを引数としてセッションの初期化を依頼する。
Next, in step S1402, the
これにより、Webサービスライブラリ103では、まずステップS1403において、ステップS1402で渡されたスタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLをキーにセッション管理テーブルの検索を行う。次に、ステップS1404において、スタブオブジェクトのオブジェクトIDとサーバアプリケーションのURLに対応するセッション情報が存在するか否かを判定する。ここで、存在すればステップS1405へ進み、セッション管理テーブルからセッション情報を削除し、このセッション初期化処理を終了する。また、セッション情報が存在しなければ、このセッション初期化処理を終了する。
Thus, in step S1403, the
第8の実施形態によれば、第1及び第3の実施形態における効果に加え、クライアントアプリケーションからセッションIDを初期化することで、同じオブジェクトの使い回しが行え、冗長なオブジェクトを生成しないですむ。 According to the eighth embodiment, in addition to the effects in the first and third embodiments, by initializing the session ID from the client application, the same object can be reused and redundant objects need not be generated. .
[第9の実施形態]
次に、図15を用いて、本発明に係る第9の実施形態について詳細に説明する。第9の実施形態では、第2及び第4の実施形態での処理に加えてスタブオブジェクト及びWebサービスライブラリがセッションの初期化を行うものである。
[Ninth Embodiment]
Next, a ninth embodiment according to the present invention will be described in detail with reference to FIG. In the ninth embodiment, in addition to the processing in the second and fourth embodiments, the stub object and the Web service library perform session initialization.
図15は、第9の実施形態におけるセッション初期化処理を示すフローチャートである。尚、第9の実施形態でも第8の実施形態と同様に、線の種類によりクライアントアプリケーション101、スタブオブジェクト102、Webサービスライブラリ103で行われる処理を分けている。
FIG. 15 is a flowchart showing session initialization processing in the ninth embodiment. Note that, in the ninth embodiment, similarly to the eighth embodiment, processing performed by the
まず、ステップS1501において、クライアントアプリケーション101は、スタブオブジェクト102に対して予めアプリケーションIDの設定を行う。そして、ステップS1502において、同一のセッションとして行われてきたWebサービスの利用が終了し、新たなセッションでのWebサービスの利用を行うために、サーバアプリケーションのURLを設定し、スタブオブジェクト102に対してセッションの初期化を依頼する。
First, in step S1501, the
次に、ステップS1503において、スタブオブジェクト102はWebサービスライブラリに対してアプリケーションIDとサーバアプリケーションのURLを引数としてセッションの初期化を依頼する。
In step S1503, the
これにより、Webサービスライブラリ103では、まずステップS1504において、ステップS1503で渡されたアプリケーションIDとサーバアプリケーションのURLをキーにセッション管理テーブルの検索を行う。次に、ステップS1505において、アプリケーションIDとサーバアプリケーションのURLに対応するセッション情報が存在するか否かを判定する。ここで、存在すればステップS1506へ進み、セッション管理テーブルからセッション情報を削除し、このセッション初期化処理を終了する。また、セッション情報が存在しなければ、このセッション初期化処理を終了する。
Thus, in step S1504, the
第9の実施形態によれば、第2及び第4の実施形態における効果に加え、クライアントアプリケーションからセッションIDを初期化することで、同じオブジェクトの使い回しが行え、冗長なオブジェクトを生成しないですむ。 According to the ninth embodiment, in addition to the effects in the second and fourth embodiments, by initializing the session ID from the client application, the same object can be reused and redundant objects need not be generated. .
尚、本発明は複数の機器(例えば、ホストコンピュータ,インターフェース機器,リーダ,プリンタなど)から構成されるシステムに適用しても、1つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用しても良い。 Even if the present invention is applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), it is applied to an apparatus (for example, a copier, a facsimile machine, etc.) composed of a single device. It may be applied.
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPU若しくはMPU)が記録媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。 Another object of the present invention is to supply a recording medium that records software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and the computer (CPU or MPU) of the system or apparatus uses the recording medium as a recording medium. Needless to say, this can also be achieved by reading and executing the stored program code.
この場合、記録媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。 In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium storing the program code constitutes the present invention.
このプログラムコードを供給するための記録媒体としては、例えばフロッピー(登録商標)ディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。 As a recording medium for supplying the program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like is used. be able to.
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
更に、記録媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, after the program code read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
101 クライアントアプリケーション
102 スタブオブジェクト
103 Webサービスライブラリ
104 通信ライブラリ
105 ネットワーク
106 サーバアプリケーション
201 セッション管理テーブル
101
Claims (10)
前記クライアントアプリケーションからサーバアプリケーションへのリクエストに付加するセッション情報を前記セッション管理情報に基づいて前記セッション管理テーブルから検索して取得するセッション情報検索工程と、
前記サーバアプリケーションから受信したセッション情報を記憶する場合、リクエスト時に前記クライアント側で取得したセッション管理情報と該セッション情報とを関連付けて前記セッション管理テーブルに記憶するセッション情報記憶工程とを有することを特徴とするセッション管理方法。 A session indicating a logical connection relationship between the client application and the server application by using a session management table that associates and stores session information transmitted and received between the client application and the server application and session management information acquired on the client side A session management method for managing,
Session information retrieval step for retrieving and acquiring session information to be added to a request from the client application to the server application from the session management table based on the session management information;
In the case of storing session information received from the server application, it has a session information storage step of associating the session management information acquired on the client side at the time of a request with the session information and storing it in the session management table. Session management method.
前記セッション情報検索工程及び前記セッション情報記憶工程では、前記ユーザ情報に対応するセッション管理テーブルに対して前記セッション情報の検索、記憶を行うことを特徴とする請求項1乃至請求項5の何れか一項に記載のセッション管理方法。 Having a user information acquisition step of acquiring information of a user who uses the client application, storing a session management table for each acquired user information
6. The session information search step and the session information storage step search and store the session information in a session management table corresponding to the user information. Session management method according to item.
前記クライアントアプリケーションからサーバアプリケーションへのリクエストに付加するセッション情報を前記セッション管理情報に基づいて前記セッション管理テーブルから検索して取得するセッション情報検索手段と、
前記サーバアプリケーションから受信したセッション情報を記憶する場合、リクエスト時に前記クライアント側で取得したセッション管理情報と該セッション情報とを関連付けて前記セッション管理テーブルに記憶するセッション情報記憶手段とを有することを特徴とするセッション管理装置。 A session indicating a logical connection relationship between the client application and the server application by using a session management table that associates and stores session information transmitted and received between the client application and the server application and session management information acquired on the client side A session management device to manage,
Session information search means for searching and acquiring session information to be added to a request from the client application to the server application from the session management table based on the session management information;
When storing session information received from the server application, it has session information storage means for associating the session management information acquired on the client side at the time of a request with the session information and storing it in the session management table. Session management device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005063152A JP2006244428A (en) | 2005-03-07 | 2005-03-07 | Session management method and session management system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005063152A JP2006244428A (en) | 2005-03-07 | 2005-03-07 | Session management method and session management system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006244428A true JP2006244428A (en) | 2006-09-14 |
Family
ID=37050756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005063152A Withdrawn JP2006244428A (en) | 2005-03-07 | 2005-03-07 | Session management method and session management system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006244428A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009042829A (en) * | 2007-08-06 | 2009-02-26 | Nippon Telegr & Teleph Corp <Ntt> | Information function providing system, information function providing device, information function providing method, and information function providing program |
JP2009140163A (en) * | 2007-12-05 | 2009-06-25 | Fuji Electric Systems Co Ltd | Session management device |
JP2011096228A (en) * | 2009-09-29 | 2011-05-12 | Canon Inc | Information processing apparatus, control method therefor, and program |
JP2012191542A (en) * | 2011-03-14 | 2012-10-04 | Toshiba Corp | Communication system, client communication relay program, and server communication relay program |
JP2014063519A (en) * | 2009-09-29 | 2014-04-10 | Canon Inc | Information processing apparatus, control method therefor, and program |
-
2005
- 2005-03-07 JP JP2005063152A patent/JP2006244428A/en not_active Withdrawn
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009042829A (en) * | 2007-08-06 | 2009-02-26 | Nippon Telegr & Teleph Corp <Ntt> | Information function providing system, information function providing device, information function providing method, and information function providing program |
JP4653147B2 (en) * | 2007-08-06 | 2011-03-16 | 日本電信電話株式会社 | Information function providing system, information function providing apparatus, information function providing method, and information function providing program |
JP2009140163A (en) * | 2007-12-05 | 2009-06-25 | Fuji Electric Systems Co Ltd | Session management device |
JP2011096228A (en) * | 2009-09-29 | 2011-05-12 | Canon Inc | Information processing apparatus, control method therefor, and program |
JP2014063519A (en) * | 2009-09-29 | 2014-04-10 | Canon Inc | Information processing apparatus, control method therefor, and program |
JP2012191542A (en) * | 2011-03-14 | 2012-10-04 | Toshiba Corp | Communication system, client communication relay program, and server communication relay program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6408545B2 (en) | System and method for deployment with increasing demand for location neutral software | |
US7281247B2 (en) | Software image creation in a distributed build environment | |
RU2345406C2 (en) | Notification method, connection device, method of realisation of communication and program | |
US7283830B2 (en) | Wireless device hub system and method | |
JP4293234B2 (en) | Connection management method and connection management server in thin client | |
EP2249277B1 (en) | Authentication device, authentication method, and authentication program with the method mounted thereon | |
KR102499219B1 (en) | Interoperable cloud-based media processing using dynamic network interfaces | |
KR101775026B1 (en) | Method and apparatus for providing pair play service | |
JP2001350855A (en) | On-demand service developing device and service providing system | |
EP1194846A1 (en) | Network proxy for devices with limited resources | |
GB2403040A (en) | Application programming interface for provisioning services | |
JP2006244428A (en) | Session management method and session management system | |
JP2008262351A (en) | Access control device | |
JP2011076437A (en) | System, server, client, and method for sharing device | |
US20120089977A1 (en) | Method and apparatus for performing service in plurality of devices based on widget migration | |
US20010013055A1 (en) | Collaboration network system | |
CN110325980B (en) | Expansion method of user interface back-end cluster for database binding type application | |
JP2006171918A (en) | Data transmission to client and execution control method of update data | |
WO1999044134A1 (en) | Method and system for facilitating access to a lookup service | |
JP2004013424A (en) | Apparatus, method, and program for content distribution | |
JP2005055983A (en) | Service management method and apparatus, and control program | |
KR101146742B1 (en) | METHOD OF DISTRIBUTED SESSION MANAGEMENT IN SaaS AND SESSION MANAGEMENT SYSTEM THEROF | |
JP2005321995A (en) | Information processor, information processing method, recording medium and program | |
JP2005157612A (en) | Information processor and network device management method | |
JP2009271817A (en) | Information processing system, information processing method, program and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080513 |