October 23, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Recharging Web Services Development

  • May 10, 2002
  • By Chris Peltz
  • Send Email »
  • More Articles »

With the implementation complete, it is time to package and deploy the sales tax Web service to a runtime platform. The HP Web Services Platform will host the Web service. The deployment process involves defining the transport and URL access points that will be used to contact the tax service. Figure 4 shows a snapshot of how a Web service can be deployed into HP-AS. This is a wizard that exists within HP Service Composer. It walks the developer through a series of steps for deploying the service, including choosing a back-end adapter, configuring the adapter, including any dependent classes, and creating the Web application (WAR) file representing the Web service. This deployment/packaging is all done through HP's RadPak tool, which has been integrated into HP Service Composer.




Click here for a larger image.

Figure 4: The Web Service Development Wizard.

The sales-tax service implementation must be registered with a UDDI server so that clients can locate it. Typically, UDDI registration is done through XML messages that are generated by code, such as calls to the Apache-based Java library UDDI4J. But this can be a time-consuming development step. To simplify this process, the HP Registry Composer provides an easy-to-use GUI tool to view, create, edit, publish, and discover entries for UDDI-compliant registries. Through the use of wizards, HP Registry Composer enables developers to readily create entries for the appropriate UDDI fields such as Business Entities, Business Services, and tModels (the technical interface of the service). HP Registry Composer also allows prospective customers to browse UDDI registries. With HP Registry Composer, clients can search by business name, business category, unique identifier, or tModel, without having to write code. Figure 5 is a snapshot of the HP Registry Composer that shows the tax service WSDL within the HP UDDI registry.




Click here for a larger image.

Figure 5: The HP Registry Composer.

Recall that the HP Service Composer was used to automatically generate WSDL files from the existing Java-based tax application. The HP Service Composer can be integrated with the HP Registry Composer to view and manipulate WSDL files stored as UDDI tModels. The imported WSDL files are validated so that syntactic and semantic errors can be quickly identified and corrected. This can be used both by service providers, during development and publishing, and by service consumers developing applications that utilize those Web services.

Application developers that consume Web services also need tools to assist in the Web service interaction step. For example, a partner of the global-manufacturing company may need to develop client programs that will interact with the sales-tax service. To address this, the HP Web Services Platform provides a mechanism to automatically generate SOAP client proxy code in Java. With this proxy code, a client can call the Web service without having to write code that constructs SOAP messages. The proxy generation process works off the WSDL file for generating the proxy classes. Proxy classes can be generated from both HP Registry Composer and HP Service Composer.

Listing 2 shows a generated Java proxy class that invokes the tax service.

Listing 2: A generated Java proxy class that invokes the tax service.

/**
 * HPTaxService.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis Wsdl2java emitter.
 */

package org.tempuri;

public class HPTaxService {

    // Use to get a proxy class for HPTaxServicePortType

    private final java.lang.String HPTaxServicePortType_address = 
"http://localhost/cgi-bin/SaCGI.cgi/HPWS.class/SOAP/service/
rpc/HPTaxService";

    public String getHPTaxServicePortTypeAddress() {
        return HPTaxServicePortType_address;
    }

    public org.tempuri.HPTaxServicePortType getHPTaxServicePortType() {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(HPTaxServicePortType_address);
        }
        catch (java.net.MalformedURLException e) {
            return null; // unlikely as URL was validated in Wsdl2java
        }
        return getHPTaxServicePortType(endpoint);
    }

    public org.tempuri.HPTaxServicePortType getHPTaxServicePortType
(java.net.URL portAddress) {
        try {
            return new org.tempuri.HPTaxServiceBindingStub(portAddress);
        }
        catch (org.apache.axis.AxisFault e) {
            return null; // ???
        }
    }
}

The developer simply has to interact with this HPTaxService interface, without having to worry about the underlying WSDL file, or the code required for constructing the SOAP messages.

To ensure the highest levels of customer satisfaction, the tax service needs to be monitored and managed at runtime by operations personnel, software developers, and business mangers. As with traditional applications, the operations personnel will use network management tools, such as OpenView, to monitor the system infrastructure and ensure that the systems and network operate within acceptable limits. HP is developing a portfolio of tools that allow software developers to monitor and analyze the dynamic and historic behavior of Web services. In the future, software developers will be able to review the aggregate performance of the tax service over a period of time to identify potential performance bottlenecks.

Recharging Developer Productivity

As developers write Web services, they find that certain low-level development tasks are tedious and error prone. It is natural that processes and tools are emerging to help developers move to a higher-level programming paradigm.

To help its own developers move to a higher-level programming paradigm, HP created a platform and a set of tools that assists with Web services construction. This toolset has evolved into a suite of products, including the HP Web Services Platform, HP Web Services Registry, and HP Web Services Transactions. The platform provides the tools, methodology, and services to help developers discover, view, create, edit, register, deploy, and monitor Web services via UDDI and WSDL. This platform reduces the complexity associated with creating, deploying, and managing Web services. Through partnering and in-house development, HP provides development and management tools to simplify each step of the Web-service lifecycle while improving service quality and reducing time to solution.

To find more detailed information on these products, see the following Web sites:

HP's Web Services: Technical resources and downloads for the developer tools that are available for Web services.

HP's Web Services platform: The Web site for the HP Web Services Platform. Includes product information, downloads, and other technical resources.

HP's Middleware products: Product information on all of HP's middleware products, including HP Application Server, HP Web Services Transactions, and HP Process Manager.

About the Author

Chris Peltz is a software consultant in the Application Development Organization at Hewlett-Packard, providing consulting on J2EE, Web services, and mobile architectures. He has over ten years of software development experience in object-oriented development, user interface, Web development, and J2EE architectures. Reach Chris at chris_peltz@hp.com.



Page 3 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel