Web Services Simulator

4

Click here to load reader

Transcript of Web Services Simulator

Page 1: Web Services Simulator

8/8/2019 Web Services Simulator

http://slidepdf.com/reader/full/web-services-simulator 1/4

  Web Services Simulator 

( A Use Case, by Krish Khambadkone)

 The value of simulation for ensuring the smooth implementation of IT projects is clear. With that said,a Web Services Simulator is an indispensible tool that can be put to a variety of uses during all thephases of SOA implementation. I want to illustrate the several uses of such a simulator whiledescribing a valid use case.

Use Case

 This example is drawn from a scenario that we experienced during a very large implementation for aleading Insurance Provider.

Scenario: 

 The Insurance Provider was in the process of implementing a cutting edge self-service portal whereindividual customers could purchase Auto Policies online that were tailored to their specific needs. The Portal technology was implemented using the Websphere Portal Stack in conjunction with a fewopen source custom built products.

All the backend processing and information would be provided by a Legacy EIS system and exposed asweb services to be consumed by the Portal.

Ground Reality: 

 There were two separate teams responsible for implementing the Front End Portal Layer and the webservices layer for exposing the backend Legacy Interfaces. The Portal team had all the wireframesready for implementation—say by July. However, the wireframes and screen transitions could not betested without the actual web services that supported each screen. The team that was responsible forimplementing the web services could deliver the first service by October at the earliest. Hence the

16/09/10 Page 1 of 4

Page 2: Web Services Simulator

8/8/2019 Web Services Simulator

http://slidepdf.com/reader/full/web-services-simulator 2/4

Page 3: Web Services Simulator

8/8/2019 Web Services Simulator

http://slidepdf.com/reader/full/web-services-simulator 3/4

  Web Services Simulator 

( A Use Case, by Krish Khambadkone)

-  The definition of each element and attribute was maintained by a Business Analyst in aspread sheet as an XPath definition.

- A Java Application was written that would read each XPath definition and construct the XMLas appropriate.

 -  The spreadsheet itself was prepared and formatted a bit before feeding it as the metadata

for this program. This process did not take more than 15 minutes.

 The implementation of these XML generation tools saved an enormous amount of time and effortduring the development process.

Usage Scenarios

 The Simulator Framework greatly reduced the implementation cycle times. It was used under thefollowing conditions:

-

 The front-end portal layer could be developed and tested without any dependence on theback-end services.

- All the screen transitions and screen functionality were tested using the framework.

- As the services became available nearly 4 months later, the services were not fullyfunctional so development and testing was conducted through a combination of actualservice calls and calls to the simulator.

-  The design was such that one could seamlessly switch between real service to simulator justby changing a URL in the configuration file—it was that simple.

-  The simulator came in very handy especially during the maintenance down times whichsometimes lasted for nearly a day, at which time the simulator became indispensible.

Web Services Invocation Framework 

 The web services invocation framework was built as a separate framework to enable easy invocation of services from the client side by any client. In this particular case, the client was the Portal.

 The following factors influenced the design of the web services client invocation framework.

-  The details of the actual web services should be abstracted out from the user.

- Any client should be able to invoke a given web service using the simplest mechanismpossible; for instance, a web service can be invoked by just using this one line command:

Object response = wsFramework.execute(ws.USER_ADDRESS, insReq);

-  The framework should be so generic that other application components such as ExceptionHandling, Auditing, Messaging, Input/Output(File,DB) etc. would easily be pluggable into theexisting framework alongside the web services components.

 The web services simulator was designed and implemented based on the design of this invocationframework. Here are some of the salient features of the web services invocation framework:

-  The invocation framework is a very generic framework and is driven through configurationfiles.

16/09/10 Page 3 of 4

Page 4: Web Services Simulator

8/8/2019 Web Services Simulator

http://slidepdf.com/reader/full/web-services-simulator 4/4

  Web Services Simulator 

( A Use Case, by Krish Khambadkone)

- Any new service to be invoked will not need any code change to the core framework itself. The service is added as a new definition to the XML configuration file.

-  The framework itself uses open source web services libraries like Axis2 and JAX-WS to dothe actual service invocation.

-  The framework classes wrap around these underlying open source libraries and provide allthe necessary input parameters such as input payload, authentication data etc.

 The framework had several other components incorporated into it such as Exception Handling,Auditing, File and DB Access.

Web Services Accelerators and Tools

Infogain has a very rich library of such tools that are provided, in most cases, free of cost to the clientsand are used as Accelerators to jump start and reduce the implementation cycle times for an SOAimplementation. Some of the tools described in this article are the web services and J2EE applicationframework, the web service simulator and the XML file generation tools.

For more information on the simulation accelerators offered by Infogain, please click here.

16/09/10 Page 4 of 4