Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Automated Dynamic Invocation System for Web Service with a User-defined Data Type EOOWS 2004 14 June 200 4 Takashi KOSHIDA Matsue National College of.

Similar presentations


Presentation on theme: "1 Automated Dynamic Invocation System for Web Service with a User-defined Data Type EOOWS 2004 14 June 200 4 Takashi KOSHIDA Matsue National College of."— Presentation transcript:

1 1 Automated Dynamic Invocation System for Web Service with a User-defined Data Type EOOWS 2004 14 June 200 4 Takashi KOSHIDA Matsue National College of Technology Nara Institute of Science and Technology

2 2 Content 1. Introduction Some background/Problems 2. System model About WSIF, an overview of this system Implementation 3. Experimental Results Sample program Our system 4. Conclusion

3 3 1 Introduction The B2B system is now widely used. But it is limited to regular transactions. However, SOAP,UDDI and WSDL have enabled world-wide dynamic business transactions. But, we think, too limited. Because, there are three problems. It is difficult: 1.to discover the Web Service that we want to use 、 2.to know how to use it 、 3.and to make a client program for executing a Web Service.

4 4 So, in this paper, we focused on the 3rd problem. 3. and to make a client program for executing a Web Service. And to solve it, we used WSIF. ・ We have already developed the system for the primitive data type. ・ Now we have realized a dynamic invocation system for user-defined data.

5 5 Web Service is the distributed processing technology on the Web. XML is used for data exchange. The make up of the Web Service Service RequesterService Provider SOAP retrieval registration/publish execution UDDI WSDL

6 6 2 System model About WSIF (Web Services Invocation Framework) It makes stub-less dynamic invocation possible. It requires WSDL description of Web Service. But,for execution, it is necessary to specify correctly the WSDL URL, Web Service name, method name, input-and-output parameter names and types. These are complex procedures. More easily and automatically! But, there are two output data types.

7 7 About the types of output data Two kinds of output data in Web Service: Primitive data: string, float or int etc. User-defined data: This type is composed of some primitive data types. For example, employee data ( ID, name, age, position, address, ….) This data is transferred as a JavaBeans object. So we must generate the JavaBeans code dynamically to deal with user-defined data.

8 8 <definitions name="TemperatureService" targetNamespace="http://www.xmethods.net/sd/TemperatureService.wsdl" xmlns:tns="http://www.xmethods.net/sd/TemperatureService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> Primitive data in WSDL description Output parameter name/type Input parameter name/type

9 9 User-defined data in WSDL description User-defined data typeinput parameter name / type output parameter name / type “ GData ” type is made up of the two variables, “ code ” and “ maker ”. Both of these are string-type variables.

10 10 14 primitive data User-defined data in WSDL description (Zip2Geo) In this case, “ LatLongReturn ” type is constituted from 14 variables.

11 11 An overview of our system Automated parameter setup and execution 1. First, the system discovers and retrieves the WSDL URL from the UDDI registry. 2. Downloads and analyzes the WSDL file. 3. Processing for user-defined data. 4. Then, setup the Web Service name, method name and input-and-output parameter names and types. 5. Finally,executes a Web Service. The system that is applied to primitive type data has already been developed. This new system is applicable to user- defined data.

12 12 System Feature To deal dynamically with user- defined data. We used WSDL2Java/Runtime library to generate JavaBeans codes. We utilized the Class/Method library to extract and execute the getter method dynamically.

13 13 System Implementation The system consists of three stages (Step1, Step2 and Step3). Step1: “UDDI retrieval and extraction of the WSDL URL” Step2: “dynamic Java code generation and analysis” Step3: “ WSDL file analysis, stub-less Web Service execution and extraction of the output result” Fig.2.

14 14 System workflow :1 extract retrieval UDDI Registry tModel name, tModelKey and input parameter values download WSDL data URL of WSDL file Extracted data Execution Web Service Server Step 1 Fig.2.

15 15 A part of WSDL description …………………………………………….. ………………………………………… Input parameter name/type Output parameter name/type Web Service name Method name Same name The system compares the name of these portions and distinguishes the parameter name of an input and an output.

16 16 System workflow :2 Fig.2. Step 2 setting up WSDL data compile analyze and extract WSDL2Java Java code for user-defined data (.java) Class file for user-defined data (.class) javac Name and return type of the getter methods analyze and extract Web Service name, method name, Namespace Input parameter name and type Output parameter name and type WSIF API Web Service Execution getter method invocation using Method object Extracted data Execution Step 3, data Output results In Step3, our system first analyzes the types element in the WSDL file and extracts the input-and-output parameter names and types, the method name of Web Service. After execution, the system extracts the output results by invoking dynamically the getter methods using “Method” API. In Step2, the system generates and compiles the JavaBeans code that is mapped in the user- defined data. We use “WSDL2Java” for the code generation and “javac” for compilation. These commands are executed by using “Runtime.getRuntime (). exec ()” in this system and the compiled code is automatically stored in a “sub” directory. The system analyzes the compiled code using “Class” and “Method” API in Java reflect and we can get the getter method and its return type.

17 17 3 Experimental Results We used the IBM UDDI registry for testing. tModelkeytModel name Zip2Geo Fig.3.

18 18 Result of sample program (Fig.4.) D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java complexsoap.client.dynamic.Run complexsoap/Zip2Geo.wsdl 10005 This zip code is in NEW YORK, NY in NEW YORK county It extends from longitude -74.011926 to longitude -74.011926 and from latitude 40.703235 to latitude 40.710265 All the parameters that are required for execution were previously specified manually in this program. And the JavaBeans code for a user-defined data and WSDL file are attached to this WSIF package. WSDL URL sample program name Input parameter (zip code)

19 19 D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java IBMRunComp3 Zip2Geo UUID:E625DB10-56F0-11D8-B766-000629DC0A53 “” 10005 Reading WSDL document from http://ws.cdyne.com/ziptogeo/zip2geo.asmx? WSDL getCity = NEW YORK getStateAbbrev = NY getZipCode = 10005 getCounty = NEW YORK getFromLongitude = -74.011925 getFromLatitude = 40.703236 getToLongitude = -74.011925 getToLatitude = 40.710266 getAvgLongitude = -74.00837 getAvgLatitude = 40.70675 getCMSA = 5602 getPMSA = 5600 Input parameters tModel name tModelKey Results of our system (Fig.5.) Our system (“IBMRuncomp3”) automatically discovers the Web Service’s WSDL file from the IBM UDDI registry and analyzes it. Then it sets automatically the parameters that are required for the dynamic invocation of the Web Service and invokes dynamically the getter method using “Method” object to get the output results.

20 20 We developed an automated dynamic invocation system for Web Service with user-defined data. Features Retrieval of WSDL URL from the UDDI registry Automated data extraction and setting from the WSDL description of Web Service Stub-less execution using WSIF 4 Conclusion

21 21 The UDDI registry is the core of Web Service technology. But in practice, it is difficult to quickly discover necessary Web Services from the UDDI registry. We have to make it easily for the registry to find those Web Service that users need. Important !


Download ppt "1 Automated Dynamic Invocation System for Web Service with a User-defined Data Type EOOWS 2004 14 June 200 4 Takashi KOSHIDA Matsue National College of."

Similar presentations


Ads by Google