Brief introduction
Web services have become a major mechanism for data exchange, access, and manipulation. Its underlying standards are ripe, and some of its advantages, such as loose coupling and virtualization, have made a big step towards the goal of implementing a service-oriented architecture (service-oriented Architecture,soa). Many surveys have shown that being difficult to achieve is one of the main reasons for delaying or even abandoning an SOA project. Many data-oriented Web services do one thing-executing a statement on a database or calling a stored procedure, but in order to do so, you need to encapsulate these database operations into the application code logic. Developing data-oriented Web applications is a challenging task because of the need for both Web development and database expertise. Data access developers who develop these data-oriented applications can attest that they often need to wrap DML (data manipulation language) into a lot of code. Also, the logic of the code is repetitive, such as opening the connection, executing the statement, processing the result set, closing the connection, and so on. It would be ideal if you could take advantage of existing database operations and provide them as Web services to avoid doing the above. This is where Data Web Services can play a role.
What is Data Web Services?
Data Web Services (DWS) is a next-generation solution that can significantly simplify development, deployment, and management for web-based DB2 and IDS database server access. DWS enables you to generate Web services using DML statements (such as Select, Insert, Update, delete, and XQuery) and stored procedure calls without having to write any code. DWS provides a complete Web service interface, including support for soap and rest bindings. These are part of Data Studio developer, so you can develop Web services and database applications in the same environment. The generated Web service is packaged into an instantly deployable Web application that can be deployed on a supported application server.
Key aspects of DWS
Create a Web service using DWS without programming!
DWS enables you to create Web services by dragging and dropping any DML operations or stored procedure calls into a Web service container to create a Web service that can be deployed instantly.
DWS also supports an integrated test environment in which you can deploy and test the generated services with just a few clicks of the mouse.
DWS supports SOAP and WSDL generation based on HTTP.
DWS automatically generates a Web Service description Language (Web Services Description language,wsdl) file that contains a description of the Web service.
DWS supports the rest-style service interface.
In addition to HTTP based soap, DWS also supports HTTP Get/post bindings to provide restful services to the database server.
DWS can apply server-side XSLT to incoming XML service requests and emitted responses.
DWS enables you to apply server-side XSLT to meet the needs of any service form. There are some interesting features in the Web 2.0 area, which are described in later sections.
No code generated!
The DWS consists of a common metadata-driven runtime that does not generate any "black box" code behind the scenes. This gives applications a reliability and lightweight feature.
Developing Data Web Services
As shown in Figure 1, developing Data Web Services typically requires the following steps:
Develop SQL statements, stored procedures, or XQuery statements.
Create a Web service.
Drag and drop the actions you want into this Web service.
Deploy this service to the application server.
Test this Web service with an integrated test environment or a Web service client.
Figure 1. Typical development process for Data WEB services