Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 UNIFIED DYNAMIC INVOCATION SYSTEM FOR WEB SERVICES ICCSA 2004 29 June 200 4 Takashi KOSHIDA Matsue National College of Technology Nara Institute of Science.

Similar presentations


Presentation on theme: "1 UNIFIED DYNAMIC INVOCATION SYSTEM FOR WEB SERVICES ICCSA 2004 29 June 200 4 Takashi KOSHIDA Matsue National College of Technology Nara Institute of Science."— Presentation transcript:

1 1 UNIFIED DYNAMIC INVOCATION SYSTEM FOR WEB SERVICES ICCSA 2004 29 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 features About WSIF/Output data type Features of our system 3. System structure and Processing Implementation 4. Experimental Results Conventional system/Our system 5. 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. ・ In Web service, there are two kinds of output data(primitive and user-defined type). ・ Now we have realized an automated and unified dynamic invocation system for Web services with any output 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 FEATURES 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 kinds of output data.

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, ….) It requires JavaBeans to represent a user- defined data type. So,we must generate the JavaBeans code dynamically.

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 User-defined data in WSDL description (Zip2Geo) In this case, “ LatLongReturn ” type is made up of 14 variables. 14 primitive data types

11 11 The features of our system Automated parameter setting and dynamic invocation 1. First, the system discovers and retrieves the WSDL URL from the UDDI registry. 2. Downloads and analyzes the WSDL file. 3. Checks the output data type and processing for user-defined data. 4. Then, extracts and sets up the Web service name, method name and input-and-output parameter names and types. 5. Finally,executes a Web service. Unified processing This new system is applicable to both primitive type data and user-defined type data.

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

13 13 The system consists of three stages (Step1, Step2 and Step3). Step1: (Fig.3) “UDDI registry reference and WSDL URL extraction” Step2: (Fig.4) “WSDL file analysis and WSIF parameter extraction” Step3: (Fig.5) “Web service execution and output data extraction” 3.SYSTEM STRUCTURE AND PROCESSING

14 14 Workflow of Step1 extracts retrieves UDDI Registry downloads WSDL data URL of WSDL file Extracted data Execution Web service Server Step 1 Fig.3 UDDI Registry(“I,M,IT”), tModel name, tModelKey and Input parameter values Step 2

15 15 Workflow of Step 2,3 Fig.4 Extracted data Execution analyze and extract compile WSDL2Java Java code for user-defined data (.java) Class file for user-defined data (.class) javac Name and return type of the getter methods Step 2 Output data type decision analyze and extract Primitive data type setting up Web Service name, method name, Namespace Input parameter name and type Output parameter name and type, data User-defined data type Step 3 WSIF API Web Service Execution getter method invocation using Method object Output results Fig.5 In Step 2, first the output data type is discriminated. When it is user-defined data,the JavaBeans code corresponding to this data is automatically generated using “WSDL2Java” and it is compiled using a “Runtime.getRuntime().exec()”. The execution results are transmitted to a client as an object of this user-defined data. To acquire an output value, we have to apply a getter method dynamically to the object. To extract the getter method, we devised new means of correctly extracting those names and return types using “ Class ”, “ Method ” and “ Object ” API in a Java reflect. Moreover, in this step, the common data that does not depend on an output data type are extracted. Parameters required for the dynamic invocation extracted in Step 2 are set to the WSIF API and then Web service is executed dynamically, and an output result is obtained. For user-defined output data, complicated and dynamic processing is needed furthermore. We devised newly the means using “ Class ”, “ Method ”, “ Object ” API and the getter method.

16 16 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.

17 17 4. EXPERIMENTAL RESULTS We used the IBM and Microsoft UDDI registry for testing. tModelkeytModel name Zip2Geo

18 18 D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java clients.DynamicInvoker http://services.xmethods.net/soap/urn:xmethods-delayed- quotes.wsdl getQuote IBM Reading WSDL document from 'http://services.xmethods.net/soap/urn:xmethods-delayed- quotes.wsdl' Executing operation getQuote Result: Result=91.01 Done! WSDL URL Method name Input parameter name Result of conventional system 1 The conventional system is DynamicInvoker and in Fig.6, the output data type is a primitive type(float). Here, it is necessary to specify WSDL URL of Web service, and a Web service method name as input parameters. Therefore, a user needs to know the WSDL URL, and the method name of Web service beforehand. Fig.6 Primitive type

19 19 Result of conventional system 2 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 In Fig.7, the output data type is user-defined and this Web service returns the geographic information of the city corresponding to the zip code. All the parameters that are required for execution were previously specified manually in this system. And the JavaBeans code for user-defined data and WSDL file are attached to this WSIF package. WSDL URL Input parameter (zip code) Fig.7 User-defined type

20 20 D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java UniDyRun6 IT StockQuote UUID:F24269F0-3426-11D8-B936-000629DC0A53 IBM tModelName:StockQuote tModeleKey:UUID:62B655E0-A2C6-11D7-9CD6-000629DC0A53 http://www.cise.ufl.edu/~lnarasim/Quote.wsdl tModelName:StockQuote tModeleKey:UUID:F24269F0-3426-11D8-B936-000629DC0A53 http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl Return = 93.14 Input parameter name tModel name tModelKey Results of our system (1) This Web service is the same as Fig.6. Here, “IT” means an IBM UDDI test registry for specifying UDDI registry. Since two or more Web services with the same tModel name “StockQuote” are registered, Web service is specified and accessed using the specified tModelKey value. Fig.8 Primitive type

21 21 D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java UniDyRun6 IT CurrencyExchangeRate UUID:E39408B0-342A-11D8-B936- 000629DC0A53 JAPAN USA tModelName: CurrencyExchangeRate tModeleKey: UUID:E39408B0-342A-11D8-B936-000629DC0A53 http://services.xmethods.net/sd/2001/CurrencyExchangeService.wsdl Return = 107.58 Input parameter names tModel name Results of our system (2) Primitive type tModelKey Another example of primitive data type, “CurrencyExchangeRate” Web service.

22 22 D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java UniDyRun6 I Zip2Geo UUID:E625DB10-56F0-11D8-B766-000629DC0A53 “” 10005 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 (3) Fig.9 User-defined type Our system (“UniDyRun6”) automatically discovers the Web service’s WSDL file from the IBM UDDI registry and analyzes it. Then it sets up the parameters that are required for the dynamic invocation and invokes dynamically the getter method using “Method” object to get the output result.

23 23 Results of our system (4) D:\WSIF\wsif-src-2.0\wsif-2.0\build\samples>java UniDyRun6 M GoodsService2 UUID: 0b470276-3fc6-40b2-a243-e68ed4e11f9e 3537 http://10.70.51.20:8080/axis/services/GoodsService2?wsdl getCode = 3537 getMaker = LION CO,LTD. Input parameter tModel name tModelKey User-defined type Another example of user-defined data type, “GoodsService2” returns the maker name for code.

24 24 We developed a unified and automated dynamic invocation system for Web services with any output data type. Features Retrieval of WSDL URL from the UDDI registry Automated parameter extraction from the WSDL description and setting up (independent of output data type) Stub-less execution using WSIF 5. CONCLUSION

25 25 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 services that users need. Important !


Download ppt "1 UNIFIED DYNAMIC INVOCATION SYSTEM FOR WEB SERVICES ICCSA 2004 29 June 200 4 Takashi KOSHIDA Matsue National College of Technology Nara Institute of Science."

Similar presentations


Ads by Google