Use Web services
to integrate Web applications with
EISs
Tutorial Details:
Use Web services to integrate Web applications with EISs
Use Web services to integrate Web applications with EISs
By: By Jeff Hanson
Web services: A team player in the enterprise-information-system integration game
nterprise application integration; enterprise systems integration; legacy data access: thoughts that make most of us cringe. Until now, these terms have meant long hours of frustration, sleepless nights, and hair loss. Fear no more: help has arrived, or at least that is what we are being told in the development community. Web services technology has promised to solve your enterprise integration problems and then some. At this point, it's hard to tell whether Web services are just a fad, but Sun Microsystems, Microsoft, and many others seem to be staking their reputations on the future of Web services. Let's take a look at how the Java community and Microsoft are trying to make this promise more than just hype.
Introducing Web services
Web services is the term currently used to describe the concepts and technologies that integrate business processes and services over the Web using standard network protocols. Web services, as a technology, is a mechanism for delivering services and business content to any Web-enabled client or device.
Web services are URL-addressable resources that share a common protocol, allowing applications and services to connect to them over the Internet. Web services are based on XML and are communicated over existing HTTP infrastructures. The Web services model lets you combine unrelated applications and services dynamically in a loosely coupled manner over a networked environment.
Until recently, the Internet has mainly focused on interaction between Web browsers and data stores. Any integration with a middle-tier or legacy business system involved a lot of expensive, proprietary coding from several different teams of integration engineers. The Web services model promises to solve this problem by providing the following:
A standard, uniform way to represent and transfer data
A common, extensible message-processing format
A common service description language
A way to locate services
The current language used to describe Web services is the Web Services Description Language ( WSDL ). Web services are published in a registry using Universal Description, Discovery, and Integration ( UDDI ), and invoked over HTTP using the Simple Object Access Protocol ( SOAP ). A WSDL file is an XML document that defines a Web service and acts as a programming contract by separating a service's interface from its implementation. A WSDL file provides abstract and concrete definitions for a Web service's requests and responses, as well as the schemas needed to create the request documents and response documents.
XML is ubiquitous throughout the Web services architecture. Even though you can implement Web services in any programming language and deploy them on any network-accessible platform, you must use XML as the data transfer mechanism.
XML is quickly becoming the standard for information transfer and business interchange. According to many experts, XML should also replace EDI (electronic data interchange) systems as the main means of communication and data transfer between businesses. This ubiquitous XML support makes Web services the primary player in the enterprise information system (EIS) integration game.
The Java Web application domain
EIS integration usually begins with some kind of user instigation. The current preferred user environment for Web interactions is a Web browser. A user typically uses a browser to start a Web application session. This often starts a series of events that lead to one or more transactions on the middle tier and EIS integration tier. Typical Web applications need the following basic features:
HTTP request handling
Access control and authentication
Session management
HTTP request-parameter validation
A way to read and write data to and from a persistent store
Transaction-supportable connectivity to other systems
Sun Microsystems' Java 2 Platform, Enterprise Edition ( J2EE ) supports these and other features that sophisticated Web applications need. For example, J2EE provides servlets and JavaServer Pages (JSP) to handle HTTP requests and session management. Servlets also control request-parameter validation. The Enterprise JavaBeans (EJB) architecture handles automatic persistence, transactions, connection pooling, and other typical middleware tasks. EJB and Java Database Connectivity (JDBC) provide database connectivity and access.
Sun Microsystems has recently released the Java Web Services Developer Pack ( Java WSDP ), a set of development technologies aimed at simplifying the Web services development process using the J2EE platform. The technologies include APIs for handling XML transfers between Web services, processing XML messages, interacting with XML-based registries, making remote procedure calls (RPCs), and using XML with the SOAP protocol. The pack also includes a standard tag library for JSPs and the Tomcat servlet and JSP container.
Web services and MVC in the presentation tier
Initially designed for fat-client application development, the Model-View-Controller ( MVC ) pattern has proven to work admirably for Web application development. MVC separates application development into roles that fit current business models; for example, page designers build elegant and effective Webpages, Java developers build business logic, domain experts manage application flow, and system integrators focus on backend integration. The benefits derived from this role support include:
Reliability: The presentation and business logic layers are cleanly separated, which allows changes to an application's look and feel that do not affect the rest of the system.
High reuse and versatility: Applications can use multiple view types, all accessing the same business logic code from various client devices, such as Web browsers and wireless devices.
Lower development costs: Higher-level programmers can develop and maintain the UI. Developers aren't forced into domains in which they are uncomfortable.
Rapid time to market: Development time is reduced significantly. Concurrent development is enforced, allowing Java programmers to focus on business logic, domain experts to concentrate on application flow, and Webpage designers to focus on presentation.
The MVC architecture lets you integrate Web services at several useful points in your Web application development. First, you must understand the components of an MVC implementation.
MVC components
Components involved with the MVC pattern in a Java Web application consist of a controller servlet to handle and dispatch client requests, multiple task objects to extend the controller to specific domains, JavaBeans to transfer data, platform service adapters for encapsulating model/business logic, and template pages for building the desired views.
The controller uses the Front Controller pattern to centralize client-request management in an object known as the Controller . The controller detects the client device, dispatches client requests to tasks, and loads and caches HTML pages and templates. It also aggregates pages and templates to complete the response ultimately returned to the client.
Task components are based on the Command pattern and extend the controller to handle specific domain requests. You implement these simple components using common interfaces and base classes.
JavaBeans manage data transfer duties for the application model. Tasks instantiate the necessary beans that represent the model for a particular application component; initialize any required input properties on the beans; pass the beans to the desired service; and then deliver the beans to the controller to form the response from the beans' output properties.
Service adapters are Java components, such as JavaBeans and/or Enterprise JavaBeans (EJBs), that encapsulate the business logic for a specific service within a particular industry domain. Service adapters perform complex operations on backend systems; interface with middleware platform services, such as rules engines and job-scheduling engines; integrate data from disparate EISs; and handle transaction responsibilities.
HTML-style template pages form the application view. Application clients specify the desired template page. The controller looks for the template page in its cache. If the page is not in the controller's cache, the controller loads the page and stores the page in its cache. Once the template page is found, the controller calls any tasks specified within the page, and then uses the results from each task, and any static data the template page specifies, to form the response later passed back to the client.
For MVC-based Web services integration, Web services, acting as clients, can drive service adapters using a thin translation layer between the Web service method call and the service adapter. This service adapter layer can notify Web services asynchronously using message-oriented middleware (MOM). Also, existing systems can wrap their CGI responses with this translation layer to provide an easy migration to a new system or architecture.
Web services and business services in the middle tier
Business services are currently implemented using middleware technologies such as EJB, CORBA, COM, and MOM. Most of these service technologies have been used for several years as integration technologies to access EISs. When business services can be discovered and invoked over the Internet, they are transformed into Web services.
Description languages, such as WSDL, describe business services as Web services. Discovery mechanisms providing standard registries, such as UDDI, are critical components for transforming business services into Web services. UDDI will likely become a primary Web service registry for enabling businesses to access content and data usin
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Use Web services
to integrate Web applications with
EISs
View Tutorial: Use Web services
to integrate Web applications with
EISs
Related
Tutorials:
Web services hits
the Java scene,
Part 1
Web services hits
the Java scene,
Part 1 |
A birds-eye view of Web services
A birds-eye view of Web services |
Use Web services
to integrate Web applications with
EISs
Use Web services
to integrate Web applications with
EISs |
Cache SOAP services on
the client side
Cache SOAP services on
the client side |
A recipe for cookie management
A recipe for cookie management |
Jtrix: Web
services beyond SOAP
Jtrix: Web
services beyond SOAP |
Is the JCP adequately preparing Java for Web services?
Is the JCP adequately preparing Java for Web services? |
Sun boosts
Sun boosts enterprise Java |
Secure Web
services
Secure Web
services |
J2EE 1.4 eases Web service development
J2EE 1.4 eases Web service development |
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial. |
WS-Specifications
WS-Specifications
The WS-Specifications build a composable architecture to form an environment for complex Web Service applications. Different vendors, such as BEA, IBM, Microsoft, RSA Security and SAP, have joined forces to lay the foundation of secure |
Put JSF to work
Build a real-world Web application with JavaServer Faces, the Spring Framework, and Hibernate
Summary
Building a real-world Web application using JavaServer Faces is not a trivial task. This article shows you how to integrate JSF, the Spring Framewor |
Turn EJB components into Web services
Summary
Web services have become the de facto standard for communication among applications. J2EE 1.4 allows stateless Enterprise JavaBeans (EJB) components to be exposed as Web services via a JAX-RPC (Java API for XML Remote Procedure Call) endpoint, al |
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack |
Getting Started with Java Management Extensions (JMX): Developing Management and Monitoring Solutions
The Java Management Extensions (JMX) API is a standard specification developed through the Java Community Process (JCP) as JSR 3 for managing and monitoring applications and services. |
What is Web Hosting
What is Web Hosting
What is Web Hosting?
What is Web Hosting?
If you have a company and want web presence than you need a website. With the website any one from the world must be able to view your pages, images etc.
Website is actually a |
NetBeans IDE 4.1
Out-of-the-box support for J2EE 1.4 and Web Services. Check out what early access release 2 can do for you! |
Chat Transcript: Java Web Services Developer Pack (Java WSDP) 1.5
Learn about the exciting new web services features in the recently-released Java WSDP 1.5. |
Integrating Java Open Single Sign-On in Pluto
This article shows how to integrate Java Open Single Sign-On in Apache\'s Pluto portlet container. |
|
|
|