Software Newsletter      https://www.freepciscore.com/Default.asp?ver=F   Software Journal
   
Software Journal
  Search  
   
   
 
The Software 500
Application Development
Application Focus
Business Intelligence
Customer Relationship
Management
IT Infrastructure
Security
The Business of IT
TECH CENTER
   
  Software Journal  
 

 

Our Partners

Sign Up for Digital Software Magazine
 
eInquiry System
 
 
|   Login   |    Register   |
Application Development
Related Feature (May 2004)

A Step by Step Approach to Modeling Web Services
by Ash Parikh, Rajesh Pradhan and Nirav Shah

Here’s how to use Iopsis iNsight 2.1 in Sun Java Studio Standard 5, Update 1, to model a Web service that generates an order to buy a PC.
 
Scenario

To illustrate how one can model a Web service, we will use a sample component provided in the documentation that comes with Iopsis iNsight 2.1, available as an evaluation download at www.iopsis.com.

Iopsis Software’s Iopsis iNsight 2.1 is a plug-in to Sun Java Studio. It reuses Sun Java Studio’s standard Web services-creation and -deployment features, and adds functionality that enables business analysts and developers to model Web services interfaces. It also enables applications to be involved in meaningful business processes.

Iopsis iNsight 2.1 is used to model, create and deploy Web services interfaces. Sun Java Studio Standard 5, update 1, fully implements all relevant Java specifications and supports development, deployment and testing of standards-based Web services from existing Java 2 Enterprise Edition (J2EE) components. Embedding iNsight as a module within Studio takes advantage of Studio’s ability to rapidly package and test applications that use Web services interfaces developed with iNsight.

The combination of Iopsis iNsight 2.1 and Sun Java Studio Standard 5 update 1 enables the developer to apply the concepts of Unified Modeling Language (UML) to Web services interfaces and to generate Web Services Description Language (WSDL) objects. The promise of the new development model is to producedramatic productivity improvements for architects and programmers; lower the cost of application development and integration; enhance portability and interoperability; allow reuse of architecture widgets; and simplify the capture of intellectual property.Since Iopsis iNsight comprises componentized packs, the user can select and activate only the modules that are relevant to current requirements.

Let’s consider the real-world scenario for an online order generation by placing an order for a desktop or a notebook. What are the logical steps that come to mind when a user wants to place an order?

An order placed might need to go through validation checks to see whether the configuration that comes in is valid or invalid.Therefore, an order-generation service must have three operations:
  • PlacePCOrder: The PlacePCOrder Service takes the configuration as the input parameter and places an order if the configuration is valid.
  • ValidatePCConfig: The ValidatePCConfig Service takes the configuration passed by the PlacePCOrder Service and validates that configuration. The output for this service is whether the configuration is valid or invalid. If the configuration is valid then an order is placed.
  • OrderPCStatus: The OrderPCStatus Service allows the customer to keep a check on the status of the order.

We will demonstrate only the use of the PlacePCOrder operation.

The process of modeling a Web service interface is carried out by two main modeling views:
  • The use-case view, and
  • The PIM (Platform Independent Modeling) view

Steps

The following are the steps for modeling a Web service using Iopsis iNsight 2.1 in Sun Java Studio Standard 5, update 1:
Step 1: Launch iNsight.
  • With Studio running, choose Tools > iNsight > WSDL Modeler to open iNsight’s Project Manager window.
  • Click the New button to open the New Project dialog. Enter OrderGeneration for the Project Name, then click OK.
  • The iNsight View window will open with UML package diagrams for the Platform Independent Modeling (PIM) and Platform Specific Modeling (PSM) views.
  • In Studio’s Editing workspace click the Explorer window’s Webservice Explorer tab. This exposes iNsight’s modeling and view selection tool, easily identified by the graphic at the top with a yellow background and the acronym “WSIL.” Verify that the Result tab at the bottom of the tool’s window is selected.
Step 2: Add Use Case.

  • In the tool window, select the UseCaseView node. The field in the iNsight View window becomes blank and tool buttons for building use-case diagrams appear in the left margin of the frame.
  • Click the Use Case button in the margin, then click in the blank field to add a Use Case symbol.
  • This activity is called the PortType.

See screen shot of Step 2.

Step 3: Add WSDL Operation. Include a WSDLOperation to this PortType. For example, here the operation is called PlacePCOrder. An operation can be added using the grab handles provided with the WSDL PortType use case.

See screen shot of Step 3.

Step 4: Name the Service. Rename the service name below the PSM Node. When you click EditService, a Property dialog comes up. Rename the service to OrderGenerationService and also specify the package in which you want these files to be generated.

See screen shot of 2.1: Step 4.

Step 5: Add Messages. After modeling the use cases, go to the PIM view. Add the InMessage and the OutMessage to the PlacePCOrder operation. You can add the InMessage and the OutMessage by clicking the grab handles available for the WSDL operation.

The following screenshot shows the InMessage and its parts being added. You can similarly add the OutMessage and its parts.

See screen shot of Step 5.

Step 6: Bind WSDL Operation to Fulfillment Component. To do this, select the J2EE /J2SE component. The following screenshots show how you can bind the component and, after specifying the location of the component, define the operation for it to be bound to. In this case we only have one operation called placePCOrder to bind.

See screen shot.

After binding the component, right click just as you did for BindComponent and click GenerateXMS. The XMS is in the Sun Java Studio-specific format.

See screen shot.

Step 7: Generate WSDL. Go to the Filesystems tab and refresh the package that you have specified for the files that have to be generated. After doing that, expand the nodes till you can see the XMS. Right click on the XMS and generate the WSDL.

See screen shot of Step 7.

Step 8: Reverse Engineer from WSDL. Import the WSDL for reverse engineering. The user will have to specify the WSDL file that he wants to import. Importing a WSDL will provide user with the Use Case view and PIM view updates based on the WSDL.

See screen shot of Step 8.

— By Ash Parikh, Rajesh Pradhan and Nirav Shah
 
 
 
Related Links
  Related Feature: Modeling of Web Services: A Standards-Based Approach

 
   Go to Buyers Guide

 
  Back to Home Page  
Advertisement
http://www.softwaremag.com/SW500CD.cfm?yr=2008

     
Home |  About Us |  Software 500 |  Editor's Desk |  Subscribe |  Advertise |  Contact Us | 

Copyright © 1999-2010 Software Magazine and King Content Co.
Site Design by Enervision Media
Site Development/Administration by Kunal Panchal