JP2005107699A - Conversion method and system of web content including script into web service - Google Patents

Conversion method and system of web content including script into web service Download PDF

Info

Publication number
JP2005107699A
JP2005107699A JP2003338123A JP2003338123A JP2005107699A JP 2005107699 A JP2005107699 A JP 2005107699A JP 2003338123 A JP2003338123 A JP 2003338123A JP 2003338123 A JP2003338123 A JP 2003338123A JP 2005107699 A JP2005107699 A JP 2005107699A
Authority
JP
Japan
Prior art keywords
web
script
web service
conversion
profile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003338123A
Other languages
Japanese (ja)
Inventor
Hiroyuki Kobayashi
宏至 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2003338123A priority Critical patent/JP2005107699A/en
Publication of JP2005107699A publication Critical patent/JP2005107699A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a conversion method and a system which convert an existing Web application into a Web service even if the Web page includes a script to call a Web application. <P>SOLUTION: A conversion server acquires a Web page described as input information in a profile in advance and holds its script and a DOM of an HTML text being an operation target. The server creates a Web service having a method corresponding to an event to the Web page. When a Web service client requests the method, the sever executes the corresponding script in the Web page being held. Thereby, the system which converts the Web application into the Web service can handle the script. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、既存WebアプリケーションのWebサービスへの変換方法及びシステムに関する。   The present invention relates to a method and system for converting an existing Web application into a Web service.

インターネットの普及により、Webサービスが広まりつつある。Webサービスとは、人間の介在を前提としたWebアプリケーションとは異なり、SOAPというデータ交換のプロトコルによって、人間が介在せずに、コンピュータ同士がネットワークを通して直接データを交換することができるアプリケーションのことである。   With the spread of the Internet, Web services are spreading. Unlike Web applications that are based on human intervention, Web services are applications that allow computers to exchange data directly over a network without human intervention using a data exchange protocol called SOAP. is there.

出願人は、既存WebアプリケーションをWebサービスに変換する技術として、例えば、特願2003−42221号や特願2003−284899号(何れも本願と出願人同一で本願出願時点で未公開)を出願している。   The applicant has applied for, for example, Japanese Patent Application No. 2003-42221 and Japanese Patent Application No. 2003-284899 (both of which are the same as the present applicant and unpublished at the time of filing this application) as technologies for converting existing Web applications into Web services. ing.

特願2003−42221号に記載の技術は、Webサービスにおけるデータ交換のプロトコルSOAPとWebアプリケーションにおけるデータ交換のプロトコルHTTPの相互変換を行うものである。具体的には、FORMタグやAタグを含むWebページから特定の既存Webアプリケーションを呼び出すのに必要な情報、及び既存Webアプリケーションの戻り値としてのWebページからWebサービスとして提供する部分を指定したプロファイルを、プロキシサーバに配置する。プロキシサーバは、このプロファイルに基づき、WebサービスクライアントからのSOAPリクエストからデータを取得し、HTTPリクエストを生成しWebアプリケーションからのHTTPレスポンスを取得する。また、HTTPレスポンスのHTMLデータからプロファイルに基づきデータを取得し、SOAPレスポンスを生成し、Webサービスクライアントへ送信する。これによって、既存WebアプリケーションをWebサービスに変換する。   The technology described in Japanese Patent Application No. 2003-42221 performs mutual conversion between a data exchange protocol SOAP in a Web service and a data exchange protocol HTTP in a Web application. Specifically, a profile that specifies information required to call a specific existing Web application from a Web page that includes a FORM tag or A tag, and a part that is provided as a Web service from the Web page as a return value of the existing Web application Is placed on the proxy server. Based on this profile, the proxy server acquires data from the SOAP request from the Web service client, generates an HTTP request, and acquires an HTTP response from the Web application. Also, data is acquired from the HTML data of the HTTP response based on the profile, a SOAP response is generated, and sent to the Web service client. As a result, the existing Web application is converted into a Web service.

また、特願2003−284899号に記載の技術は、特願2003−42221号に記載の技術と同様に、プロキシサーバで動的に既存WebアプリケーションをWebサービスに変換するが、Webアプリケーションを提供するWebサーバがセッション管理を行っている場合に対応したものである。   In addition, the technology described in Japanese Patent Application No. 2003-284899 is similar to the technology described in Japanese Patent Application No. 2003-42221, and dynamically converts an existing Web application to a Web service using a proxy server, but provides a Web application. This corresponds to the case where the Web server performs session management.

しかしながら、上述した背景技術では、Webアプリケーションを呼び出すのに必要な情報をWebページ内のタグ単位で指定しているが、そのWebページ内に含まれるスクリプトを考慮していないという問題がある。最近のWebページは、サーバの負荷軽減等の目的で、スクリプトを記述しておくことにより、ユーザの入力値等に対して、入力値の妥当性検証や簡単な演算をクライアントで実行し、その結果をWebアプリケーションに送信するようにしている。   However, in the background art described above, information necessary for calling a Web application is specified for each tag in the Web page, but there is a problem that a script included in the Web page is not considered. Recent web pages have scripts written for the purpose of server load reduction, etc., so that the validity of input values and simple calculations are executed on the client's input values, etc. The result is sent to the web application.

しかし、上述した背景技術は、プロトコルの変換しか行っておらず、スクリプトは無視されていた。このため、不適当な値がWebアプリケーションに送られてしまう問題があった。   However, the background art described above only performs protocol conversion, and scripts are ignored. For this reason, there was a problem that an inappropriate value was sent to the Web application.

本発明の目的は、Webアプリケーションを呼び出すWebページ内にスクリプトが含まれる場合にも対応した、既存WebアプリケーションをWebサービスに変換する方法及びシステムを提供することにある。   An object of the present invention is to provide a method and system for converting an existing Web application into a Web service, which is compatible with a case where a script is included in a Web page that calls a Web application.

上記目的を達成するために、本発明は、既存WebアプリケーションをWebサービスに変換する方法であって、変換に必要な情報を記述したプロファイルを生成する第一のステップと、プロファイルに基づいてWebサービスを生成する第二のステップと、生成したWebサービスを実行する第三のステップとを備えたことを特徴とする。前記第一のステップにおいて、Webアプリケーションへの入力情報と出力情報とが記述されたプロファイルを生成するものであり、Webアプリケーションへの入力情報として、スクリプトを含むWebページのURLが記述されたプロファイルを生成するものである。   In order to achieve the above object, the present invention provides a method for converting an existing Web application into a Web service, the first step of generating a profile describing information necessary for the conversion, and the Web service based on the profile And a third step of executing the generated Web service. In the first step, a profile in which input information and output information to a Web application are described is generated, and a profile in which a URL of a Web page including a script is described as input information to the Web application. Is to be generated.

前記第二のステップは、変換サーバにより、プロファイルにおいて入力情報として記述されたWebページを取得し、そのスクリプトとHTML文書のDOMを保持するものである。変換サーバが入力情報として取得したWebページのスクリプトのうち、文字列の表示方法や書式の指定など、Webサービスでは不必要な式を削除したスクリプトを保持するようにする。また、変換サーバが入力情報として取得したWebページのHTML文書をWebアプリケーションの呼び出し及びスクリプトの実行に関わる要素のみからなるDOMに変換して保持することとする。さらに、Webアプリケーションへの入力変数を設定する設定メソッドと、イベントに対応したイベントメソッドと、Webアプリケーションの出力変数を取得する取得メソッドの3種類のメソッドを持つWebサービスを生成する。   In the second step, a Web page described as input information in the profile is acquired by the conversion server, and the script and the DOM of the HTML document are held. Of the Web page script acquired by the conversion server as input information, keep the script that deletes expressions unnecessary for Web services, such as the display method and format specification of character strings. In addition, the HTML document of the Web page acquired as input information by the conversion server is converted into a DOM consisting only of elements related to the Web application call and script execution, and stored. Further, a Web service having three types of methods, that is, a setting method for setting an input variable to the Web application, an event method corresponding to the event, and an acquisition method for acquiring the output variable of the Web application is generated.

前記第三のステップにおいて、設定メソッドがリクエストされた場合、変換サーバは、保持しているDOMに対して与えられた変数値を設定する。イベントメソッドがリクエストされた場合、変換サーバは保持しているDOMを参照し、前記イベントメソッドに対応するスクリプトが存在する場合に当該スクリプトを実行する。スクリプトにメッセージボックスを表示させる命令がある場合、変換サーバは、メッセージボックス内のメッセージを例外のメッセージとして設定し、Webサービスクライアントに対して例外を投げる。リクエストされたイベントメソッドがsubmitである場合、変換サーバが保持しているDOMからHTTPリクエストを生成・送信し、WebアプリケーションからHTTPレスポンスを取得する。取得メソッドがリクエストされた場合、変換サーバは、取得したHTTPレスポンスのHTML文書からプロファイルの出力情報で指定された部分を取得し、SOAPレスポンスに変換してWebサービスクライアントに送信する。   In the third step, when a setting method is requested, the conversion server sets a given variable value for the held DOM. When an event method is requested, the conversion server refers to the held DOM, and executes the script when a script corresponding to the event method exists. If the script has an instruction to display a message box, the conversion server sets the message in the message box as an exception message and throws an exception to the Web service client. If the requested event method is submit, an HTTP request is generated and transmitted from the DOM held by the conversion server, and an HTTP response is acquired from the Web application. When the acquisition method is requested, the conversion server acquires the part specified by the output information of the profile from the HTML document of the acquired HTTP response, converts it into a SOAP response, and sends it to the Web service client.

本発明によれば、事前に変換サーバにスクリプトとそのスクリプトの操作対象となるHTML文書のDOMを保持しておくことで、WebアプリケーションをWebサービスに変換するシステムはスクリプトに対応できるようになる。また、変換及びスクリプトの実行に必要な要素だけから構成されるDOMを保持することによって、メモリ使用量の削減やDOM内のデータへのアクセスの高速化を可能にすることができる。さらに、Webサービスにとって不要なメソッドをスクリプトから削除したことによって、スクリプトの高速な実行が可能となる。   According to the present invention, a system that converts a Web application into a Web service can support a script by holding a script and a DOM of an HTML document that is an operation target of the script in advance in the conversion server. In addition, by holding a DOM composed only of elements necessary for conversion and script execution, it is possible to reduce memory usage and speed up access to data in the DOM. Furthermore, by deleting methods unnecessary for the Web service from the script, the script can be executed at high speed.

以下、本発明を実施する場合の一形態を図面を参照して具体的に説明する。   Hereinafter, an embodiment for carrying out the present invention will be specifically described with reference to the drawings.

図1は、本発明の実施の一形態のWebサービスへの変換システムの構成を示すブロック図である。Webサービスへの変換システムは、図1に示すように、Webアプリケーションを提供するWebサーバ130と、WebアプリケーションをWebサービスに変換する変換サーバ140と、WebアプリケーションをWebサービスに変換するのに必要な情報を記述したプロファイルを作成するプロファイル作成装置120と、変換サーバ140が提供するWebサービスをインターネット110を通して利用するWebサービスクライアント100とを備える。   FIG. 1 is a block diagram showing the configuration of a system for converting to a web service according to an embodiment of the present invention. As shown in FIG. 1, the system for converting to a Web service is necessary for converting a Web application 130 into a Web service, a Web server 130 that provides the Web application, a conversion server 140 that converts the Web application into a Web service, and the Web service. A profile creation device 120 that creates a profile describing information, and a web service client 100 that uses a web service provided by the conversion server 140 via the Internet 110 are provided.

変換サーバ140は、他装置との通信を行う通信部141、プロファイル生成装置120で生成したプロファイルを解析するプロファイル解析部142、プロファイルに指定されたHTML文書をDOM(Document Object Model)として保持しておくDOM DB143、プロファイルに指定されたWebサービスの戻り値を保持する戻り値DB144、プロファイルで指定されたHTML文書内のスクリプトを解析するスクリプト解析部145、解析したスクリプトを保持するスクリプトDB146、スクリプト中の不要メソッドを定義して保持しておく不要メソッドDB147、プロファイルに基づきWebサービスを生成するWebサービス生成部148、生成したWebサービスを保持するWebサービスDB149、Webサービスクライアント100からのSOAPリクエストを解析するSOAPリクエスト解析部150、Webサービスの提供に関する制御を行う制御部151、リクエストに基づき保持しているHTML文書のDOMを操作するDOM操作部152、スクリプトを実行するスクリプト実行部153、Webサーバ130に対するHTTPリクエストを生成するHTTPリクエスト生成部154、HTTPレスポンスを解析するHTTPレスポンス解析部156、及び、WebサービスクライアントへのSOAPレスポンスを生成するSOAPレスポンス生成部155を備える。   The conversion server 140 stores a communication unit 141 that communicates with other devices, a profile analysis unit 142 that analyzes a profile generated by the profile generation device 120, and an HTML document specified by the profile as a DOM (Document Object Model). DOM DB 143 to be stored, return value DB 144 that holds the return value of the Web service specified in the profile, script analysis unit 145 that analyzes the script in the HTML document specified in the profile, script DB 146 that holds the analyzed script, An unnecessary method DB 147 that defines and holds unnecessary methods, a Web service generation unit 148 that generates a Web service based on a profile, a Web service DB 149 that stores the generated Web service, and a SOAP request from the Web service client 100 is analyzed SOAP request analysis 150, a control unit 151 that performs control related to provision of a Web service, a DOM operation unit 152 that operates a DOM of an HTML document held based on a request, a script execution unit 153 that executes a script, and an HTTP request to the Web server 130 An HTTP request generation unit 154 that analyzes an HTTP response, and a SOAP response generation unit 155 that generates a SOAP response to the Web service client.

本発明の実施の一形態を具体的な例を挙げて説明する。   An embodiment of the present invention will be described with a specific example.

図2と図3は、従業員の情報を検索する既存Webアプリケーションの例である。図2はWebアプリケーションを呼び出すWebページ(http://www.×××.co.jp/whois.html)をブラウザ表示したもので、図3はそのHTML文書である。ユーザがこのWebページの従業員番号の入力欄201に従業員番号を入力し、検索ボタン202を押すと、クライアントはHTML文書内のスクリプトcheck()を実行し、まず入力したデータが数字か判定する(301)。もし、入力データが数字でないならば"半角の数字を入力してください。"(302)というメッセージを太字にして(303)、メッセージボックスに表示する(304)。もし、入力データが数字であるならば、従業員番号をWebアプリケーションに送信する(305)。従業員番号を取得したWebアプリケーションは、対応する従業員の情報を、図4に示すWebページとして返す。このWebページ内の従業員の情報には、従業員番号、従業員氏名、所属部署、及び電話番号が含まれる。   2 and 3 are examples of existing Web applications that retrieve employee information. FIG. 2 is a browser display of a web page (http://www.xxx.co.jp/whois.html) that calls a web application, and FIG. 3 is an HTML document thereof. When the user enters the employee number in the employee number input field 201 of this Web page and presses the search button 202, the client executes the script check () in the HTML document and first determines whether the input data is a number. (301). If the input data is not a number, the message “Enter a single-byte number” (302) is bolded (303) and displayed in a message box (304). If the input data is a number, the employee number is transmitted to the Web application (305). The Web application that has acquired the employee number returns the corresponding employee information as a Web page shown in FIG. The employee information in this web page includes employee number, employee name, department, and telephone number.

この従業員の情報を検索する既存WebページをWebサービスに変換するには、プロファイル作成装置120がこのWebアプリケーションに関するプロファイルを作成し、変換サーバ140にプロファイルを配置する必要がある。図5のフローチャートに基づき、その手順を説明する。   In order to convert an existing Web page for retrieving employee information into a Web service, the profile creation device 120 needs to create a profile related to the Web application and place the profile on the conversion server 140. The procedure will be described based on the flowchart of FIG.

ステップ501では、プロファイル生成装置120が開発者の指示に従いプロファイルを生成する。   In step 501, the profile generation apparatus 120 generates a profile in accordance with a developer's instruction.

図6に、生成されたプロファイルの例を示す。このプロファイルは、変換サーバ140が提供するWebサービス(Whois)(601)の入力(602)と出力(603)に関する情報が記述してある。入力(602)には、Webアプリケーションを呼び出すWebページのURL(http://www.×××.co.jp/whois.html)が指定してある。出力(603)には、Webアプリケーションの戻り値であるWebページのURL(http://www.×××.co.jp/result.html)が指定してあり、このWebページ内のどの部分をWebサービスの出力値として提供するかを子要素PARAMETER(604、605)が指定している。ここでは、従業員氏名shimeiと電話番号telを出力値とし、これらが記述されているWebページ内の場所をXPathで指定している。   FIG. 6 shows an example of the generated profile. This profile describes information about the input (602) and output (603) of the Web service (Whois) (601) provided by the conversion server 140. In the input (602), the URL (http://www.xxx.co.jp/whois.html) of the web page that calls the web application is specified. The output (603) specifies the URL (http://www.xxx.co.jp/result.html) of the Web page that is the return value of the Web application. The child element PARAMETER (604, 605) specifies whether or not to be provided as an output value of the Web service. Here, the employee name shimei and the telephone number tel are used as output values, and the location in the Web page where these are described is specified by XPath.

ステップ502では、プロファイル生成装置120がステップ501で生成したプロファイルを変換サーバ140に送信する。   In step 502, the profile generation device 120 transmits the profile generated in step 501 to the conversion server 140.

ステップ503では、変換サーバ140の通信部141がプロファイル生成装置120の生成したプロファイルを読み込み、プロファイル解析部142に送る。プロファイル解析部142は、プロファイルのINPUT要素のurl属性を参照し、Webサーバ130からWebアプリケーションを呼び出すためのWebページ(図1及び2参照)を取得する。   In step 503, the communication unit 141 of the conversion server 140 reads the profile generated by the profile generation device 120 and sends it to the profile analysis unit 142. The profile analysis unit 142 refers to the url attribute of the INPUT element of the profile, and acquires a Web page (see FIGS. 1 and 2) for calling a Web application from the Web server 130.

ステップ504では、プロファイル解析部142がプロファイルを解析し、OUTPUT要素の子要素PARAMETERに基づいて、戻り値DB144に、戻り値を格納する領域を確保する。図7は、その格納例である。サービスWhoisの下に、戻り値shimeiとtelの領域が確保されている。   In step 504, the profile analysis unit 142 analyzes the profile and secures an area for storing the return value in the return value DB 144 based on the child element PARAMETER of the OUTPUT element. FIG. 7 shows an example of such storage. Under the service Whois, the areas of return values shimei and tel are reserved.

ステップ505では、プロファイル解析部142がステップ503で取得したWebページから必要な要素だけから構成されるDOMを生成しDOM DB143に格納する。ここで、必要な要素を判定する基準は次の2点である。一つ目の基準は、図3のFORM要素(306)のように、目的のWebアプリケーションを呼び出すのに直接関係している要素である。もう一つの基準は、図3の301の"form1.no.value"のように、Script内で参照される要素である。図8に、本例で生成されるDOMの例を示す。これと図3の元のHTML文書とを比較すると明らかなように、生成されたDOMはBR要素やCENTER要素がなくコンパクトになっていることがわかる。この工夫により、DOMに必要なメモリの使用量及びDOM内のデータへのアクセス時間を削減することが可能である。   In step 505, the profile analysis unit 142 generates a DOM including only necessary elements from the Web page acquired in step 503 and stores the DOM in the DOM DB 143. Here, the following two points are used as criteria for determining necessary elements. The first criterion is an element directly related to calling the target Web application, such as the FORM element (306) in FIG. Another criterion is an element referred to in the script, such as “form1.no.value” 301 in FIG. FIG. 8 shows an example of the DOM generated in this example. As is apparent from a comparison between this and the original HTML document of FIG. 3, it can be seen that the generated DOM has no BR element or CENTER element and is compact. With this device, it is possible to reduce the amount of memory required for the DOM and the access time to the data in the DOM.

ステップ506では、スクリプト解析部145が、ステップ503で取得したWebページからスクリプトの部分を取得し、スクリプトDB146に格納する。ただし、文字の書式を変更するなど、Webサービスとして不要な処理は削除する。このために、事前に不要メソッドDB147に不要なメソッド一覧を格納しておき、これと一致したメソッドを削除する。図9に、不要メソッドDB147への不要メソッド格納例を示す。また、図10は、スクリプトDB146に格納されるスクリプトの例を示している。図3の元のスクリプトと比較すると、不要メソッドDB147に格納されているメソッド"bold()"の部分が削除されている。このように、Webサービスに不必要なメソッドを削除することにより、効率的にスクリプトを実行できる。   In step 506, the script analysis unit 145 acquires the script portion from the Web page acquired in step 503 and stores it in the script DB 146. However, unnecessary processing as a Web service, such as changing the character format, is deleted. For this purpose, an unnecessary method list is stored in the unnecessary method DB 147 in advance, and a method matching this is deleted. FIG. 9 shows an example of unnecessary method storage in the unnecessary method DB 147. FIG. 10 shows an example of a script stored in the script DB 146. Compared with the original script of FIG. 3, the portion of the method “bold ()” stored in the unnecessary method DB 147 is deleted. In this way, scripts can be executed efficiently by deleting methods unnecessary for the Web service.

ステップ507では、Webサービス生成部148が、Webサービスのクラスを生成し、WebサービスDB149に格納する。図11に、生成されるWebサービスのクラス例を示す。生成するクラスは、3種類のメソッドを持つ。一つ目は、Webアプリケーションを呼び出すのに必要な変数を設定する設定メソッド"setNo(string no)"で、これはHTML文書から自動的に設定される。2つ目は、submitなどイベントに対応したイベントメソッド"submit()"でこれもHTML文書から自動的に設定される。3つ目は、プロファイルのOUTPUT要素で設定された戻り値を取得する取得メソッド"getShimei(), getTel()"である。   In step 507, the web service generation unit 148 generates a web service class and stores it in the web service DB 149. FIG. 11 shows a class example of the generated Web service. The generated class has three types of methods. The first is a set method "setNo (string no)" that sets the variables required to call the Web application, which is automatically set from the HTML document. The second is an event method "submit ()" corresponding to an event such as submit, which is also automatically set from the HTML document. The third is an acquisition method “getShimei (), getTel ()” that acquires a return value set in the OUTPUT element of the profile.

以上で、変換サーバ140がWebアプリケーションをWebサービスに動的に変換するために必要な設定が完了した。   This completes the settings necessary for the conversion server 140 to dynamically convert the Web application to the Web service.

次に、図12のフローチャートを用いて、変換サーバ140がWebサービスクライアント100にWebサービスを提供する手順を説明する。   Next, a procedure for the conversion server 140 to provide the Web service to the Web service client 100 will be described using the flowchart of FIG.

Webサービスクライアント100からのSOAPリクエストを変換サーバ140の通信部141が受信すると、SOAPリクエスト解析部150が、そのSOAPリクエストを解析し、リクエストされたメソッドの種類を判定する(ステップ1201)。   When the communication unit 141 of the conversion server 140 receives a SOAP request from the Web service client 100, the SOAP request analysis unit 150 analyzes the SOAP request and determines the type of the requested method (step 1201).

リクエストされたメソッドが設定メソッドの場合、制御部151は、設定する値をDOM操作部152に渡す。DOM操作部152は、DOM DB143に格納されている対応するDOMに対して値を設定する(ステップ1202)。例えば、設定メソッド"setNo"がリクエストされた場合、"no"の値を図8のname属性が"no"であるINPUT要素の属性value801に設定する。   When the requested method is a setting method, the control unit 151 passes the value to be set to the DOM operation unit 152. The DOM operation unit 152 sets a value for the corresponding DOM stored in the DOM DB 143 (step 1202). For example, when the setting method “setNo” is requested, the value of “no” is set to the attribute value 801 of the INPUT element whose name attribute is “no” in FIG.

リクエストされたメソッドがイベントメソッドの場合、制御部151は、DOM DB143を参照し、リクエストされたイベントに対応するスクリプトが存在するか判定する(ステップ1203)。スクリプトが存在する場合には、スクリプト実行部153が、スクリプトDB146から対応するスクリプトを取得し、実行する(ステップ1204)。例えば、リクエストされたメソッドが"submit"の場合、図8のDOMにおいてFORM要素のonSubmit属性でスクリプト"check()"が指定されているので、スクリプトDB146に格納されている図10のスクリプトを実行する。ここで、図10のスクリプトのように、メッセージボックスを操作するメソッド(例えば"alart")が含まれている場合、メッセージボックス内のメッセージを例外のメッセージとする例外をWebサービスクライアント100に投げる。   When the requested method is an event method, the control unit 151 refers to the DOM DB 143 and determines whether there is a script corresponding to the requested event (step 1203). If the script exists, the script execution unit 153 acquires the corresponding script from the script DB 146 and executes it (step 1204). For example, if the requested method is “submit”, the script “check ()” is specified by the onSubmit attribute of the FORM element in the DOM of FIG. 8, so the script of FIG. 10 stored in the script DB 146 is executed. To do. Here, as in the script of FIG. 10, when a method for operating a message box (for example, “alart”) is included, an exception having the message in the message box as an exception message is thrown to the Web service client 100.

さらに、制御部151は、リクエストされたメソッドが"submit"であるか判定する(ステップ1205)。メソッドが"submit"である場合は、HTTPリクエスト生成部154が、DOM DB143に格納されている対応するDOMからHTTPリクエストを生成し、Webサーバ130に送信する(ステップ1206)。生成されるHTTPリクエストの例は、特願2003−42221号に記載されたものと同様である。HTTPレスポンス解析部156が、Webサーバ130からのHTTPレスポンスを受信する(ステップ1207)と、HTTPレスポンスに含まれるHTML文書から、プロファイルにおけるOUTPUT要素の子要素PARAMETERのxpath属性に設定されたXPathに従い、戻り値(ここでは、shimei及びtelの値)を取得する(ステップ1208)。取得した戻り値は、戻り値DB144に格納される。   Further, the control unit 151 determines whether or not the requested method is “submit” (step 1205). If the method is “submit”, the HTTP request generation unit 154 generates an HTTP request from the corresponding DOM stored in the DOM DB 143, and transmits the HTTP request to the Web server 130 (step 1206). An example of the generated HTTP request is the same as that described in Japanese Patent Application No. 2003-42221. When the HTTP response analysis unit 156 receives the HTTP response from the Web server 130 (step 1207), the HTML document included in the HTTP response is set according to the XPath set in the xpath attribute of the child element PARAMETER of the OUTPUT element in the profile. Return values (here, shimei and tel values) are acquired (step 1208). The acquired return value is stored in the return value DB 144.

リクエストされたメソッドが取得メソッドの場合、制御部151は、戻り値DB144から、対応する変数の値を取得し、SOAPレスポンス生成部155に渡す(ステップ1209)。SOAPレスポンス生成部155は、取得した値からSOAPレスポンスを生成し、Webサービスクライアント100に送信する(ステップ1210)。生成されるSOAPレスポンスの例は、特願2003−42221号に記載されたものと同様である。   If the requested method is an acquisition method, the control unit 151 acquires the value of the corresponding variable from the return value DB 144 and passes it to the SOAP response generation unit 155 (step 1209). The SOAP response generation unit 155 generates a SOAP response from the acquired value and transmits it to the Web service client 100 (step 1210). An example of the generated SOAP response is the same as that described in Japanese Patent Application No. 2003-42221.

以上で、Webアプリケーションを呼び出すWebページにスクリプトが含まれている場合に、WebアプリケーションをWebサービスに動的に変換する処理が完了する。   This completes the process of dynamically converting the Web application to the Web service when the Web page that calls the Web application includes a script.

本発明の一実施の形態のWebサービス変換システムの概略構成を示すブロック図The block diagram which shows schematic structure of the Web service conversion system of one embodiment of this invention Webアプリケーションを呼び出すためのWebページ例を示すブラウザ表示例の図Browser display example showing an example Web page for calling a Web application Webアプリケーションを呼び出すためのWebページ例を示すHTML文書例の図Example HTML document showing an example Web page for calling a Web application Webアプリケーションの出力結果であるWebページ例を示すブラウザ表示例の図Browser display example showing an example of a Web page that is the output result of a Web application プロファイルの生成、配置処理の処理手順の概要を示すフロ−チャ−トFlowchart showing an overview of the processing procedure for profile generation and placement processing WebアプリケーションをWebサービスに変換するための情報が記述されたプロファイル例を示す図Diagram showing an example profile that describes information for converting a Web application to a Web service Webサービスの戻り値を格納する戻り値DBに格納されるデータ構造例を示す図Diagram showing an example of the data structure stored in the return value DB that stores the return value of the Web service DOM DBに格納されるWebページのDOM構造の例を示す図Diagram showing an example of the DOM structure of a Web page stored in the DOM DB 不要メソッドDBに格納された不要メソッド一覧の例を示す図Diagram showing an example of the unnecessary method list stored in the unnecessary method DB スクリプトDBに格納されるスクリプト例を示す図Diagram showing an example of a script stored in the script DB プロファイルに基づいて生成されるWebサービス例を示す図Diagram showing an example of a web service generated based on a profile Webサービスを実行する処理手順の概要を示すフローチャートFlowchart showing an overview of the processing procedure for executing Web services

符号の説明Explanation of symbols

100…Webサービスクライアント、110…インターネット、120…プロファイル作成装置、130…Webサーバ、140…変換サーバ。   DESCRIPTION OF SYMBOLS 100 ... Web service client, 110 ... Internet, 120 ... Profile creation apparatus, 130 ... Web server, 140 ... Conversion server.

Claims (11)

既存WebアプリケーションをWebサービスに変換する方法であって、
変換に必要な情報としてWebアプリケーションへの入力情報と出力情報とが記述されたプロファイルで、該入力情報としてスクリプトを含むWebページのURLが記述されているプロファイルを、生成する第一のステップと、
前記プロファイルに基づいてWebサービスを生成する第二のステップと、
生成したWebサービスを実行する第三のステップと
を備えたことを特徴とするスクリプトを含むWebコンテンツのWebサービスへの変換方法。
A method for converting an existing web application into a web service,
A first step of generating a profile in which URL information of a web page including a script is described as the input information in a profile in which input information and output information to the Web application are described as information necessary for conversion;
A second step of generating a web service based on the profile;
A third step of executing the generated web service. A method for converting web content including a script, characterized by comprising a script, to a web service.
請求項1に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第二のステップは、変換サーバにより、前記プロファイルにおいて入力情報として記述されたWebページを取得し、そのスクリプトとHTML文書のDOMを保持することを特徴とする変換方法。
A method for converting a Web content including the script according to claim 1 into a Web service.
The second step is a conversion method characterized in that the conversion server acquires a Web page described as input information in the profile and holds the script and the DOM of the HTML document.
請求項2に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第二のステップは、前記変換サーバが入力情報として取得したWebページのスクリプトのうち、Webサービスでは不必要な式を削除したスクリプトを保持することを特徴とする変換方法。
A method for converting a web content including the script according to claim 2 into a web service.
The conversion method characterized in that the second step holds a script in which an expression unnecessary for the Web service is deleted from the script of the Web page acquired as input information by the conversion server.
請求項2または3に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第二のステップは、前記変換サーバが入力情報として取得したWebページのHTML文書を、Webアプリケーションの呼び出し及びスクリプトの実行に関わる要素のみからなるDOMに変換して保持することを特徴とする変換方法。
In the conversion method of the web content containing the script of Claim 2 or 3 to the web service,
The second step is characterized in that the HTML document of the Web page acquired as input information by the conversion server is converted into a DOM consisting only of elements related to Web application call and script execution, and stored. Method.
請求項1から4の何れか1つに記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第二のステップは、Webアプリケーションへの入力変数を設定する設定メソッドと、イベントに対応したイベントメソッドと、Webアプリケーションの出力変数を取得する取得メソッドの、3種類のメソッドを持つWebサービスを生成することを特徴とする変換方法。
In the conversion method of the web content containing the script as described in any one of Claim 1 to 4 to the web service,
The second step generates a Web service with three types of methods: a setting method that sets input variables to the Web application, an event method that corresponds to the event, and a get method that acquires the output variable of the Web application. A conversion method characterized by:
請求項5に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第三のステップにおいて、前記設定メソッドがWebサービスクライアントからリクエストされた場合、前記変換サーバは、保持しているDOMに対して与えられた変数値を設定することを特徴とする変換方法。
A method for converting a Web content including the script according to claim 5 into a Web service.
In the third step, when the setting method is requested from a Web service client, the conversion server sets a given variable value for a held DOM.
請求項5に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第三のステップにおいて、前記イベントメソッドがリクエストされた場合、前記変換サーバは、保持しているDOMを参照し、前記イベントメソッドに対応するスクリプトが存在する場合に当該スクリプトを実行することを特徴とする変換方法。
A method for converting a Web content including the script according to claim 5 into a Web service.
In the third step, when the event method is requested, the conversion server refers to the held DOM, and executes the script when a script corresponding to the event method exists. Conversion method.
請求項7に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第三のステップにおいて、前記スクリプトにメッセージボックスを表示させる命令がある場合、前記変換サーバは、メッセージボックス内のメッセージを例外のメッセージとして設定し、Webサービスクライアントに対して例外を投げることを特徴とする変換方法。
A method for converting a Web content including the script according to claim 7 into a Web service.
In the third step, when the script has a command to display a message box, the conversion server sets the message in the message box as an exception message and throws an exception to the Web service client. Conversion method.
請求項7に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第三のステップにおいて、リクエストされたイベントメソッドがsubmitである場合、前記変換サーバが保持しているDOMから必要な情報を取得し、HTTPリクエストを生成・送信し、WebアプリケーションからHTTPレスポンスを取得することを特徴とする変換方法。
A method for converting a Web content including the script according to claim 7 into a Web service.
In the third step, if the requested event method is submit, the necessary information is acquired from the DOM held by the conversion server, an HTTP request is generated and transmitted, and an HTTP response is acquired from the Web application A conversion method characterized by:
請求項5に記載のスクリプトを含むWebコンテンツのWebサービスへの変換方法において、
前記第三のステップにおいて、前記取得メソッドがリクエストされた場合、前記変換サーバは、取得したHTTPレスポンスのHTML文書からプロファイルの出力情報で指定された部分を取得し、SOAPレスポンスに変換してWebサービスクライアントに送信することを特徴とする変換方法。
A method for converting a Web content including the script according to claim 5 into a Web service.
In the third step, when the acquisition method is requested, the conversion server acquires the part specified by the output information of the profile from the acquired HTML document of the HTTP response, converts it into a SOAP response, and converts it into a Web service. A conversion method characterized by being transmitted to a client.
既存WebアプリケーションをWebサービスに変換するシステムであって、
変換に必要な情報としてWebアプリケーションへの入力情報と出力情報とが記述されたプロファイルで、該入力情報としてスクリプトを含むWebページのURLが記述されているプロファイルを、生成する手段と、
前記プロファイルに基づいてWebサービスを生成する手段と、
生成したWebサービスを実行する手段と
を備えたことを特徴とするスクリプトを含むWebコンテンツのWebサービスへの変換システム。
A system that converts existing web applications into web services,
Means for generating a profile in which URL information of a Web page including a script is described as the input information in a profile in which input information and output information to the Web application are described as information necessary for conversion;
Means for generating a web service based on the profile;
A system for converting a web content including a script, characterized by comprising means for executing the generated web service.
JP2003338123A 2003-09-29 2003-09-29 Conversion method and system of web content including script into web service Pending JP2005107699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003338123A JP2005107699A (en) 2003-09-29 2003-09-29 Conversion method and system of web content including script into web service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003338123A JP2005107699A (en) 2003-09-29 2003-09-29 Conversion method and system of web content including script into web service

Publications (1)

Publication Number Publication Date
JP2005107699A true JP2005107699A (en) 2005-04-21

Family

ID=34533735

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003338123A Pending JP2005107699A (en) 2003-09-29 2003-09-29 Conversion method and system of web content including script into web service

Country Status (1)

Country Link
JP (1) JP2005107699A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010521721A (en) * 2007-02-12 2010-06-24 マイクロソフト コーポレーション Web data usage platform
US8429185B2 (en) 2007-02-12 2013-04-23 Microsoft Corporation Using structured data for online research

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010521721A (en) * 2007-02-12 2010-06-24 マイクロソフト コーポレーション Web data usage platform
US8429185B2 (en) 2007-02-12 2013-04-23 Microsoft Corporation Using structured data for online research
US8595259B2 (en) 2007-02-12 2013-11-26 Microsoft Corporation Web data usage platform
US8832146B2 (en) 2007-02-12 2014-09-09 Microsoft Corporation Using structured data for online research
US9164970B2 (en) 2007-02-12 2015-10-20 Microsoft Technology Licensing, Llc Using structured data for online research

Similar Documents

Publication Publication Date Title
KR100552554B1 (en) Method and system for fulfilling requests for information from a network client
JP2004318842A (en) Webpage generation device, embedding device, method for control of webpage generation, webpage generation program, and recording medium
US6928462B2 (en) System and method for distributed processing of non-processable elements of a document to be rendered on a client
JPH10232899A (en) Service linking method, service linking device and parts generation management method utilizable for the execution
US20120154861A1 (en) Image processing apparatus, system including image processing apparatus and external apparatus
US20030158894A1 (en) Multiterminal publishing system and corresponding method for using same
JP2004287758A (en) Web application integration method/program/storage medium, and portal server
CN111131442B (en) Webpage data monitoring method, terminal equipment and readable storage medium
JPH1115723A (en) Multimedia data supplying method and multimedia data server
JP5039946B2 (en) Technology for relaying communication between client devices and server devices
US20040162873A1 (en) Method and apparatus of wrapping an existing service
CN1620060B (en) Method and device for integrating browser-incompatible information into web content and for displaying the information
JP2005234690A (en) Server device, service method, program and recording medium
JP2005107699A (en) Conversion method and system of web content including script into web service
JP2003242127A (en) Business integrated system
JP2005149131A (en) Information processing device, method and program
JP5042415B2 (en) Client server system
JP2006053893A (en) Data processing system, data processing method, processing device, terminal unit, portable terminal unit, and program
JP4621879B2 (en) Information processing apparatus having Web service function
Endo et al. Using IntelligentPad as a Server-Side Technology
KR100585964B1 (en) Web service analyzer and its method
JP2001147877A (en) Information offering device, information relay device, document data display method and computer program product for displaying document data
JPH09223004A (en) Program development supporting method
JP2004234345A (en) Application program execution system and program
JP2001256122A (en) Gateway for accessing distributed object by using xml