How to convert DB2 9.5 business logic to Web Services

Source: Internet
Author: User
Tags informix xslt websphere application server

The following article mainly describes how to convert DB2 9.5 business logic into Web Services. In this article, we will also introduce how to convert DB2 9.5 business logic, such as stored procedures, functions, or SQL statements, into a Web service.

Overview of IBM Data Web Services

If you often read magazines, browse websites, or attend meetings, it is hard to avoid hearing or reading Web services Information. They have been around for a while and are used to create loosely coupled applications. The specifications and standards associated with Web services, such as SOAP and Web Services Description Language (WSDL), are well defined and mature.

When companies move their IT applications to Service-Oriented Architecture (SOA, this usually requires exposing the functions and business logic of background applications stored on a data server as a Web service (such as SQL statements and stored procedures ). The use of Web service is not equivalent to SOA. Web service is a vital component of SOA.

IBM Data Web Services (ibm dws) is a technology that brings forward innovations that allow you to expose the business logic of database DB2 9.5 as a service for use in SOA applications. With ibm dws and IBM data servers, you can easily provide encapsulated business logic, such as SQL scripts and programs, so that they are like Web services. You only need to click a button.

Yes; you can right-click any SQL statement or program and generate a JMS, SOAP, or REST Web service terminal. Then they can be used to generate loosely coupled applications. In addition, you can group multiple database operations into one or more services that can be deployed and run on a large number of supported application servers, it can be called by any client through a Web browser.

To illustrate how much ibm dws simplifies your work on SOA applications, you need to understand why ibm dws technology was created, and what it looks like to create a Web service using the previous DB2 software version.

A major problem with the widespread use of DB2 Web Services and the porting of legacy applications to these services is the lack of good foundations and toolsets to quickly create and provide them. For example, earlier versions of DB2 use the WebSphere object runtime framework (WORF) to activate service operations on DB2.

Although WORF can do this, it is very difficult to define and develop these Web services. In particular, it involves creating custom data access definition extensions (DADX) files, they are complex and not based on any standards. In addition, the WORF framework is dedicated to the DB2 product family and cannot support other IBM data servers, such as Informix Dynamic Server.

Ibm dws was launched when DB2 9.5 was widely used. You may notice that this basic Web service build is named IBM Data Web Services as appropriate. There is no DB2 in the name; this is because this technology can be used for all mainstream IBM data servers and DB2 for IBM I (formerly known as IBM i5/OS ).

It can also be used in earlier versions of these data servers! For example, you can use this framework to expose DB2 8.2 business logic to a Web service in a DB2 Universal Database Version 9.5 for Windows Database.

The best part of ibm dws technology (which you will find) is that it provides a framework to convert business logic into a Web service without writing a separate code! The ibm dws technology is fully integrated into IBM Data Studio, which makes it easy to create bottom-up Web service Development (Automatic Generation of WSDL, XML matching, type matching, and so on ).

In particular, ibm dws provides the following features for IBM data servers:

Click the create feature, including a basic build for drag deployment (there is a new folder for Web services in IBM Data Studio) without any programming.

Comprehensive Web service Interface support, such as http soap and automatic WSDL generation.

Use the REST-style service interface bound with http get/POST.

Web 2.0 functions (such as JSON, RSS, Feeds, and AJAX using XSLT ).

Expose legacy application components as services.

The start and end of Web services generation are in IBM Data Studio. For example, you first use IBM Data Studio to create a Data development project, which is used as a container for the Web services you will create, such as SQL scripts, programs, Web services, and XML products.

Every data development project is linked to a database connection, which is centered on one of the following IBM data servers: DB2 for Linux, UNIX, and Windows (Version 8 or later) DB2 for z/OS (Version 7 or later), DB2 for I (Version 5 or later), and Informix Dynamic Server (Version 10 or later ).

You can deploy your Web services to many supply layers. For example, WebSphere Application Server Community Edition (Application Server/CE) is included in IBM Data Studio for download as part of it.

Ibm dws can also be deployed on other popular Application servers through IBM Data Studio, such as IBM WebSphere Application Server, Apache Tomcat, and even IBM Data Power SOA Appliance. IBM Data Studio also provides you with the ability to generate a Web archive file (WAR) for deployment to the Web team.

Ibm dws supports SOAP, JMS, and REST terminals for Web services. The diversity of terminals and support styles provides many options for clients that can call these services. When you create a Web service in IBM Data Studio, the default choice is to generate SOAP and REST services. When you deploy your Web services, you can choose which service to generate based on your application requirements.

If you generate a SOAP/HTTP service, the XML request document is contained in the SOAP body element of the SOAP request information. The ibm dws rest interface supports the following request types: http post with an XML request document and http get with the DB2 9.5 business logic to parameters input in a URL, and http post with URL encoding parameters in the request documentation.

IBM Data Studio also supports the XSLT feature. You can use it to apply style conversion to each service operation. You can use this option to customize the output input stream from this service. For example, you can transmit the output of a service to your client in XML format, and use an XSLT conversion to adjust the display results to match the customer's form factors.

The ability to define XSLT transformations for your Web services in IBM Data Studio is useful for many applications-not just formatting. For example, you can use it to customize your Web service to comply with an existing WSDL document. The XML format obtained from ibm dws may not be the expected format for your other applications. The correct format depends on the application or the existing IT infrastructure and the project itself. XSLT can be used to match DWS input and output to existing XML schema specifications.

In addition, you no longer need to choose a bottom-up or top-down method to build Web services, because the bottom-up services generated by ibm dws can match the top-down format requirements of the client. You can also use this feature to obtain results in JSON format or generate feed formats based on database content, such as RSS.

Finally, there are some testing tools with ibm dws that you can use to quickly perform comprehensive and quality assurance testing for your Web services. At this point, we have spent a lot of time talking about ibm dws, and it is time to start using it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.